Skip to content

fix(ce-code-review): move run artifacts from .context/ to /tmp per AGENTS.md#690

Merged
tmchow merged 1 commit intomainfrom
tmchow/scratch-paths-to-tmp
Apr 26, 2026
Merged

fix(ce-code-review): move run artifacts from .context/ to /tmp per AGENTS.md#690
tmchow merged 1 commit intomainfrom
tmchow/scratch-paths-to-tmp

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented Apr 26, 2026

Summary

ce-code-review's per-run artifacts were being written under .context/compound-engineering/ce-code-review/<run-id>/, but the repo's AGENTS.md scratch-space rule (in effect since PR #588 / commit 12aaad3, 2026-04-17) defaults that profile to /tmp/compound-engineering/<skill-name>/<run-id>/. This PR aligns ce-code-review with the rule.

ce-optimize is intentionally not migrated — it's the example AGENTS.md cites for the user-curated .context/ exception (per-spec optimization log surviving across sessions on the same checkout, with crash-recovery markers and explicit branch-resume semantics). After this PR, ce-optimize is the only place under .context/compound-engineering/ in the plugin tree, which matches the AGENTS.md exception list precisely.

What changed

8 files, 25 path swaps (all .context/.../tmp/...), plus three tightened phrasings:

  • ce-code-review/SKILL.md — Stage 4 mkdir + dispatch artifact paths, Stage 5/6 detail enrichment reads, Step 4 artifact emit, autofix/headless/report-only mode guidance.
  • ce-code-review/references/: subagent-template.md, tracker-defer.md, walkthrough.md.
  • Cross-skill copies of tracker-defer.md in ce-work/, ce-work-beta/, lfg/ — each reads ce-code-review's per-persona artifacts when filing tickets, so each needed the path swap. (Per AGENTS.md's no-cross-skill-shared-files rule, every skill carries its own copy of the reference.)
  • Generic phrasing tightened: .context/ artifact pathrun-artifact path under /tmp/compound-engineering/ce-code-review/<run-id>/; Do not write \.context` artifacts.Do not write run artifacts.`
  • tests/review-skill-contract.test.ts updated for the new path string and new generic phrasing.

Why this matters

  • Aligns with the project's own scratch-space rule. The AGENTS.md tier system places per-run-id scratch the user might inspect at /tmp/compound-engineering/<skill-name>/<run-id>/. ce-code-review's artifacts fit that tier exactly.
  • Reduces clutter in users' checkouts. The completion report surfaces the artifact path; under /tmp/ users can grep across past runs without those artifacts living inside the repo tree.
  • Cross-platform safe. /tmp/compound-engineering/... works on macOS (symlinks to /private/tmp/), Linux, and WSL. Skills here already assume Unix-like shells.

Test plan

  • bun test — 908/908 pass (1 test assertion updated for new path string + generic phrasing).
  • bun run release:validate — clean.
  • Run /ce-code-review on a real branch after merge and confirm the completion report's artifact-path line points under /tmp/.

References

Surfaced as a follow-up during interactive eval of #685. AGENTS.md scratch-space rule landed in #588.

🤖 Generated with Claude Code

…ENTS.md

The repo-root AGENTS.md "Scratch Space" rule (in effect since
PR #588 / commit 12aaad3, 2026-04-17) prescribes /tmp as the default
for cross-invocation reusable scratch:

  Cross-invocation reusable: stable path
  /tmp/compound-engineering/<skill-name>/<run-id>/ -- not mktemp -d --
  so later invocations of the same skill can discover sibling run-ids.
  Use /tmp directly rather than $TMPDIR so paths stay accessible.

ce-code-review's per-run artifacts match that profile exactly:
per-run-id directory, surfaced in the completion report so the user
can grep across runs, not user-curated state. The .context/ usage
predated the rule shift and was the only remaining drift in the plugin
tree besides ce-optimize. ce-optimize stays under .context/ -- it's
the literal example AGENTS.md cites for the user-curated exception
(per-spec optimization log surviving across sessions on the same
checkout).

Touches every reference to the per-run artifact path:
- ce-code-review SKILL.md (Stage 4 mkdir, dispatch, Stage 5/6
  enrichment, Step 4 artifact emit, mode-specific guidance)
- ce-code-review references: subagent-template.md, tracker-defer.md,
  walkthrough.md
- Cross-skill copies of tracker-defer.md (ce-work, ce-work-beta, lfg)
  that read ce-code-review's artifacts when filing tickets
- Generic phrasing tightened in SKILL.md report-only mode and Stage 4
  read-only contract (was ".context artifacts" / ".context/ artifact
  path", now "run artifacts" / "run-artifact path under /tmp/...").
- tests/review-skill-contract.test.ts updated for the new path string
  and the new generic phrasing.

Tests: 908/908 pass. release:validate clean.

Surfaced as a follow-up during interactive eval of PR #685.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tmchow tmchow merged commit 85e9a20 into main Apr 26, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
michaelvolz pushed a commit to michaelvolz/compound-engineering-plugin-windows-version that referenced this pull request Apr 28, 2026
…ENTS.md (EveryInc#690)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant