fix(call-charon): make crossings VCS-aware and briefs self-contained
- fix(call-charon): detect jj vs git at ORIENT; jj workspaces for dispatch (Agent worktree isolation is git-only — jj cannot run in git worktrees) - fix(call-charon): add §isolation and §integration contracts per mode; run Verify post-integration in the main workspace - fix(call-charon): inline axis criteria verbatim into reviewer briefs — subagent-side skill paths break in worktrees/remote runners and disable-model-invocation axes are invisible to Skill tool - fix(call-charon): builder brief uses absolute weave/bdd paths and ends with a commit in git mode - docs(call-charon): clarify guardrail — blueprint content frozen, status frontmatter flips allowed
This commit is contained in:
parent
b4a32de692
commit
9be133618c
@ -30,25 +30,37 @@ holds no state in his head.
|
|||||||
|
|
||||||
## Process
|
## Process
|
||||||
1. **ORIENT** — read `MAP.md` + the statuses of every blueprint it
|
1. **ORIENT** — read `MAP.md` + the statuses of every blueprint it
|
||||||
names. First run: add a `## Passage` section to `MAP.md`, one line
|
names. Detect the VCS mode once: `[ -d .jj ]` → jj, else git;
|
||||||
per blueprint ([crossing-format.md](crossing-format.md)). Edges come
|
record it in the Passage header. First run: add a `## Passage`
|
||||||
|
section to `MAP.md`, one line per blueprint
|
||||||
|
([crossing-format.md](crossing-format.md)). Edges come
|
||||||
from the decisions' `blocked-by` and the blueprints' `traces-to`;
|
from the decisions' `blocked-by` and the blueprints' `traces-to`;
|
||||||
no edge, no ordering claim (ferry's rule).
|
no edge, no ordering claim (ferry's rule).
|
||||||
2. **PICK** — the next `locked` blueprint whose blocked-by set is all
|
2. **PICK** — the next `locked` blueprint whose blocked-by set is all
|
||||||
implemented. None unblocked → record why in Passage, report
|
implemented. None unblocked → record why in Passage, report
|
||||||
blocked, stop.
|
blocked, stop.
|
||||||
3. **DISPATCH** — spawn a builder (general-purpose agent, worktree
|
3. **DISPATCH** — isolate per mode (crossing-format.md §isolation):
|
||||||
isolation) with a brief per weave's handoff gate: blueprint path,
|
jj → `jj workspace add ../charon-NNN`, spawn a general-purpose
|
||||||
OKF refs by path, constraints, Verify command
|
builder *without* the isolation flag, brief points at the
|
||||||
|
workspace dir (jj can't run inside git worktrees, so the Agent
|
||||||
|
tool's `isolation: worktree` is git-mode only). Git → spawn with
|
||||||
|
`isolation: worktree`; the brief must end with a commit, or the
|
||||||
|
work can't be merged. Brief per weave's handoff gate: blueprint
|
||||||
|
path, OKF refs by path, constraints, Verify command
|
||||||
(crossing-format.md §builder-brief). `cavecrew-builder` refuses this
|
(crossing-format.md §builder-brief). `cavecrew-builder` refuses this
|
||||||
scope — wrong tool. Serial by default; parallel builders only when
|
scope — wrong tool. Serial by default; parallel builders only when
|
||||||
blocked-by frontiers are clear AND Seams-touched are disjoint.
|
blocked-by frontiers are clear AND Seams-touched are disjoint.
|
||||||
4. **REVIEW FLOTILLA** — builder done → spawn read-only reviewers in
|
4. **REVIEW FLOTILLA** — builder done → spawn read-only
|
||||||
parallel, one per axis: review-blueprint + review-angles **always**;
|
general-purpose reviewers in parallel, one per axis:
|
||||||
nuke-review + winnow when the diff is non-trivial (Charon's call —
|
review-blueprint + review-angles **always**; nuke-review + winnow
|
||||||
record it). Each brief names the axis's SKILL.md path — subagents
|
when the diff is non-trivial (Charon's call — record it). The
|
||||||
don't auto-load skills. The builder never self-reviews; the
|
orchestrator reads each axis's SKILL.md *itself* (once per
|
||||||
orchestrator never reviews inline.
|
sitting) and **inlines the criteria verbatim** into the brief
|
||||||
|
(crossing-format.md §reviewer-brief) — subagents can't be trusted
|
||||||
|
to resolve skill paths (worktrees, remote runners, several axes
|
||||||
|
`disable-model-invocation`), and a self-contained brief always
|
||||||
|
travels. The builder never self-reviews; the orchestrator never
|
||||||
|
reviews inline.
|
||||||
5. **MERGE + FIX** — Charon dedupes findings, arbitrates conflicts
|
5. **MERGE + FIX** — Charon dedupes findings, arbitrates conflicts
|
||||||
(sieve's always-pass exceptions win: validation, data-loss
|
(sieve's always-pass exceptions win: validation, data-loss
|
||||||
handling, security), and sends **one** consolidated brief via
|
handling, security), and sends **one** consolidated brief via
|
||||||
@ -56,11 +68,15 @@ holds no state in his head.
|
|||||||
restart. Max 2 fix rounds, re-running failed axes only
|
restart. Max 2 fix rounds, re-running failed axes only
|
||||||
(review-blueprint always re-runs last); still red → escalate to
|
(review-blueprint always re-runs last); still red → escalate to
|
||||||
the user.
|
the user.
|
||||||
6. **GATE** — reviews clean → the orchestrator runs the blueprint's
|
6. **GATE** — reviews clean → integrate first
|
||||||
Verify *itself* and pastes the output. A builder's "tests pass" is
|
(crossing-format.md §integration: jj `jj squash --from charon-NNN@`,
|
||||||
never trusted. Then merge the worktree, seal via
|
git merge the builder's branch), then the orchestrator runs the
|
||||||
|
blueprint's Verify *itself* in the main workspace and pastes the
|
||||||
|
output — post-integration, so what's verified is what ships. A
|
||||||
|
builder's "tests pass" is never trusted. Seal via
|
||||||
[commit-atomic-jj](../../productivity/commit-atomic-jj/SKILL.md)
|
[commit-atomic-jj](../../productivity/commit-atomic-jj/SKILL.md)
|
||||||
citing the blueprint, flip its status.
|
(git mode: same message discipline, plain commit) citing the
|
||||||
|
blueprint, flip its status.
|
||||||
7. **LOG** — update the Passage line: status, axes run, rounds,
|
7. **LOG** — update the Passage line: status, axes run, rounds,
|
||||||
commit, ISO date. Blocked mid-crossing → log that instead; the
|
commit, ISO date. Blocked mid-crossing → log that instead; the
|
||||||
reason is the handoff.
|
reason is the handoff.
|
||||||
@ -86,8 +102,9 @@ holds no state in his head.
|
|||||||
- **Never** seal on agent claims — orchestrator-run Verify output only.
|
- **Never** seal on agent claims — orchestrator-run Verify output only.
|
||||||
- **Never** exceed 2 fix rounds — escalate.
|
- **Never** exceed 2 fix rounds — escalate.
|
||||||
- **Never** dispatch past a blocked-by edge.
|
- **Never** dispatch past a blocked-by edge.
|
||||||
- **Never** edit decisions or blueprints mid-crossing — supersede via
|
- **Never** edit decision or blueprint *content* mid-crossing —
|
||||||
ferry/blueprint.
|
supersede via ferry/blueprint. Status frontmatter flips are the
|
||||||
|
crossing's job, not an edit.
|
||||||
- **Never** moor from here.
|
- **Never** moor from here.
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|||||||
@ -7,29 +7,47 @@ section; the orchestrator copies these verbatim, filling `<>` slots.
|
|||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
## Passage
|
## Passage
|
||||||
|
mode: jj
|
||||||
- 014 — <title> — implemented — blocked-by: — axes: bp,ang,nuke,win — rounds: 1 — commit: <id> — <ISO date>
|
- 014 — <title> — implemented — blocked-by: — axes: bp,ang,nuke,win — rounds: 1 — commit: <id> — <ISO date>
|
||||||
- 015 — <title> — locked — blocked-by: 014 — axes: — rounds: — commit: —
|
- 015 — <title> — locked — blocked-by: 014 — axes: — rounds: — commit: —
|
||||||
- 016 — <title> — blocked — blocked-by: 015 — why: <one line>
|
- 016 — <title> — blocked — blocked-by: 015 — why: <one line>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- `mode:` is `jj` or `git`, detected once at ORIENT (`[ -d .jj ]`);
|
||||||
|
it selects §isolation and §integration below.
|
||||||
- Status vocabulary is blueprint's (`locked`, `implemented`,
|
- Status vocabulary is blueprint's (`locked`, `implemented`,
|
||||||
`superseded-by-NNN`) plus `blocked` with a `why:`.
|
`superseded-by-NNN`) plus `blocked` with a `why:`.
|
||||||
- `axes:` abbreviations: `bp` review-blueprint, `ang` review-angles,
|
- `axes:` abbreviations: `bp` review-blueprint, `ang` review-angles,
|
||||||
`nuke` nuke-review, `win` winnow. Record only axes actually run.
|
`nuke` nuke-review, `win` winnow. Record only axes actually run.
|
||||||
- Dates ISO 8601. Append, update in place; never delete a line.
|
- Dates ISO 8601. Append, update in place; never delete a line.
|
||||||
|
|
||||||
## Builder brief (Agent prompt, worktree isolation)
|
## Isolation (per mode, orchestrator sets up before dispatch)
|
||||||
|
|
||||||
|
- **jj**: `jj workspace add ../charon-NNN`, then spawn the builder
|
||||||
|
with NO isolation flag — its brief names the workspace dir. The
|
||||||
|
Agent tool's `isolation: worktree` makes a *git* worktree, where jj
|
||||||
|
cannot run; never combine it with jj mode. Builder edits
|
||||||
|
auto-snapshot into `charon-NNN@` — no commit discipline needed.
|
||||||
|
- **git**: spawn the builder with `isolation: worktree`. The brief
|
||||||
|
MUST end with "commit your work on this branch" — uncommitted
|
||||||
|
worktree changes cannot be integrated.
|
||||||
|
|
||||||
|
## Builder brief (Agent prompt; isolation per mode above)
|
||||||
|
|
||||||
```
|
```
|
||||||
Goal: implement blueprint NNN exactly — no more, no less.
|
Goal: implement blueprint NNN exactly — no more, no less.
|
||||||
|
Work in: <jj: ../charon-NNN | git: your worktree (already isolated)>.
|
||||||
Read first: OKF/blueprints/NNN-<slug>.md, OKF/index.md,
|
Read first: OKF/blueprints/NNN-<slug>.md, OKF/index.md,
|
||||||
<OKF pages the blueprint references, by path>.
|
<OKF pages the blueprint references, by path>.
|
||||||
Process: follow skills/loop/weave/SKILL.md steps 1–2 (Frame, Build via
|
Process: follow ~/.claude/skills/weave/SKILL.md steps 1–2 (Frame,
|
||||||
skills/engineering/bdd/SKILL.md) for this one blueprint. Stop after
|
Build via ~/.claude/skills/bdd/SKILL.md) for this one blueprint.
|
||||||
green — review, seal, and status flips belong to the orchestrator.
|
Stop after green — review, seal, and status flips belong to the
|
||||||
|
orchestrator.
|
||||||
Constraints: <blueprint constraints; repo conventions from CLAUDE.md>.
|
Constraints: <blueprint constraints; repo conventions from CLAUDE.md>.
|
||||||
Verify: run `<blueprint's Verify command>`; paste its output in your
|
Verify: run `<blueprint's Verify command>`; paste its output in your
|
||||||
report.
|
report.
|
||||||
|
<git mode only: When done, `git add -A && git commit` on your
|
||||||
|
worktree's branch — uncommitted work is lost.>
|
||||||
Report: files touched, scenarios covered, Verify output, anything that
|
Report: files touched, scenarios covered, Verify output, anything that
|
||||||
contradicts the blueprint (stop and report instead of improvising).
|
contradicts the blueprint (stop and report instead of improvising).
|
||||||
```
|
```
|
||||||
@ -38,13 +56,33 @@ Report: files touched, scenarios covered, Verify output, anything that
|
|||||||
|
|
||||||
```
|
```
|
||||||
Role: <axis> reviewer for blueprint NNN. Read-only — change nothing.
|
Role: <axis> reviewer for blueprint NNN. Read-only — change nothing.
|
||||||
Read first: skills/<category>/<axis>/SKILL.md (your criteria),
|
Your criteria, verbatim from the <axis> skill — apply these and
|
||||||
OKF/blueprints/NNN-<slug>.md, then the diff: `jj diff` in <worktree>.
|
nothing else:
|
||||||
|
=== CRITERIA START ===
|
||||||
|
<axis SKILL.md body: frontmatter, "When to use", and "See also"
|
||||||
|
stripped; everything else verbatim>
|
||||||
|
=== CRITERIA END ===
|
||||||
|
Read: OKF/blueprints/NNN-<slug>.md, then the diff:
|
||||||
|
<jj: `jj diff -r charon-NNN@` from the main repo
|
||||||
|
| git: `git -C <worktree> add -A -N && git -C <worktree> diff HEAD`
|
||||||
|
(plain `git diff` misses untracked files)>.
|
||||||
Report findings only, one line each:
|
Report findings only, one line each:
|
||||||
<file>:<line> — <severity: blocker|major|minor> — <problem> — <fix>.
|
<file>:<line> — <severity: blocker|major|minor> — <problem> — <fix>.
|
||||||
No praise, no scope creep. Empty list = pass.
|
No praise, no scope creep. Empty list = pass.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- The orchestrator Reads each axis SKILL.md once per sitting and
|
||||||
|
inlines it — briefs must be self-contained. Subagent-side skill
|
||||||
|
paths are fragile (worktrees and remote runners may not see
|
||||||
|
`~/.claude/skills/`; `disable-model-invocation` axes are invisible
|
||||||
|
to a subagent's Skill tool).
|
||||||
|
- Strip only frontmatter, `## When to use`, `## See also`. Everything
|
||||||
|
else goes in **verbatim — never summarize**: the axes are
|
||||||
|
recall-biased checklists; paraphrase destroys their recall.
|
||||||
|
- Builder briefs still reference weave/bdd by path — process skills
|
||||||
|
are too long to inline, and the builder always runs on the
|
||||||
|
orchestrator's machine.
|
||||||
|
|
||||||
## Finding merge (orchestrator → builder fix message)
|
## Finding merge (orchestrator → builder fix message)
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -56,6 +94,18 @@ Re-run `<Verify command>` after fixes; paste output.
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Dedupe identical findings across axes; keep the highest severity.
|
- Dedupe identical findings across axes; keep the highest severity.
|
||||||
|
|
||||||
|
## Integration (per mode, orchestrator only, after reviews clean)
|
||||||
|
|
||||||
|
- **jj**: work is already a commit in the shared store —
|
||||||
|
`jj squash --from charon-NNN@ --into <dest>` (or `jj rebase`), then
|
||||||
|
`jj workspace forget charon-NNN` and remove the dir. Parallel
|
||||||
|
builders → run `jj workspace update-stale` in the main workspace
|
||||||
|
first. Conflicts → resolve-conflicts skill.
|
||||||
|
- **git**: merge the builder's worktree branch into the mainline, then
|
||||||
|
`git worktree remove` it.
|
||||||
|
- Either mode: run the blueprint's Verify in the **main workspace
|
||||||
|
after integrating** — pre-integration green does not count.
|
||||||
- Conflicts (winnow "delete" vs angles "keep"): sieve's always-pass
|
- Conflicts (winnow "delete" vs angles "keep"): sieve's always-pass
|
||||||
exceptions win — validation, error handling preventing data loss,
|
exceptions win — validation, error handling preventing data loss,
|
||||||
security, accessibility, explicitly requested behaviour.
|
security, accessibility, explicitly requested behaviour.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user