@jaybeeuu/agent-cortex 2.7.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +412 -0
- package/README.md +87 -8
- package/agents/README.md +4 -4
- package/agents/guppi/agent.md +162 -0
- package/agents/guppi/claude/frontmatter.json +6 -0
- package/agents/guppi/pi/frontmatter.json +6 -0
- package/agents/plan/agent.md +6 -0
- package/agents/ralph/agent.md +17 -16
- package/agents/ralph/claude/wake.md +4 -4
- package/agents/ralph/pi/wake.md +15 -20
- package/agents/ralph-plan/agent.md +6 -0
- package/bin/agent-cortex.mjs +20 -1
- package/bin/installers/claude.mjs +1 -20
- package/bin/installers/pi.mjs +8 -2
- package/extensions/interrupt-bookmark/README.md +129 -0
- package/extensions/interrupt-bookmark/index.test.ts +717 -0
- package/extensions/interrupt-bookmark/index.ts +354 -0
- package/extensions/interrupt-bookmark/package.json +20 -0
- package/extensions/post-merge-watch/README.md +133 -0
- package/extensions/post-merge-watch/index.test.ts +247 -0
- package/extensions/post-merge-watch/index.ts +123 -0
- package/extensions/post-merge-watch/package.json +16 -0
- package/extensions/post-merge-watch/watch.test.ts +469 -0
- package/extensions/post-merge-watch/watch.ts +431 -0
- package/extensions/session-clear/README.md +74 -0
- package/extensions/session-clear/index.test.ts +524 -0
- package/extensions/session-clear/index.ts +159 -0
- package/extensions/session-clear/package.json +16 -0
- package/extensions/skill-stats/README.md +84 -3
- package/extensions/skill-stats/index.ts +62 -3
- package/extensions/skill-stats/package.json +1 -1
- package/extensions/skill-stats/rollup.test.ts +643 -0
- package/extensions/skill-stats/rollup.ts +415 -0
- package/extensions/skill-stats/timeline.ts +101 -0
- package/lib/cli.mjs +42 -1
- package/lib/self-update.mjs +553 -0
- package/package.json +1 -1
- package/scripts/lib/manifest.mjs +29 -0
- package/skills/engineering/implement-task/SKILL.md +124 -0
- package/skills/engineering/tdd/SKILL.md +2 -0
- package/skills/planning/create-task/REFERENCE.md +15 -6
- package/skills/planning/create-task/SKILL.md +1 -1
- package/skills/planning/create-task/pipeline.json +8 -0
- package/skills/planning/create-task/scripts/create-chores.mjs +27 -18
- package/skills/planning/create-task/templates/code.md +8 -3
- package/skills/planning/create-task/templates/document.md +8 -3
- package/skills/planning/create-task/templates/fix.md +8 -3
- package/skills/planning/create-task/templates/housekeeping.md +8 -4
- package/skills/planning/create-task/templates/post-merge.md +67 -0
- package/skills/planning/create-task/templates/review.md +8 -3
- package/skills/planning/create-task/templates/verify.md +8 -3
- package/skills/productivity/bd-tool/SKILL.md +55 -0
- package/skills/review/review-defects/EXAMPLES.md +198 -0
- package/skills/review/review-defects/SKILL.md +121 -0
- package/skills/review/review-report/EXAMPLES.md +114 -0
- package/skills/review/review-report/SKILL.md +138 -0
- package/skills/review/review-report/scripts/report.mjs +1032 -0
- package/skills/style/style-tests/EXAMPLES.md +30 -0
- package/skills/style/style-tests/SKILL.md +10 -6
- package/skills/workflow/hitl-queue/SKILL.md +134 -0
- package/skills/workflow/hitl-queue/scripts/queue.mjs +626 -0
- package/skills/workflow/plan/SKILL.md +27 -3
- package/skills/workflow/prioritise-work/CHALLENGE.md +139 -0
- package/skills/workflow/prioritise-work/SKILL.md +150 -0
- package/skills/workflow/prioritise-work/scripts/challenge.mjs +505 -0
- package/skills/workflow/prioritise-work/scripts/strategy.mjs +566 -0
- package/skills/workflow/prioritise-work/templates/strategy.md +61 -0
- package/skills/workflow/ralph/REFERENCE.md +124 -27
- package/skills/workflow/ralph/SKILL.md +24 -15
- package/skills/workflow/ralph/scripts/post-merge-check.mjs +651 -0
- package/skills/workflow/run-pipeline-stage/SKILL.md +37 -22
- package/skills/workflow/run-pipeline-stage/playbooks/code.md +14 -8
- package/skills/workflow/run-pipeline-stage/playbooks/document.md +2 -2
- package/skills/workflow/run-pipeline-stage/playbooks/fix.md +2 -2
- package/skills/workflow/run-pipeline-stage/playbooks/housekeeping.md +1 -1
- package/skills/workflow/run-pipeline-stage/playbooks/post-merge.md +54 -0
- package/skills/workflow/run-pipeline-stage/playbooks/review.md +37 -3
- package/skills/workflow/run-pipeline-stage/playbooks/verify.md +2 -2
- package/skills/workflow/run-pipeline-stage/prompts/stage-runner.md +55 -11
- package/skills/workflow/run-pipeline-stage/scripts/recover-brief.mjs +805 -0
- package/skills/workflow/run-pipeline-stage/scripts/trail-entry.mjs +702 -0
- package/skills/workflow/score-bead/FORMAT.md +73 -0
- package/skills/workflow/score-bead/SKILL.md +112 -0
- package/skills/workflow/score-bead/scripts/rice.mjs +664 -0
- package/skills/workflow/using-agent-skills/SKILL.md +21 -8
- package/token-map.README.md +27 -0
- package/token-map.json +16 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,417 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7bdeb85: Extend the closed `defect:<class>` vocabulary in `review-defects` with four classes, so a reviewer
|
|
8
|
+
never has to force-fit a finding into a class that does not describe it.
|
|
9
|
+
|
|
10
|
+
`defect:unsafe-instruction` covers shipped text that, followed on an arbitrary machine, could
|
|
11
|
+
destroy data or run something dangerous: destructive commands, force-pushes, credential handling,
|
|
12
|
+
overwriting user config. `defect:ambiguous-rule` covers wording a reasonable agent reads two ways,
|
|
13
|
+
especially a phrase true of one context that reads as true of another. `defect:silent-degradation`
|
|
14
|
+
covers a path that fails quietly or passes vacuously: a skipped check reported as success, a null
|
|
15
|
+
mapping silently dropping a token, a guard that cannot fail. `defect:unclassified` is the escape
|
|
16
|
+
hatch for a finding that matches no class.
|
|
17
|
+
|
|
18
|
+
The table gains a **Distinct from** column, because the near neighbours are where a misclassification
|
|
19
|
+
happens: drift is _stale_, while ambiguity is _readable two ways_; `test-cannot-fail` is one
|
|
20
|
+
assertion that cannot bite, while silent degradation is any path that cannot report.
|
|
21
|
+
|
|
22
|
+
`defect:unclassified` carries an obligation rather than being a pass: the reviewer says no class
|
|
23
|
+
fits in the rejection text, files a bead proposing the class with the finding as its case, and names
|
|
24
|
+
that bead. Without the gap bead the label degrades the aggregate silently, which is the failure the
|
|
25
|
+
class exists to prevent. The vocabulary stays closed — a class is added by changing the skill with
|
|
26
|
+
the owner, never invented inside a review.
|
|
27
|
+
|
|
28
|
+
`review-report` gains an owning-skill mapping for the four classes (the authoring skill for unsafe
|
|
29
|
+
and ambiguous text, the test and stage skills for a quiet path, and `review-defects` itself for an
|
|
30
|
+
unclassified finding), and `review-defects` gains one real worked example per new class.
|
|
31
|
+
|
|
32
|
+
- 754e0eb: Add the **guppi** agent — the human-in-the-loop counterpart to ralph. It is a resident,
|
|
33
|
+
propose-only collaborator that decides what gets planned, loads `prioritise-work`, `plan`,
|
|
34
|
+
`hitl-collab`, `grill-me` and `flesh-out-idea` on demand, and never executes AFK work, merges or
|
|
35
|
+
pushes. `using-agent-skills` now routes "what should I work on" and HITL collaboration to guppi,
|
|
36
|
+
and `plan` cross-references it as the entry point that decides what gets planned.
|
|
37
|
+
- 1c786be: Add guppi's **interrupt protocol**: checkpoint, record, rewind, resume. guppi takes a resume point at
|
|
38
|
+
the last clean boundary, records the interruption as the bead type its content implies — a meeting
|
|
39
|
+
note becomes an idea or task bead through `record-idea`/`create-task`, PR feedback for ralph becomes a
|
|
40
|
+
task bead through `create-task` carrying the pull request's reference (with a `handoff` document
|
|
41
|
+
through `hitl-collab` when a human must act on it, and no peer message at all, because ralph reads the
|
|
42
|
+
bead from the tracker), a Slack todo becomes a task bead through `create-task`, and a question only a
|
|
43
|
+
human can answer becomes an `execution:hitl` decision bead — rewinds to the checkpoint, and resumes
|
|
44
|
+
with one sentence naming the task and the recorded bead. The record completes before the rewind, so a
|
|
45
|
+
failed record is never lost; a failed rewind continues in the current context and says so rather than
|
|
46
|
+
silently carrying the interruption. Nothing is written to a scratch file and no branch is deleted —
|
|
47
|
+
the abandoned branch is the audit trail. The rewind mechanism is forked through the existing
|
|
48
|
+
`interrupt_rewind` token row (`interrupt_resume` on pi, `/rewind` on claude), so the four-step prose
|
|
49
|
+
is byte-identical across harnesses; `test/guppi-interrupt-render.test.mjs` stages both installs to
|
|
50
|
+
prove it.
|
|
51
|
+
- fde0b9e: Make clearing the context safe in the **guppi** agent: write memory first, then recover the theme
|
|
52
|
+
from the tracker.
|
|
53
|
+
|
|
54
|
+
guppi now requires a memory write before any clear — what was decided and why, what is open, and
|
|
55
|
+
what the next session needs — into both the bead trail (`bd note`) and `bd remember` under a
|
|
56
|
+
`--key` naming the theme. `bd remember` stores into the workspace's own tracker database, so the
|
|
57
|
+
memory is already project-scoped; the key is a theme slug, and re-storing under it updates the
|
|
58
|
+
memory in place rather than accumulating stale copies.
|
|
59
|
+
|
|
60
|
+
The recovery rule states the exact read sequence — `bd prime` for the memories, `bd children
|
|
61
|
+
<epic>` for the theme, `bd show` per child for the trail, `bd provenance log` for the refs — so a
|
|
62
|
+
fresh session reconstructs a theme's state without a transcript.
|
|
63
|
+
|
|
64
|
+
Both rules are written against **"a clear"**, not against a command name: `/clear` is named as
|
|
65
|
+
today's mechanism and the self-flushing clear as its intended replacement, so the rules survive the
|
|
66
|
+
mechanism changing. A clear with no memory write is stated as a defect the agent names rather than
|
|
67
|
+
performing silently.
|
|
68
|
+
|
|
69
|
+
- 40598b9: Add the `interrupt-bookmark` extension: two tools around pi's own tree navigation, so an interruption
|
|
70
|
+
stops dragging its turns into the context the original task then has to carry. `interrupt_checkpoint`
|
|
71
|
+
returns the current leaf id as a resume point. `interrupt_resume { checkpointId, summary }` rewinds
|
|
72
|
+
there, keeps the abandoned branch under a branch summary labelled `interrupt`, and reports the summary
|
|
73
|
+
entry. The summary comes from pi's own navigation summariser — the extension makes no model call and
|
|
74
|
+
deletes nothing. Navigation is command-only in pi (`waitForIdle()` and `navigateTree()` live on
|
|
75
|
+
`ExtensionCommandContext`; a tool call is always inside a streaming turn), so the resume tool
|
|
76
|
+
validates the request, ends the turn, and an `agent_settled` handler dispatches the command that
|
|
77
|
+
rewinds — the pattern pi documents for a tool that must reach a command-only API. An unknown
|
|
78
|
+
checkpoint id fails naming the id and writes nothing; navigation is retried exactly once after a
|
|
79
|
+
fresh wait for idle, and a second failure reports the reason and leaves the conversation unchanged.
|
|
80
|
+
`token-map.json` gains the `interrupt_rewind` row — `interrupt_resume` on pi, Claude Code's `/rewind`
|
|
81
|
+
command on claude — with a note recording why the two values differ in kind and why the checkpoint
|
|
82
|
+
half is never tokenised.
|
|
83
|
+
- 05573b2: Add the `prioritise-work` skill, the `strategy.md` template it copies, and the `strategy.mjs` script
|
|
84
|
+
that validates and versions it. The strategy is a committed file in the consuming repository's
|
|
85
|
+
working-docs root (`.agent-cortex/working-docs/strategy.md`, overridable with `--file`), never a bead
|
|
86
|
+
and never a scratch note — the skill performs no tracker writes at all. `init` writes the template
|
|
87
|
+
stamped with the creation date and refuses to overwrite; `validate` checks a positive-integer version,
|
|
88
|
+
a `YYYY-MM-DD` calendar date, and five required sections — themes, value, confidence, out-of-scope and effort
|
|
89
|
+
calibration — naming each missing, empty or malformed one, and prints the rubric to stdout only when
|
|
90
|
+
the file passes, so a scorer can never read a stale or malformed rubric; `bump` refuses an invalid
|
|
91
|
+
file, raises the version by one and records today's date. The five interview questions map one-to-one
|
|
92
|
+
onto the five sections, and `using-agent-skills` routes ranking questions to the new skill.
|
|
93
|
+
- c77cb17: Treat a challenged priority as a strategy review, never a silent reorder. `prioritise-work` gains
|
|
94
|
+
`CHALLENGE.md` — the sequence from "this should be higher" to a changed rubric — and a second
|
|
95
|
+
script, `challenge.mjs record`, which refuses the tempting shortcut: an order that moved while the
|
|
96
|
+
strategy version stayed put exits 1 and writes nothing. It reads the strategy through the same
|
|
97
|
+
validator, diffs the ranked ids by position so the movement is deterministic, and prints one
|
|
98
|
+
bead-trail entry in `run-pipeline-stage`'s trail shape, carrying the words that raised the
|
|
99
|
+
challenge and the reasoning that answered it — including when the answer is "no change to the
|
|
100
|
+
rubric", which is a valid outcome that must still leave a trace. `--out <path>` writes that entry
|
|
101
|
+
to a file, so the documented append is `bd note <bead> --file <path>`: the entry repeats the human's
|
|
102
|
+
own words, and a shell string would parse them. `strategy.mjs bump` now requires
|
|
103
|
+
`--reason` and appends `- <date> v<n>: <reason>` to the strategy file's new `## Change log`
|
|
104
|
+
section, and `validate` fails when the newest entry names a version the header does not, so a
|
|
105
|
+
version cannot move without a recorded reason.
|
|
106
|
+
- f2f68c8: Add the `hitl-queue` skill: one command ranks the open `execution:hitl` beads by RICE ×
|
|
107
|
+
(1 + ln(1 + transitively blocked dependents)) × 1.5 when in progress, printing every row's
|
|
108
|
+
components, multipliers and what each answer unblocks. The `plan` skill, the `plan` agent and the
|
|
109
|
+
`ralph-plan` agent report that queue before dispatching or proposing anything.
|
|
110
|
+
- c644523: Add the `review-report` skill: one report from the `defect:<class>` labels a project's reviews
|
|
111
|
+
applied. `scripts/report.mjs` reads the tracker twice, both read-only and both with `--all` — the
|
|
112
|
+
defect query `bd list --label-pattern 'defect:*' --all` and the chore tree — and prints the top three
|
|
113
|
+
classes with counts, two example bead ids and the shipped skill that owns each failing rule, the
|
|
114
|
+
first-pass review rate derived from `stage:review` chore counts per parent, fix rounds grouped by the
|
|
115
|
+
stage the fresh chore re-runs, and the change against a report kept at `--baseline`. The class
|
|
116
|
+
vocabulary is not duplicated: the script parses the closed list out of `review-defects/SKILL.md`, so a
|
|
117
|
+
class that appears as a label without being in that table is reported as vocabulary drift and never
|
|
118
|
+
counted. Filing is a separate `--file` step that runs `gh issue create` with an argv array; without
|
|
119
|
+
the flag the script makes no network call, and it never pushes, opens a pull request or merges. The
|
|
120
|
+
feedback repository is configuration — `--repo`, then `AGENT_CORTEX_FEEDBACK_REPO`, then the
|
|
121
|
+
`repository` field of the manifest the running install ships (the staged pi package's
|
|
122
|
+
`package.json`, whose manifest now carries that field, or the staged Claude plugin's
|
|
123
|
+
`plugin.json`) — so no repository is hardcoded, a consuming project's own manifest is never used,
|
|
124
|
+
and a copy with no resolvable manifest fails with a message instead of filing somewhere wrong.
|
|
125
|
+
The report is printed before the filing target is resolved, so that failure leaves the measurement
|
|
126
|
+
on stdout and the reason on stderr. Absent data
|
|
127
|
+
is never dressed as a measurement: no label, a single label, no review chore and no baseline each get
|
|
128
|
+
a sentence saying so rather than a zero or a trend. `review-defects` gains a link to it.
|
|
129
|
+
- ba52582: Add the `score-bead` skill and its `rice.mjs` script: RICE scoring for one bead, stored in
|
|
130
|
+
tracker metadata, with priority banding kept as a separate reviewable step.
|
|
131
|
+
|
|
132
|
+
`score <id> --reach --impact --confidence --effort --rationale` computes
|
|
133
|
+
`reach × impact × confidence ÷ effort` to one decimal and writes
|
|
134
|
+
`{"rice":{"reach","impact","confidence","effort","score","strategyVersion","assessedAt","rationale"}}`
|
|
135
|
+
with `bd update <id> --metadata`, so `bd show` renders components and total side by side and a
|
|
136
|
+
reader can redo the arithmetic. The strategy is read through `prioritise-work`'s validator and
|
|
137
|
+
path resolver — one definition of a valid rubric, one location, `--file` still honoured — and the
|
|
138
|
+
recorded `strategyVersion` is the file's own version, read after it validated. A missing or
|
|
139
|
+
invalid strategy refuses the score before the first `bd` call, so a refusal writes nothing at
|
|
140
|
+
all; a component outside its range (`confidence` outside `0..1`, `effort` at zero) is refused the
|
|
141
|
+
same way.
|
|
142
|
+
|
|
143
|
+
Re-scoring keeps history: the rationale carries the current argument followed by one `[prior]`
|
|
144
|
+
line per replaced score — old total, components, strategy version and date — so a version bump
|
|
145
|
+
records the new version without discarding the old arithmetic.
|
|
146
|
+
|
|
147
|
+
`band <id>` is read-only. It prints the priority the score implies plus the `bd update` command
|
|
148
|
+
that would apply it, and the skill applies that command only after a reviewer accepts it. P0 is
|
|
149
|
+
never produced by a band, and a bead already at P0 is refused before a proposal exists.
|
|
150
|
+
|
|
151
|
+
`using-agent-skills` routes scoring and banding questions to the new skill.
|
|
152
|
+
|
|
153
|
+
- e1f5768: Add long-range retention to the `skill-stats` extension: keep low-fidelity data for a long time and
|
|
154
|
+
high-fidelity data for a short time. Usage is now also recorded into a per-day, per-skill rollup
|
|
155
|
+
(loaded / invoked / read counts plus the distinct projects seen that day) in
|
|
156
|
+
`~/.pi/agent-cortex/skill-usage-daily.json`, pruned to a 365-day window on every write and overridable
|
|
157
|
+
with `AGENT_CORTEX_SKILL_STATS_RETENTION_DAYS`. `/skill-stats timeline` renders per-day, per-week and
|
|
158
|
+
per-month counts and distinct skills from the rollups alone — no session-transcript scan. History that
|
|
159
|
+
predates the rollups is reported as unavailable rather than zero-filled, and a transcript backfill is
|
|
160
|
+
deliberately left out. The existing counters, the 200-event ring, the `/skill-stats` report output and
|
|
161
|
+
`/skill-usage-reset`'s confirmation flow are unchanged; the reset now also clears the rollups. Each
|
|
162
|
+
record is fixed-size — counts, at most 50 project paths per skill-day, each path truncated to 120
|
|
163
|
+
characters — and `saveRollups` enforces a hard 2,920,000-byte ceiling on every write (365 days x 40
|
|
164
|
+
skills x 200 bytes per skill-day). A write that would exceed it drops the per-skill-day project lists
|
|
165
|
+
first, keeping every count and every day, and drops the oldest days only if the counts alone exceed
|
|
166
|
+
the ceiling; `saveRollups` returns what it gave up. Every shed is also recorded in the file (a
|
|
167
|
+
`"shed"` key holding the running totals and the day of the most recent shedding write) and
|
|
168
|
+
`/skill-stats timeline` renders it, so
|
|
169
|
+
the user is told which project lists and how many days went instead of losing them silently. When a
|
|
170
|
+
shed drops whole days `since` moves to the oldest day the file still holds, so the header never claims
|
|
171
|
+
a day that was deleted; days that merely age out of the retention window keep the first-ever `since`.
|
|
172
|
+
A rollup file written before the `"shed"` key existed still loads and renders unchanged. The suite
|
|
173
|
+
fills every cap at once, asserts 22,033,268 raw bytes are written as at most 2,920,000, and asserts a
|
|
174
|
+
second year of data leaves the file unchanged.
|
|
175
|
+
|
|
176
|
+
## 2.8.0
|
|
177
|
+
|
|
178
|
+
### Minor Changes
|
|
179
|
+
|
|
180
|
+
- 683808c: State the bead-state rule in `bd-tool` and `AGENTS.md`: operational state (progress, what a stage
|
|
181
|
+
learned, the decisions taken, branch/PR/commit/worktree refs) lives in bead fields, while durable
|
|
182
|
+
committable documents stay files, and `handoff.md` plus the working-docs artefact directory are
|
|
183
|
+
unchanged. The built-in statuses carry the working state — `bd statuses` lists all seven, so no
|
|
184
|
+
state label is added. What happened goes in the trail with `bd note`, which appends. The text names
|
|
185
|
+
`stage=` as forbidden for state, with the reason: `bd set-state` removes the existing label for the
|
|
186
|
+
dimension it sets, so it would rewrite a chore's route. Ship this in the same release as the
|
|
187
|
+
removal of the `ralph-*.log` and `progress.md` writer sites (`agnt-ctx-ul91.1`): a published
|
|
188
|
+
version that states the rule while a skill still writes progress files would contradict itself.
|
|
189
|
+
- 87ebb46: Give the pipeline one shared writer for the bead trail, and stop the file-based progress logs.
|
|
190
|
+
|
|
191
|
+
`skills/workflow/run-pipeline-stage/scripts/trail-entry.mjs` appends one checkpoint to a bead's
|
|
192
|
+
notes with `bd note` and records the refs the caller names as provenance events. Every entry
|
|
193
|
+
carries the three mandatory fields — Outcome (`done`/`blocked`/`partial`), Evidence (a test or lint
|
|
194
|
+
result, the commit, command output), and What is left — so a fresh session resumes from
|
|
195
|
+
`bd show <id>` alone.
|
|
196
|
+
|
|
197
|
+
A `--commit` ref is resolved through `git rev-parse` to the full 40-character lowercase SHA before
|
|
198
|
+
recording, because `bd provenance record --ref-kind git-sha` refuses an abbreviated one; a ref that
|
|
199
|
+
does not resolve records nothing. Transient database failures — `failed to open database ...
|
|
200
|
+
context canceled`, the shape two concurrent writers produce on embeddeddolt — are retried with
|
|
201
|
+
bounded backoff, each retry re-reads the bead first so a write that landed before its call reported
|
|
202
|
+
failure is never duplicated, and no call holds the database across a long operation. Recording is
|
|
203
|
+
idempotent for one writer: the entry carries a fingerprint of its own content, so a repeated fire
|
|
204
|
+
appends nothing. Two concurrent fires of one transition can each append — `bd note` has no
|
|
205
|
+
conditional append — so the pipeline fires each transition from one worker.
|
|
206
|
+
|
|
207
|
+
`run-pipeline-stage` and `ralph` now call that script at every stage transition, and no shipped
|
|
208
|
+
skill, agent, or stage template writes a per-parent log file or a rendered progress view any more.
|
|
209
|
+
Ralph's log polling, its `state.json` `logLine` bookmark, and both wake sections' log-flush
|
|
210
|
+
procedure go with them: progress is read from the bead (`bd show`, `bd provenance log`), which is
|
|
211
|
+
the record the worker writes directly.
|
|
212
|
+
|
|
213
|
+
- 4e1bcc5: Add `implement-task`, the skill that owns the task around the loop: criteria, scope, and proof.
|
|
214
|
+
|
|
215
|
+
`tdd` owns the red-green loop and the `style-*` skills own the standards, but nothing owned the task
|
|
216
|
+
— reading the acceptance criteria, proving each one, staying in scope, and taking only pragmatic
|
|
217
|
+
boy-scout fixes. `implement-task` fills that gap with four load-bearing sections: the criteria →
|
|
218
|
+
evidence table, written before code and filled with observable evidence at Finish; the scope rule,
|
|
219
|
+
where an out-of-scope finding becomes a bead instead of an edit; the boy-scout rule, which allows a
|
|
220
|
+
fix only inside a file the task already touches and only where it serves the task; and the mutation
|
|
221
|
+
check, inherited from `style-tests` and applied to every test that claims a behaviour. A criterion
|
|
222
|
+
with no named check is a blocker, not a guess.
|
|
223
|
+
|
|
224
|
+
The `code` stage playbook now invokes `implement-task` as its first step and routes through it to
|
|
225
|
+
`tdd` and the style skills, `tdd` links to it for criteria and scope rather than carrying those
|
|
226
|
+
rules itself, and `using-agent-skills` routes a task-implementation request to it while leaving a
|
|
227
|
+
bare "write a test for X" on `tdd`.
|
|
228
|
+
|
|
229
|
+
- 27b513b: Fork the planner ↔ ralph peer channel per harness instead of describing it as PI-only. The channel
|
|
230
|
+
now renders through `token-map.json`: `{{TOOL:peer_send}}` and `{{TOOL:peer_list}}` become
|
|
231
|
+
`peer_send` and `peer_list` in a pi install, and Claude Code's built-in `SendMessage` and
|
|
232
|
+
`ListAgents` in a claude install. Both harnesses carry the same seven message kinds and the same
|
|
233
|
+
acknowledgement rule — the kinds table and the reply rule are byte-identical between the two
|
|
234
|
+
renders, and only the `### Transport` subsection differs.
|
|
235
|
+
|
|
236
|
+
Claude Code's cross-session messaging is built in from v2.1.224 (v2.1.234 on native Windows):
|
|
237
|
+
`ListAgents` returns the peers a session can reach with the address of each, and `SendMessage`
|
|
238
|
+
delivers to that address, so a named peer session is addressable and no manual-handoff-only fork is
|
|
239
|
+
needed. `pi-peer`'s `peer_get` and `peer_await` have no Claude Code counterpart, so they are named
|
|
240
|
+
only inside the harness-labelled `pi-peer` runbook: a null mapping would drop the token and leave
|
|
241
|
+
the sentence that named it broken.
|
|
242
|
+
|
|
243
|
+
`test/skill-transport-render.test.mjs` stages both installs and asserts the per-harness rendered
|
|
244
|
+
text, so a harness that loses its mechanism fails the suite rather than silently degrading.
|
|
245
|
+
|
|
246
|
+
- 49b34d7: Document the planner ↔ ralph message convention on top of `@cryptolibertus/pi-peer`. The `ralph`
|
|
247
|
+
skill now publishes its peer identity at start (`PI_PEER_ID=ralph`), answers inbound `handoff`,
|
|
248
|
+
`get` and `ask` messages, and reports `update`/`done`/`blocked`/`failed` to the planner as work
|
|
249
|
+
dispatches, finishes, parks on a human gate or fails. The `plan` skill sends a `handoff` message
|
|
250
|
+
naming the handoff bead once it exists, treats ralph's `blocked` messages as its pending-human
|
|
251
|
+
surface, and keeps the manual instruction as the handoff path for a session with no reachable
|
|
252
|
+
receiver.
|
|
253
|
+
|
|
254
|
+
The shared convention — the kind-to-intent table, the acknowledgement rule, the two-entry
|
|
255
|
+
`.pi/peers.json` requirement and the one-way discovery failure a single entry causes, the
|
|
256
|
+
`.pi/peers.json` and `.pi/peer-*` paths to gitignore, and the rule to send through `peer_send` rather than typing into a
|
|
257
|
+
busy session — lives once in `skills/workflow/ralph/REFERENCE.md` and is cross-referenced from
|
|
258
|
+
`plan`. pi-peer keeps ownership of discovery, delivery, idle wake and the ledger; no registry,
|
|
259
|
+
inbox, watcher or transport is implemented here. The tools are named through `{{TOOL:...}}` tokens so
|
|
260
|
+
one skill text serves both harnesses; the per-harness fork is its own changeset.
|
|
261
|
+
|
|
262
|
+
- 2610b78: Add the `post-merge` pipeline stage and the deterministic check it runs.
|
|
263
|
+
`skills/workflow/ralph/scripts/post-merge-check.mjs` reads `gh run list` for the base branch's merge
|
|
264
|
+
commit and exits `0` passed, `1` failed, `2` inconclusive — no model, no tokens, zero runtime
|
|
265
|
+
dependencies, async only. A failing run files exactly one P1 escalation bead carrying the run URL
|
|
266
|
+
and the failing job name; the `post-merge-run:<id>` marker in its description makes a second run
|
|
267
|
+
file nothing. It never retries, never re-runs the workflow, never reopens the parent, and is
|
|
268
|
+
GitHub-only in v1 (a repository `gh` cannot resolve to a GitHub host, or a commit with no run, is
|
|
269
|
+
inconclusive and files nothing). `create-chores.mjs` pre-creates the chore labelled
|
|
270
|
+
`lifecycle:post-merge`, blocked behind the `lifecycle:feature-pr` gate rather than behind a stage,
|
|
271
|
+
so it becomes ready only once a human merges and closes the gate; a re-run still creates nothing.
|
|
272
|
+
The script reads the repository slug and base branch from `gh repo view`, so no slug or branch is
|
|
273
|
+
baked in. `housekeeping` and `post-merge` are siblings on the gate and neither waits on the other,
|
|
274
|
+
because an inconclusive check must not strand the worktree reclamation.
|
|
275
|
+
- 241ab8f: Add the `post-merge-watch` pi extension: poll the post-merge check and wake an idle session with
|
|
276
|
+
the verdict.
|
|
277
|
+
|
|
278
|
+
`pi --post-merge-watch <bead>` polls
|
|
279
|
+
`skills/workflow/ralph/scripts/post-merge-check.mjs` every 15 s (up to 40 checks) and, when the
|
|
280
|
+
script reports a verdict, sends one message with
|
|
281
|
+
`pi.sendMessage(..., { deliverAs: "followUp", triggerTurn: true })`, so a session that is idle
|
|
282
|
+
starts a turn with the result. The message names the bead, the verdict, the exit code, the reason,
|
|
283
|
+
the run URL, the project, and the number of checks; the same fields ride along as message
|
|
284
|
+
`details`.
|
|
285
|
+
|
|
286
|
+
The extension owns no verdict logic: the check's exit code is the verdict (`0` passed, `1` failed,
|
|
287
|
+
anything else inconclusive, including a timeout kill), and the run URL is forwarded from the
|
|
288
|
+
script's JSON report. It makes no model call, imports pi as types only, registers its CLI flag in
|
|
289
|
+
the extension factory, and spawns no process or writes no state when the flag is absent. Each
|
|
290
|
+
invocation passes `--wait 0`, so the poll interval and the bound live in the extension and a
|
|
291
|
+
stopped watch never blocks on a child process.
|
|
292
|
+
|
|
293
|
+
State lives under `~/.pi/agent-cortex/post-merge-watch/`, one file per project path and bead (the
|
|
294
|
+
name carries a digest of both, so two projects watching one bead never collide), and is removed
|
|
295
|
+
when the watch settles or the session shuts down. The pending timer is unref'd and cancelled on
|
|
296
|
+
shutdown, so an abandoned watch leaves no orphan timer and no state file. The default check script
|
|
297
|
+
is resolved relative to the extension file, so the staged pi package (`extensions/` beside
|
|
298
|
+
`skills/`) needs no hardcoded absolute path; `AGENT_CORTEX_POST_MERGE_CHECK` overrides it. PI only:
|
|
299
|
+
Claude Code uses its own watch tools.
|
|
300
|
+
|
|
301
|
+
- ee5d09f: Fork the post-merge stage's watch per harness instead of leaving a long run unwatched. The stage
|
|
302
|
+
playbook now carries a `## Watch transport` section whose single mechanism name renders through
|
|
303
|
+
`token-map.json`: `{{TOOL:post_merge_watch}}` becomes `post-merge-watch` — this package's own
|
|
304
|
+
extension, which re-runs the check on a timer and wakes an idle session with the verdict — in a pi
|
|
305
|
+
install, and Claude Code's built-in `ScheduleWakeup` tool in a claude install. The stage
|
|
306
|
+
instructions, the three verdicts, the never-retry rule, the escalation rule and the close rule stay
|
|
307
|
+
one authored copy: the two renders differ on exactly one line.
|
|
308
|
+
|
|
309
|
+
The Claude capability is established from the installed binary (2.1.294), not assumed.
|
|
310
|
+
`ScheduleWakeup` is a registered tool whose own description names the case in point — "when actively
|
|
311
|
+
polling external state the harness can't notify you about (a CI run, a deploy, a remote queue), pick
|
|
312
|
+
the delay from how fast that state actually changes" — it takes `delaySeconds` clamped to
|
|
313
|
+
60–3600, `prompt`, `reason`, `noop` and `stop`, and a built-in system reminder says "If polling in a
|
|
314
|
+
loop, use ScheduleWakeup instead of retrying". A live probe was impossible: `claude -p` in this
|
|
315
|
+
environment reports "Not logged in · Please run /login". Because availability is a property of the
|
|
316
|
+
session rather than of the tool's existence, the section also states the fallback in prose — one run
|
|
317
|
+
with `--wait 1800` — so no harness is assumed to have a watcher and neither render loses a name.
|
|
318
|
+
|
|
319
|
+
`test/post-merge-transport-render.test.mjs` stages both installs and asserts the per-harness rendered
|
|
320
|
+
playbook, the byte-identical remainder, and the no-watcher fallback, so a harness that loses its
|
|
321
|
+
mechanism fails the suite rather than silently degrading.
|
|
322
|
+
|
|
323
|
+
- b698f2d: Read a half-finished bead in one bounded command, without opening the transcript.
|
|
324
|
+
|
|
325
|
+
`skills/workflow/run-pipeline-stage/scripts/recover-brief.mjs` is the read side of the bead trail
|
|
326
|
+
that `trail-entry.mjs` writes. One invocation prints what a session needs to continue: status and
|
|
327
|
+
state labels, the newest trail entries with their Evidence and What is left, the provenance refs,
|
|
328
|
+
the blocking dependencies, and the acceptance criteria.
|
|
329
|
+
|
|
330
|
+
The bound is enforced, not promised. `bd show` returns the whole note — no option asks it for the
|
|
331
|
+
last few entries — and it prints 89 lines and about 6.5 KB for a bare bead carrying 20 entries,
|
|
332
|
+
about 120 lines and about 8 KB for a realistic one with acceptance criteria, a blocker, provenance
|
|
333
|
+
refs and a description. The brief prints the newest `--trail` entries (default 3), summarises the
|
|
334
|
+
rest by count, clips any single field, and
|
|
335
|
+
holds its whole output to a line budget (default 40) even when the requested window is wider than
|
|
336
|
+
that: it shrinks the window, names what it left out, and never prints more lines than `--max-lines`.
|
|
337
|
+
|
|
338
|
+
It reads only. Every `bd` call is one of the read subcommands and carries `--readonly`, and a call
|
|
339
|
+
that is not on the allow-list is refused before it reaches the binary, so the brief cannot write a
|
|
340
|
+
note, a status or a provenance event. Each section states plainly when a bead has no trail, no
|
|
341
|
+
refs, no acceptance criteria or no blockers, instead of printing an empty heading.
|
|
342
|
+
|
|
343
|
+
The note is one text blob, so the brief splits it itself: a writer header starts a stamped entry
|
|
344
|
+
whose body runs only over the writer's `Field: value` lines, and any other text is an entry of its
|
|
345
|
+
own. A note appended by hand therefore prints wherever it lands — before a stamped entry, between
|
|
346
|
+
two of them, or after the last one — and the trail count includes it. `next:` claims "no trail
|
|
347
|
+
entry" only when the bead carries no trail, and says the entries record no next step when they
|
|
348
|
+
exist without a `What is left` field.
|
|
349
|
+
|
|
350
|
+
`run-pipeline-stage`, `ralph` and the stage-runner prompt now document the brief as the first read of
|
|
351
|
+
a bead's trail, with `bd show` and `bd provenance log` reserved for the history the window left out.
|
|
352
|
+
|
|
353
|
+
- 1e97223: Rejections now carry data. A review that rejects a bead applies exactly one `defect:<class>` label
|
|
354
|
+
from a closed list of eight classes — `test-unproven`, `test-cannot-fail`, `criteria-unmet`,
|
|
355
|
+
`scope-creep`, `style-violation`, `missing-proof`, `regression`, `docs-drift` — plus the specific
|
|
356
|
+
reason in the rejection text.
|
|
357
|
+
|
|
358
|
+
The new `review-defects` skill defines the vocabulary, with one worked example per class in
|
|
359
|
+
`EXAMPLES.md`. The review playbook instructs one label per rejection, states that a class outside
|
|
360
|
+
the list is a review defect in itself, and says the review that confirms a fix removes the label and
|
|
361
|
+
records the removal in its trail entry. The label classifies the defect; the bead's status still
|
|
362
|
+
says where the work is, so no state label is added. Because the rejected chore is normally already
|
|
363
|
+
closed, the two queries that read the vocabulary pass `--all`: one class with
|
|
364
|
+
`bd list -l defect:<class> --all`, and every defect with `bd list --label-pattern 'defect:*' --all`.
|
|
365
|
+
`bd-tool` indexes the label and points at `review-defects` for the vocabulary and the queries.
|
|
366
|
+
|
|
367
|
+
- 7ce04e0: Add `agent-cortex self-update` (and its `ctx` / `cortex` aliases): update the globally installed CLI
|
|
368
|
+
through the manager that owns the install, then refresh the harness installs with the newly
|
|
369
|
+
installed binary. The owner is inferred from the running entry point's real path — pnpm's
|
|
370
|
+
`global/<v>` and `store/<v>/links` layouts, or npm's `lib/node_modules` — then confirmed by asking
|
|
371
|
+
that manager for its own global listing and matching this package's name and version, so a manager
|
|
372
|
+
on `PATH` is never used in place of the real owner: an unidentified or unconfirmed owner prints the
|
|
373
|
+
exact command and exits non-zero. It reports the installed version (read from the manifest beside
|
|
374
|
+
the entry point), the published version (from the confirmed manager's `view`), the owner, and the
|
|
375
|
+
command, and `--check` stops after the report writing nothing. A registry error is a distinct
|
|
376
|
+
failure that offers no update, and a failed install reports the manager's stderr and runs nothing
|
|
377
|
+
after it. Every process is spawned with an argv array (`execFile` / `spawn`), never a shell string.
|
|
378
|
+
- 2624dce: `self-update` now reports the version boundary and only refreshes when the CLI changed. After a
|
|
379
|
+
successful install it reads the version the newly installed binary reports and prints
|
|
380
|
+
`cli <before> → <after>`, then hands the terminal to that binary's `update -a` and exits with
|
|
381
|
+
the refresh's own exit code, so a failed refresh is visible to the caller. The refresh is skipped in
|
|
382
|
+
three cases: `--check`, a failed update, and an install already at the published version (which now
|
|
383
|
+
also installs nothing and points at `agent-cortex update -a` instead). A refresh that cannot start
|
|
384
|
+
prints the reason and the exact command to run by hand instead of exiting 1 silently. The README,
|
|
385
|
+
`docs/dev-loop.md` and `--help` document the act-by-default behaviour, `--check`, the owner
|
|
386
|
+
detection rule, and the re-exec chain with its failure output.
|
|
387
|
+
- 8925019: Add the `session-clear` extension, which registers `/clear` in pi: keep the session display name,
|
|
388
|
+
model, thinking level, and active agent, and drop the transcript context. It captures the identity
|
|
389
|
+
as plain data, replaces the session with `ctx.newSession({ parentSession })` so the cleared session
|
|
390
|
+
stays the parent in `/tree` and `/resume`, then the replacement instance re-applies the name and
|
|
391
|
+
restores the model and thinking level only when they differ from the replacement's own values. It
|
|
392
|
+
appends a `session-clear` provenance entry, reports the clear in one line, never prompts, never
|
|
393
|
+
summarises, and never deletes the cleared session file. PI-only: Claude Code already ships `/clear`,
|
|
394
|
+
so the audit in `docs/claude-hooks.md` records no hook port.
|
|
395
|
+
- 0936de5: Make a test's name an assertion contract, and require a mutation check before a test is done.
|
|
396
|
+
|
|
397
|
+
`style-tests` now states that every clause of a test name must be an assertion: a count in the name
|
|
398
|
+
asserts a count, a state asserts that state, and a "not" asserts the absence. The Workflow gains the
|
|
399
|
+
mutation check — disable the claimed behaviour and confirm each named test fails — and Red Flags
|
|
400
|
+
names the case that motivated it, a test named "one notice" proven only by `toBeDefined()`. The
|
|
401
|
+
worked pair lives in `EXAMPLES.md` under _A test name is a claim_. The review playbook now requires
|
|
402
|
+
the reviewer to map each clause of a changed test's name to the assertion that proves it, to reject a
|
|
403
|
+
test whose name outruns its assertions, and to block a test change that carries no evidence the
|
|
404
|
+
mutation check ran.
|
|
405
|
+
|
|
406
|
+
### Patch Changes
|
|
407
|
+
|
|
408
|
+
- 82dbed0: A stop that needs a human decision becomes a bead, not a label: `bd-tool` and `AGENTS.md` now say
|
|
409
|
+
to create an `execution:hitl` task carrying the question, then make the waiting bead depend on it
|
|
410
|
+
with `bd dep add <waiting> <decision>`. The waiting bead leaves `bd ready` while the decision
|
|
411
|
+
becomes work a human can take, so one answer releases work that is already scoped. `--status
|
|
412
|
+
blocked` is kept for a stop no bead can carry, such as a fix-round cap, and `bd note` records the
|
|
413
|
+
stop and its reason.
|
|
414
|
+
|
|
3
415
|
## 2.7.0
|
|
4
416
|
|
|
5
417
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -11,6 +11,7 @@ agent-cortex/
|
|
|
11
11
|
│ ├── ralph/ # composable form (shared agent.md + per-harness pi/, claude/)
|
|
12
12
|
│ ├── plan/ # "
|
|
13
13
|
│ ├── ralph-plan/ # "
|
|
14
|
+
│ ├── guppi/ # "
|
|
14
15
|
│ └── strategy/ # "
|
|
15
16
|
├── skills/ # Skills (grouped by domain) — shared by all harnesses
|
|
16
17
|
│ ├── engineering/ # tdd, improve-codebase-architecture, …
|
|
@@ -81,7 +82,8 @@ temp-dir install plus structural checks:
|
|
|
81
82
|
the whole plugin — every skill and agent in it — with that one field. Hand-authored
|
|
82
83
|
extras — `.mcp.json` and `scripts/` — are copied into every install from the `claude-extras/`
|
|
83
84
|
dir, which is their canonical store. See `docs/claude-hooks.md` for the
|
|
84
|
-
extension→hook mapping and the rejections (auto-name, agent-guardrails, skill-stats, subagent, agent-modes
|
|
85
|
+
extension→hook mapping and the rejections (auto-name, agent-guardrails, skill-stats, subagent, agent-modes,
|
|
86
|
+
session-clear, post-merge-watch).
|
|
85
87
|
|
|
86
88
|
Edit the sources (`agents/<name>/` composable dirs, `skills/**`,
|
|
87
89
|
`hooks/claude/`, `claude-extras/`, `package.json`), never anything under the materialised
|
|
@@ -206,8 +208,8 @@ The staged package contains:
|
|
|
206
208
|
|
|
207
209
|
| Path | Contents |
|
|
208
210
|
| --- | --- |
|
|
209
|
-
| `package.json` | pi manifest — `keywords: ["pi-package"]`, `pi.extensions` + `pi.skills
|
|
210
|
-
| `agents/` | composed flat agents (ralph, plan, ralph-plan, strategy) with `{{TOOL:...}}` / `{{PATH:...}}` substituted — the shipped `agent-modes` extension resolves them from the package root |
|
|
211
|
+
| `package.json` | pi manifest — `keywords: ["pi-package"]`, `pi.extensions` + `pi.skills`, and `repository` (this package's origin, so a shipped skill can resolve it without a checkout); the version tracks the package |
|
|
212
|
+
| `agents/` | composed flat agents (ralph, plan, ralph-plan, strategy, guppi) with `{{TOOL:...}}` / `{{PATH:...}}` substituted — the shipped `agent-modes` extension resolves them from the package root |
|
|
211
213
|
| `skills/` | token-substituted skill copies (real files, never symlinks) |
|
|
212
214
|
| `docs/` | the repository documents those skills read (currently `docs/skills/skill-anatomy.md`), copied verbatim once per install so the reference resolves on a machine without the checkout |
|
|
213
215
|
| `extensions/` | copy of the repo `extensions/` tree — imports nothing from pi's runtime except the host-aliased `typebox`, so pi loads it from any directory |
|
|
@@ -287,7 +289,7 @@ instructions file, leaving the rest of that file — and a `.bak` copy — intac
|
|
|
287
289
|
### Claude Code plugin (separate)
|
|
288
290
|
|
|
289
291
|
A plain `agent-cortex install claude` **materialises** the plugin into the home install
|
|
290
|
-
root `~/.agent-cortex/claude` — **
|
|
292
|
+
root `~/.agent-cortex/claude` — **5 agents** (`strategy`, `plan`, `ralph-plan`, `ralph`, `guppi`),
|
|
291
293
|
**34 skills** (copied flat per skill, `{{TOOL:...}}` / `{{PATH:...}}` token-substituted — no
|
|
292
294
|
symlinks), `SessionStart` + `Notification` hooks, and 2 MCP servers — writes a marketplace
|
|
293
295
|
manifest at `~/.agent-cortex/.claude-plugin/marketplace.json` exposing `./claude`, and
|
|
@@ -427,6 +429,7 @@ claude plugin marketplace remove jaybeeuu
|
|
|
427
429
|
| `strategy` | delegate: "use the **strategy** agent…" | Vision brief / PRD / technical-direction docs |
|
|
428
430
|
| `ralph-plan` | delegate: "use the **ralph-plan** agent…" | Explore, grill, and file beads for a change |
|
|
429
431
|
| `plan` | delegate: "use the **plan** agent…" | End-to-end planning (PRD → classified beads) |
|
|
432
|
+
| `guppi` | **run as the main agent**: `claude --agent agent-cortex:guppi` | HITL counterpart to ralph (below) |
|
|
430
433
|
| `ralph` | **run as the main agent**: `claude --agent agent-cortex:ralph` | Parallel backlog orchestrator (below) |
|
|
431
434
|
|
|
432
435
|
Skills auto-trigger from their descriptions, or invoke one explicitly as
|
|
@@ -443,6 +446,27 @@ It finds ready beads, spawns parallel background workers (implement → independ
|
|
|
443
446
|
fix), opens a PR per feature, and pauses at each human merge gate. After you merge, re-invoke
|
|
444
447
|
it and it resumes from `bd ready`.
|
|
445
448
|
|
|
449
|
+
#### guppi — the HITL counterpart to ralph
|
|
450
|
+
|
|
451
|
+
**guppi** is the human-in-the-loop counterpart to ralph, and it sits above `plan`: `plan` shapes one
|
|
452
|
+
feature into beads, guppi decides which feature that is. Ralph executes the work an agent can do;
|
|
453
|
+
guppi helps with the work an agent cannot — design, ideation, prioritisation, human review and
|
|
454
|
+
manual confirmations. It is resident and propose-only: it recommends the next item and names the
|
|
455
|
+
reason, then loads `plan`, `grill-me`, `hitl-collab`, `flesh-out-idea` or `prioritise-work` for the
|
|
456
|
+
chosen item. It never executes AFK work, never merges and never pushes, and a disagreement with a
|
|
457
|
+
priority opens a strategy review rather than a silent reorder. Between tasks it clears the context
|
|
458
|
+
with `/clear`, and only after writing what was decided, what is open and what comes next to the bead
|
|
459
|
+
trail and the memory. The tracker, not the window, holds the state that matters.
|
|
460
|
+
|
|
461
|
+
```sh
|
|
462
|
+
claude --agent agent-cortex:guppi
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
Its authority is prioritisation, not action. `prioritise-work` owns the committed strategy file;
|
|
466
|
+
`score-bead` records the score and `hitl-queue` prints the order. guppi reports them and never
|
|
467
|
+
recomputes them. Personal work is a town-level bd scope — no rig, no polecats, no refinery, no merge
|
|
468
|
+
queue.
|
|
469
|
+
|
|
446
470
|
#### Hooks
|
|
447
471
|
|
|
448
472
|
`SessionStart` injects a per-session policy nudging Claude to prefer the shipped skills over
|
|
@@ -457,7 +481,8 @@ extension→hook audit.
|
|
|
457
481
|
#### Not ported / follow-ups
|
|
458
482
|
|
|
459
483
|
- Only `session-start` and `notify` had Claude equivalents (both ported to hooks); the other
|
|
460
|
-
pi `extensions/` (auto-name, agent-guardrails, skill-stats, subagent, agent-modes
|
|
484
|
+
pi `extensions/` (auto-name, agent-guardrails, skill-stats, subagent, agent-modes,
|
|
485
|
+
post-merge-watch) have none — `output-style`
|
|
461
486
|
reaches Claude through the managed `CLAUDE.md` section instead; the audit and
|
|
462
487
|
rejection rationale live in `docs/claude-hooks.md`.
|
|
463
488
|
- Ralph follow-ups: multi-feature epic branches, and a GitHub-trigger routine to auto-resume
|
|
@@ -504,6 +529,61 @@ Only plain release versions are compared, so a prerelease on either side also re
|
|
|
504
529
|
The command is read-only: it stats and reads those manifests, and never installs, writes, or
|
|
505
530
|
reaches the network.
|
|
506
531
|
|
|
532
|
+
## Updating the CLI itself (`agent-cortex self-update`)
|
|
533
|
+
|
|
534
|
+
`agent-cortex self-update` updates the globally installed CLI through the manager that installed it,
|
|
535
|
+
then refreshes the harness installs with the newly installed binary.
|
|
536
|
+
|
|
537
|
+
```sh
|
|
538
|
+
agent-cortex self-update # report, update, then refresh the harness installs
|
|
539
|
+
agent-cortex self-update --check # report the versions and the command, write nothing
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
The owning manager is inferred from the running entry point's real path, then confirmed — never
|
|
543
|
+
assumed. A pnpm install lives under `<prefix>/global/<v>/…` (and the store link that path resolves
|
|
544
|
+
into), an npm install under `<prefix>/lib/node_modules/…`, and the manager binary is taken from that
|
|
545
|
+
`<prefix>` rather than from `PATH`. That matters because two managers can be installed and only one
|
|
546
|
+
of them owns this copy: running the manager on `PATH` would update the wrong store or fail. The
|
|
547
|
+
confirmation asks the inferred manager for its own global listing and matches this package's name
|
|
548
|
+
and version. An owner that cannot be inferred or confirmed prints the exact command and exits
|
|
549
|
+
non-zero — both managers' commands when it cannot even infer the layout, because that choice is
|
|
550
|
+
the user's. The CLI never falls back to a manager found on `PATH`.
|
|
551
|
+
|
|
552
|
+
The report gives the installed version (read from the manifest beside the entry point, so even a
|
|
553
|
+
stale process reports what is on disk), the published version (from the confirmed manager's `view`),
|
|
554
|
+
the owner, and the command it would run. A registry error is its own failure: it prints the
|
|
555
|
+
manager's error, offers no update, and exits non-zero. A failed install reports the manager's stderr
|
|
556
|
+
and runs nothing after it. Once the install succeeds, the command reports the CLI version before and
|
|
557
|
+
after (`cli 1.2.3 → 1.4.0`, read from the binary the update just installed, because the
|
|
558
|
+
running process is still the old code), then hands the terminal to the new binary's `update -a`. One
|
|
559
|
+
command brings the CLI and the harness installs to the same version, and the exit code is the
|
|
560
|
+
refresh's.
|
|
561
|
+
|
|
562
|
+
The refresh spawns `<prefix>/bin/agent-cortex` from that same inferred prefix with an argv array and
|
|
563
|
+
inherits the terminal, so the refresh's own output is what the user reads. It is skipped in three
|
|
564
|
+
cases: `--check`, a failed update, and an install already at the published version (where
|
|
565
|
+
`agent-cortex update -a` is the refresh that is left). A refresh that cannot start — the path is
|
|
566
|
+
POSIX-shaped, while native Windows pnpm and npm write `.cmd` shims it does not match, and Node cannot
|
|
567
|
+
start a `.cmd` without a shell — prints the reason and the exact command to run by hand, and exits
|
|
568
|
+
non-zero. The CLI update has already succeeded by then, so `agent-cortex update -a` finishes the job.
|
|
569
|
+
|
|
570
|
+
```sh
|
|
571
|
+
# what it reports, for a copy installed by a pnpm that is not the one on PATH
|
|
572
|
+
agent-cortex self-update --check
|
|
573
|
+
# installed 1.2.3
|
|
574
|
+
# published 1.4.0
|
|
575
|
+
# owner pnpm (/opt/pnpm-home/bin/pnpm)
|
|
576
|
+
# status update available: 1.2.3 → 1.4.0
|
|
577
|
+
# command /opt/pnpm-home/bin/pnpm add -g @jaybeeuu/agent-cortex@latest
|
|
578
|
+
|
|
579
|
+
# what a bare run adds after that report
|
|
580
|
+
agent-cortex self-update
|
|
581
|
+
# ✓ /opt/pnpm-home/bin/pnpm add -g @jaybeeuu/agent-cortex@latest
|
|
582
|
+
# cli 1.2.3 → 1.4.0
|
|
583
|
+
# → refreshing installed harnesses with /opt/pnpm-home/bin/agent-cortex update -a
|
|
584
|
+
# …the new binary's own update report…
|
|
585
|
+
```
|
|
586
|
+
|
|
507
587
|
## Refreshing installed harnesses (`agent-cortex update`)
|
|
508
588
|
|
|
509
589
|
`agent-cortex update` re-runs a harness installer and reports what changed. It installs nothing
|
|
@@ -536,9 +616,8 @@ the installer wrote; harnesses already at the CLI version are listed as skipped.
|
|
|
536
616
|
version is read back from the manifest its installer wrote, so a refresh that failed to
|
|
537
617
|
materialise reports `unknown` rather than claiming the CLI version.
|
|
538
618
|
|
|
539
|
-
This refreshes the installs, not the CLI.
|
|
540
|
-
|
|
541
|
-
[`docs/dev-loop.md`](docs/dev-loop.md).
|
|
619
|
+
This refreshes the installs, not the CLI. `agent-cortex self-update` does both in one step; the
|
|
620
|
+
[`docs/dev-loop.md`](docs/dev-loop.md) page records what a global reinstall has to fix.
|
|
542
621
|
|
|
543
622
|
## Migrating a beads workspace
|
|
544
623
|
|
package/agents/README.md
CHANGED
|
@@ -44,13 +44,13 @@ agents/ralph/
|
|
|
44
44
|
`{{SECTION:wake}}` is the one seam where harness differences belong: the shared `agent.md`
|
|
45
45
|
names no harness and no harness-specific tool, and every one of those facts lives in a
|
|
46
46
|
`wake.md` that states its mechanism in one sentence, then covers **spawn** (tool and argument
|
|
47
|
-
shape), **completion arrival**, **id tracking**, **
|
|
47
|
+
shape), **completion arrival**, **id tracking**, **trail reading**, and **stop** behaviour.
|
|
48
48
|
`token-map.json`'s `wake.mechanism` table records the same fact machine-readably.
|
|
49
49
|
|
|
50
50
|
| Harness | `wake.mechanism` | Completion arrives via | Id tracking | Stop means |
|
|
51
51
|
|---------|------------------|------------------------|-------------|------------|
|
|
52
52
|
| `pi` | `blocking-wait` | `wait_for_agents` returns as soon as a worker finishes, result inline | `agentId` only | stop calling `wait_for_agents` — nothing to kill |
|
|
53
|
-
| `claude` | `event-driven` | harness re-invokes ralph with the result inline | task ID only
|
|
53
|
+
| `claude` | `event-driven` | harness re-invokes ralph with the result inline | task ID only | simply stop — nothing to kill |
|
|
54
54
|
|
|
55
55
|
### Example: plan agent (no per-harness sections)
|
|
56
56
|
|
|
@@ -199,7 +199,7 @@ The composer:
|
|
|
199
199
|
|
|
200
200
|
### Agents with No Per-Harness Differences
|
|
201
201
|
|
|
202
|
-
Agents like `plan`, `ralph-plan`, and `strategy` that have identical behavior across harnesses still need per-harness directories for their frontmatter.json (since tool names differ between harnesses).
|
|
202
|
+
Agents like `plan`, `ralph-plan`, `guppi`, and `strategy` that have identical behavior across harnesses still need per-harness directories for their frontmatter.json (since tool names differ between harnesses).
|
|
203
203
|
|
|
204
204
|
```
|
|
205
205
|
agents/plan/
|
|
@@ -217,7 +217,7 @@ agents/plan/
|
|
|
217
217
|
5. Remove old `*.agent.md` files — DONE (the composable directories are the only committed
|
|
218
218
|
form; every harness composes or renders its own agent files at install time)
|
|
219
219
|
|
|
220
|
-
All
|
|
220
|
+
All five agents (`ralph`, `plan`, `ralph-plan`, `guppi`, `strategy`) use the composable layout, and no
|
|
221
221
|
flat agent file is committed:
|
|
222
222
|
|
|
223
223
|
- `bin/installers/claude.mjs` (plain `agent-cortex install claude` materialises the plugin
|