@jaybeeuu/agent-cortex 2.8.0 → 2.10.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 +304 -0
- package/README.md +30 -3
- package/agents/README.md +7 -2
- package/agents/guppi/agent.md +231 -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-plan/agent.md +6 -0
- package/bin/installers/claude.mjs +8 -23
- 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/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/package.json +1 -1
- package/scripts/lib/compose-agent.mjs +45 -7
- package/scripts/lib/manifest.mjs +29 -0
- package/skills/review/review-defects/EXAMPLES.md +80 -4
- package/skills/review/review-defects/SKILL.md +47 -16
- package/skills/review/review-report/EXAMPLES.md +118 -0
- package/skills/review/review-report/SKILL.md +138 -0
- package/skills/review/review-report/scripts/report.mjs +1032 -0
- package/skills/workflow/hitl-queue/BOUNDARY.md +122 -0
- package/skills/workflow/hitl-queue/DEADLINES.md +59 -0
- package/skills/workflow/hitl-queue/RECOMMEND.md +89 -0
- package/skills/workflow/hitl-queue/SCOPES.md +118 -0
- package/skills/workflow/hitl-queue/SKILL.md +150 -0
- package/skills/workflow/hitl-queue/scripts/boundary.mjs +493 -0
- package/skills/workflow/hitl-queue/scripts/queue.mjs +1012 -0
- package/skills/workflow/hitl-queue/scripts/recommend.mjs +492 -0
- package/skills/workflow/hitl-queue/scripts/scopes.mjs +479 -0
- package/skills/workflow/plan/SKILL.md +13 -0
- 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 +756 -0
- package/skills/workflow/prioritise-work/templates/strategy.md +87 -0
- package/skills/workflow/ralph/REFERENCE.md +6 -1
- package/skills/workflow/ralph/scripts/prune-worktrees.mjs +185 -10
- package/skills/workflow/run-pipeline-stage/playbooks/review.md +5 -2
- 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 +6 -1
- package/token-map.README.md +14 -2
- package/token-map.json +17 -3
package/token-map.README.md
CHANGED
|
@@ -87,6 +87,15 @@ rather than inventing a dotted form:
|
|
|
87
87
|
runtime env var (expanded per context by Claude Code) points at wherever the plugin
|
|
88
88
|
actually runs from. A literal home path in substituted files would break under
|
|
89
89
|
cache-copy, so the installer passes the env form through verbatim.
|
|
90
|
+
- **`layouts`** — the tree each installer stages a resource into, for the resources whose
|
|
91
|
+
shape differs per harness. Only `skills` differs: the repository nests every skill one group
|
|
92
|
+
deep (`skills/<group>/<name>/`), and `bin/installers/pi.mjs` preserves that, while Claude
|
|
93
|
+
Code's plugin scan discovers `skills/<name>/SKILL.md` directly under `skills/`, so
|
|
94
|
+
`bin/installers/claude.mjs` copies every skill flat. A `{{PATH:skills/…}}` row is authored
|
|
95
|
+
against the repository tree; resolution reads the harness's row here and drops the group
|
|
96
|
+
segment when the harness stages skills flat, so the row names a file the install contains.
|
|
97
|
+
The row is a harness fact, not a repository one, which is why it lives here rather than in
|
|
98
|
+
the resolver: a harness that stages skills differently changes this table, not the code.
|
|
90
99
|
- **`agents`** — the `agent-cortex:` name-prefix convention per harness (claude strips the
|
|
91
100
|
prefix during conversion). Agent names themselves do not get per-row mappings because
|
|
92
101
|
the prefix rule covers all of them — every agent is composed from `agents/<name>/` for
|
|
@@ -147,13 +156,16 @@ The full contract is embedded in `token-map.json` under `contract`. In summary,
|
|
|
147
156
|
3. For `TOOL`: look up the canonical key, replace with the harness name; null → drop/omit;
|
|
148
157
|
unknown → throw.
|
|
149
158
|
4. For `PATH`: named key → resolve from `paths`; anything else → resolve relative to
|
|
150
|
-
`plugin_root
|
|
159
|
+
`plugin_root`, after mapping a `skills/…` row onto the harness's staged shape from
|
|
160
|
+
`layouts`; `${ENV_VAR}` values pass through verbatim for runtime expansion.
|
|
151
161
|
5. Reject a map `version` they do not implement.
|
|
152
162
|
|
|
153
163
|
## Authoring guidance
|
|
154
164
|
|
|
155
165
|
- Write tokens with the **canonical authoring names**: `Use {{TOOL:task}} to spawn
|
|
156
|
-
subagents`, `Read {{PATH:skills/workflow/plan/SKILL.md}}`.
|
|
166
|
+
subagents`, `Read {{PATH:skills/workflow/plan/SKILL.md}}`. Write a skill path row in this
|
|
167
|
+
repository's grouped form, `skills/<group>/<name>/<file>`; each install maps it onto the
|
|
168
|
+
shape it stages (see `layouts`), so one authored row names a real file on both harnesses.
|
|
157
169
|
- Never embed a harness-specific name in the canonical sources (`agents/<name>/agent.md`,
|
|
158
170
|
`skills/**/SKILL.md`) — that defeats the map. The materialised Claude plugin
|
|
159
171
|
(`~/.agent-cortex/claude`), the generated `agents/*.agent.md` files, and any installed
|
package/token-map.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"decision": "Adopt the {{TOOL:name}} / {{PATH:name}} / {{SECTION:name}} grammar already standardised by ADR #63 (agents/README.md) rather than a dotted {{tool.name}} form. The uppercase type prefix disambiguates token kinds at a glance, keeps tool/path/section names in one namespace collision-free, and matches the token grammar skills are already written against.",
|
|
9
9
|
"types": {
|
|
10
10
|
"TOOL": "{{TOOL:<canonical tool key>}} — replaced at install time with the bound harness's tool name (see tools).",
|
|
11
|
-
"PATH": "{{PATH:<path key or relative path>}} — replaced at install time with the harness-resolved path (see paths).",
|
|
11
|
+
"PATH": "{{PATH:<path key or relative path>}} — replaced at install time with the harness-resolved path (see paths; a relative arg under skills/ is mapped onto the harness's staged shape first — see layouts).",
|
|
12
12
|
"SECTION": "{{SECTION:<name>}} — replaced by the agent composer with <harness>/<name>.md section content. Not a global substitution; out of scope for token-map.json (see contract)."
|
|
13
13
|
}
|
|
14
14
|
},
|
|
@@ -28,7 +28,10 @@
|
|
|
28
28
|
"wait_for_agents": { "claude": null, "pi": "wait_for_agents" },
|
|
29
29
|
"peer_send": { "claude": "SendMessage", "pi": "peer_send" },
|
|
30
30
|
"peer_list": { "claude": "ListAgents", "pi": "peer_list" },
|
|
31
|
-
"post_merge_watch": { "claude": "ScheduleWakeup", "pi": "post-merge-watch" }
|
|
31
|
+
"post_merge_watch": { "claude": "ScheduleWakeup", "pi": "post-merge-watch" },
|
|
32
|
+
"interrupt_rewind": { "claude": "/rewind", "pi": "interrupt_resume" },
|
|
33
|
+
"interrupt_checkpoint": { "claude": null, "pi": "interrupt_checkpoint" },
|
|
34
|
+
"interrupt_resume": { "claude": null, "pi": "interrupt_resume" }
|
|
32
35
|
},
|
|
33
36
|
"paths": {
|
|
34
37
|
"plugin_root": {
|
|
@@ -48,6 +51,13 @@
|
|
|
48
51
|
"pi": { "base": "plugin_root", "relative": "docs/skills/skill-anatomy.md" }
|
|
49
52
|
}
|
|
50
53
|
},
|
|
54
|
+
"layouts": {
|
|
55
|
+
"description": "The tree each installer stages a resource into. `{{PATH:...}}` resolution reads it: a row is authored against the repository tree, so a harness that stages a resource in a different shape needs the row mapped onto its own. Only `skills` differs — Claude Code's plugin scan discovers `skills/<name>/SKILL.md` directly under `skills/`, so bin/installers/claude.mjs copies every skill flat and the group segment an authored row carries is dropped; bin/installers/pi.mjs preserves the repository grouping, so the row resolves as written.",
|
|
56
|
+
"skills": {
|
|
57
|
+
"claude": "flat",
|
|
58
|
+
"pi": "grouped"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
51
61
|
"agents": {
|
|
52
62
|
"prefix": {
|
|
53
63
|
"claude": "",
|
|
@@ -81,7 +91,10 @@
|
|
|
81
91
|
"wait_for_agents": "PI-only blocking wait over background subagent runs (the task tool): returns the results of completed agents and STILL RUNNING for the rest. Claude's Task delivers results inline with no wait step — null on claude.",
|
|
82
92
|
"peer_send": "Session-to-session message send. pi takes it from the published pi-peer package (an ordinary package the consuming repository installs itself, never a dependency of this one). Claude Code has it built in and its docs name it there. Both address a peer by the name or address their own list reports, and neither send is proof of receipt. Only sends and discovery are tokenised: pi-peer's peer_get and peer_await have no Claude Code equivalent, and a null claude mapping drops the token and leaves the sentence that named it broken, so harness-varying prose must never name them — such passages stay inside a harness-labelled runbook.",
|
|
83
93
|
"peer_list": "Peer discovery: the peers that can receive a message, and the address each is reached by. pi's is the pi-peer package's tool. Claude Code's built-in equivalent is ListAgents (an earlier binary named it ListPeers), which also reports reachability and so doubles as the peer-state read.",
|
|
84
|
-
"post_merge_watch": "Who waits for a CI run that outlives the check's own wait window. The row maps a name, not a protocol: the verdicts and the escalation rule layered above it are harness-invariant text, so only the mechanism is tokenised. pi's name is this package's own post-merge-watch extension, which re-runs the check on a timer and wakes an idle session with the verdict. Claude Code's is its built-in ScheduleWakeup tool, which schedules the session's own resumption so it can re-run the check. The values differ in kind — an extension on pi, a tool on claude — because that is what each harness supplies; the surrounding prose therefore describes only what both do (the session resumes, the check runs again, the verdict table is unchanged) and never a call shape."
|
|
94
|
+
"post_merge_watch": "Who waits for a CI run that outlives the check's own wait window. The row maps a name, not a protocol: the verdicts and the escalation rule layered above it are harness-invariant text, so only the mechanism is tokenised. pi's name is this package's own post-merge-watch extension, which re-runs the check on a timer and wakes an idle session with the verdict. Claude Code's is its built-in ScheduleWakeup tool, which schedules the session's own resumption so it can re-run the check. The values differ in kind — an extension on pi, a tool on claude — because that is what each harness supplies; the surrounding prose therefore describes only what both do (the session resumes, the check runs again, the verdict table is unchanged) and never a call shape.",
|
|
95
|
+
"interrupt_rewind": "How an interrupted task returns to its checkpoint and leaves the interruption behind. Consumed by agents/guppi/agent.md's interrupt protocol, which names the row once and states the checkpoint, record, rewind and resume steps around it. The row maps a name, not a protocol: pi's name is this package's own interrupt-bookmark extension's resume tool, which rewinds the session tree and has pi's summariser keep the abandoned branch under a branch summary labelled `interrupt`. Claude Code's is its built-in /rewind command, which restores the conversation and the file checkpoints taken for it. The values differ in kind — a model-callable tool on pi, a user-facing command on claude — because that is what each harness supplies. Constraints on the prose: it must describe only what both do (the session returns to the earlier point, and the interrupt's turns leave the live context) and never a call shape; it must also state who acts, because the actor forks with the kind — guppi performs the rewind where the harness gives it a tool, and hands it to the human where the harness gives it a user command; and it must not tokenise the checkpoint half, because Claude Code checkpoints on its own while pi needs a tool call, and a null claude column would drop the token and leave the sentence that named it broken. test/guppi-interrupt-render.test.mjs stages both installs to prove the fork.",
|
|
96
|
+
"interrupt_checkpoint": "The checkpoint half of the interrupt protocol, pi-only: guppi takes a resume point by calling this tool, while Claude Code checkpoints on its own with no tool to call, so the claude column is null and no claude frontmatter lists it. It is a tool-list row, not a prose row — prose must never tokenise it, for the reason recorded on interrupt_rewind.",
|
|
97
|
+
"interrupt_resume": "The resume tool as a tool-list row, for an agent that declares its tools per harness (guppi lists it in agents/guppi/pi/frontmatter.json). It is distinct from the interrupt_rewind prose row, which maps the same pi name to Claude Code's user-run /rewind: a tool list cannot carry /rewind, because the agent cannot call a user command, so the claude column is null and no claude frontmatter lists it."
|
|
85
98
|
},
|
|
86
99
|
"paths": {
|
|
87
100
|
"pi": "plugin_root is the staged package `agent-cortex install pi` materialises at ~/.agent-cortex/pi; pi loads that directory by path and the shipped extensions resolve their own resources relative to it (agent-modes computes plugin_root from its actual install location). A checkout or symlinked install differs — installers compute plugin_root from the actual resolution and can override it (--plugin-root).",
|
|
@@ -104,6 +117,7 @@
|
|
|
104
117
|
"TOOL unknown: a {{TOOL:<key>}} with no entry in tools is a hard error — the map must be extended. This mirrors the generators (bin/installers/claude.mjs, bin/installers/pi.mjs), which throw on unknown tools.",
|
|
105
118
|
"PATH named key: replace {{PATH:<key>}} with the resolved value of paths.<key>.<harness>.",
|
|
106
119
|
"PATH relative: replace {{PATH:<relative>}} with plugin_root + '/' + <relative> (e.g. {{PATH:skills/workflow/plan/SKILL.md}}).",
|
|
120
|
+
"PATH relative skill: a relative arg whose first segment is `skills` is authored against the repository tree, which nests every skill at skills/<group>/<name>/<file>. Map it onto the harness's staged shape from layouts.skills.<harness>: `grouped` keeps it as written, `flat` drops the group segment (skills/<name>/<file>) because that installer copies skills flat. An arg with fewer than three segments is a hard error — no install has a skill one level under skills/.",
|
|
107
121
|
"PATH resolution: a value may be a literal string, an ${ENV_VAR} token, or a {base, relative} spec. Resolve {base, relative} by joining relative onto the resolved base. Leave ${ENV_VAR} values verbatim — the harness expands them at runtime (claude's ${CLAUDE_PLUGIN_ROOT}).",
|
|
108
122
|
"PATH unknown base: a {base, relative} spec whose base is not a key in paths is a hard error.",
|
|
109
123
|
"SECTION: {{SECTION:<name>}} is resolved by the agent composer from <agents_dir>/<harness>/<name>.md; token-map.json does not substitute it. Installers must leave SECTION tokens untouched for the composer.",
|