Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,11 @@ jobs:
- name: Build
run: pnpm build

- name: Dist CLI Smoke
run: pnpm test:dist-cli-smoke

- name: Pack Check
run: pnpm pack:check

- name: Tarball Install Smoke
run: pnpm test:tarball-install-smoke
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Verify tag matches package version
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
if [ "${GITHUB_REF_NAME}" != "v${PACKAGE_VERSION}" ]; then
echo "Tag ${GITHUB_REF_NAME} does not match package version v${PACKAGE_VERSION}" >&2
exit 1
fi

- name: Verify release candidate
run: pnpm verify:release

- name: Pack release tarball
id: pack
run: |
TARBALL=$(npm pack | tail -n 1)
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: npm pack triggers the prepack lifecycle hook (pnpm build), which silently rebuilds the project after verify:release already built and tested it. The tarball therefore ships artifacts that were never the ones the test suite validated.

Use --ignore-scripts to pack the already-verified build output instead of rebuilding.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/release.yml, line 43:

<comment>`npm pack` triggers the `prepack` lifecycle hook (`pnpm build`), which silently rebuilds the project *after* `verify:release` already built and tested it. The tarball therefore ships artifacts that were never the ones the test suite validated.

Use `--ignore-scripts` to pack the already-verified build output instead of rebuilding.</comment>

<file context>
@@ -0,0 +1,49 @@
+      - name: Pack release tarball
+        id: pack
+        run: |
+          TARBALL=$(npm pack | tail -n 1)
+          echo "tarball=${TARBALL}" >> "$GITHUB_OUTPUT"
+
</file context>
Fix with Cubic

echo "tarball=${TARBALL}" >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create "${GITHUB_REF_NAME}" "${{ steps.pack.outputs.tarball }}" --generate-notes --verify-tag
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,31 @@ pnpm test:reviewer-smoke
pnpm test:cli-smoke
pnpm test
pnpm build
pnpm test:dist-cli-smoke
pnpm test:tarball-install-smoke
```

Use Node 20+ and `pnpm`.

`pnpm test` is the default source-level suite. Build-dependent release checks stay explicit in
`pnpm test:dist-cli-smoke` and `pnpm test:tarball-install-smoke`.

## Branch and PR expectations

- Keep pull requests focused.
- Explain the user-facing behavior change, not just the code diff.
- Add or update tests for logic changes.
- Update docs whenever behavior, config, or file layout changes.
- Include screenshots or terminal output only when it helps explain the UX.
- If you touch release-facing CLI behavior, validate `node dist/cli.js` or `pnpm test:dist-cli-smoke`.
- If you touch packaging, release verification, or install-time CLI behavior, also validate `pnpm test:tarball-install-smoke`.

## Current maintainer focus

- Prefer structural simplification over feature expansion in the next phase.
- If you refactor repository structure, keep the command surface stable unless a behavior change is intentional and documented.
- Before borrowing ideas from similar tools such as `mem0`, first inspect their current public docs or repository context and extract only patterns that fit this project's companion-first posture.
- Use external research to improve module boundaries, reviewer surfaces, and maintainability, not to broaden the product scope by default.

## Coding Guidelines

Expand All @@ -45,6 +59,16 @@ Use Node 20+ and `pnpm`.
- Avoid over-engineering. Start with the simplest version that keeps future migration possible.
- Keep comments in English.
- Keep reviewer-only warnings and confidence prose in audit/reviewer surfaces; they should not become continuity body content.
- Keep `src/cli.ts` narrow. New commands should be registered through `src/lib/cli/register-commands.ts` instead of expanding the main entrypoint again.
- Keep runtime composition in `src/lib/runtime/runtime-context.ts`; command files should depend on that runtime surface instead of rebuilding their own composition helpers.
- Keep `src/lib/commands/session.ts` thin. Provenance selection and action dispatch belong there; reviewer-facing text/json assembly belongs in `src/lib/commands/session-presenters.ts`.
- Keep shared continuity persistence in `src/lib/domain/session-continuity-persistence.ts` so session commands and wrapper auto-save do not drift into separate persistence code paths.
- When touching continuity persistence, preserve the current contract split:
- `cam session save` = `merge`
- `cam session refresh` = `replace`
- wrapper auto-save = `merge`
- Do not hard-merge the rollout selection rules for `cam session refresh` and wrapper auto-save. They intentionally share persistence semantics, not identical provenance selection.
- If you split tests, keep `runSession` and wrapper continuity coverage in separate files and share helpers from `test/helpers/` rather than re-inlining temp-dir or mock-wrapper setup.

## Documentation Guidelines

Expand Down
4 changes: 4 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<p><strong>A local-first companion CLI that brings Claude-style auto memory workflows to Codex</strong></p>
<p>
<a href="./README.md">简体中文</a> |
<a href="./README.zh-TW.md">繁體中文</a> |
<a href="./README.en.md">English</a>
<a href="./README.ja.md">日本語</a>
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Missing | separator between the "English" and "日本語" language links. The other README translations (README.ja.md, README.md) correctly include | after "English" since it is no longer the last item. The fix requires adding | to the end of the unchanged English</a> line above.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.en.md, line 8:

<comment>Missing `|` separator between the "English" and "日本語" language links. The other README translations (README.ja.md, README.md) correctly include `|` after "English" since it is no longer the last item. The fix requires adding ` |` to the end of the unchanged `English</a>` line above.</comment>

<file context>
@@ -3,7 +3,9 @@
     <a href="./README.md">简体中文</a> |
+    <a href="./README.zh-TW.md">繁體中文</a> |
     <a href="./README.en.md">English</a>
+    <a href="./README.ja.md">日本語</a>
   </p>
   <p>
</file context>
Fix with Cubic

Comment on lines +6 to +8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Missing pipe separator between language links.

The language selector is missing a | separator between "English" and "日本語" links, which breaks the visual consistency with the other separators.

🔧 Proposed fix
     <a href="./README.zh-TW.md">繁體中文</a> |
-    <a href="./README.en.md">English</a>
-    <a href="./README.ja.md">日本語</a>
+    <a href="./README.en.md">English</a> |
+    <a href="./README.ja.md">日本語</a>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<a href="./README.zh-TW.md">繁體中文</a> |
<a href="./README.en.md">English</a>
<a href="./README.ja.md">日本語</a>
<a href="./README.zh-TW.md">繁體中文</a> |
<a href="./README.en.md">English</a> |
<a href="./README.ja.md">日本語</a>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.en.md` around lines 6 - 8, The language selector in README.en.md is
missing a pipe separator between the "English" and "日本語" links; update the HTML
fragment containing the anchor tags for "English" and "日本語" so there is a " | "
separator inserted between the <a href="./README.en.md">English</a> and <a
href="./README.ja.md">日本語</a> links to match the other separators and restore
visual consistency.

</p>
<p>
<a href="https://github.com/Boulea7/Codex-Auto-Memory/actions/workflows/ci.yml">
Expand Down Expand Up @@ -274,6 +276,7 @@ Current public-ready status:
- topic-aware startup lookup: available
- session continuity companion layer: available
- reviewer audit surfaces: available
- tagged GitHub Releases: the release workflow is defined with tarball artifacts as the target; before pushing the first real tag, confirm that the default branch exposes and activates that workflow; npm publish remains manual
- native memory / native hooks primary path: not enabled and not trusted as the main implementation path

## Roadmap
Expand All @@ -291,6 +294,7 @@ Current public-ready status:
- stronger contradiction handling
- clearer `cam memory` and `cam session` reviewer UX
- tighter continuity diagnostics and reviewer packets, with explicit confidence and warning surfaces
- tighter release-facing verification through tarball install smoke so the `.tgz`-installed `cam` bin shim is exercised directly
- keep a compatibility seam for future hook surfaces

### v0.3+
Expand Down
Loading
Loading