@jaybeeuu/agent-cortex 1.37.1 → 1.39.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.
Files changed (135) hide show
  1. package/.agents/skills/style-versioning/SKILL.md +9 -8
  2. package/.github/workflows/ci.yml +190 -8
  3. package/AGENTS.md +27 -6
  4. package/CHANGELOG.md +72 -0
  5. package/README.md +156 -39
  6. package/agents/README.md +49 -13
  7. package/agents/plan/agent.md +51 -0
  8. package/agents/plan/claude/frontmatter.json +6 -0
  9. package/agents/plan/copilot/frontmatter.json +6 -0
  10. package/agents/plan/pi/frontmatter.json +6 -0
  11. package/agents/plan.agent.md +3 -0
  12. package/agents/ralph/agent.md +262 -0
  13. package/agents/ralph/claude/frontmatter.json +6 -0
  14. package/agents/ralph/claude/polling.md +31 -0
  15. package/agents/ralph/copilot/frontmatter.json +6 -0
  16. package/agents/ralph/copilot/polling.md +62 -0
  17. package/agents/ralph/pi/frontmatter.json +6 -0
  18. package/agents/ralph/pi/polling.md +74 -0
  19. package/agents/ralph-plan/agent.md +114 -0
  20. package/agents/ralph-plan/claude/frontmatter.json +6 -0
  21. package/agents/ralph-plan/copilot/frontmatter.json +6 -0
  22. package/agents/ralph-plan/pi/frontmatter.json +6 -0
  23. package/agents/ralph-plan.agent.md +6 -3
  24. package/agents/ralph.agent.md +83 -57
  25. package/agents/strategy/agent.md +104 -0
  26. package/agents/strategy/claude/frontmatter.json +6 -0
  27. package/agents/strategy/copilot/frontmatter.json +6 -0
  28. package/agents/strategy/pi/frontmatter.json +6 -0
  29. package/agents/strategy.agent.md +3 -0
  30. package/bin/agent-cortex.mjs +76 -1
  31. package/bin/installers/claude.mjs +376 -0
  32. package/bin/installers/copilot.mjs +129 -0
  33. package/bin/installers/pi.mjs +197 -0
  34. package/claude/.claude-plugin/plugin.json +1 -1
  35. package/claude/agents/plan.md +3 -1
  36. package/claude/agents/ralph-plan.md +6 -4
  37. package/claude/agents/strategy.md +3 -1
  38. package/claude/hooks/scripts/notify.mjs +54 -0
  39. package/claude/hooks.json +15 -0
  40. package/docs/claude-hooks.md +115 -0
  41. package/docs/ideas/auto-model-selection.md +75 -0
  42. package/docs/ideas/extension-manifests.md +75 -0
  43. package/docs/ideas/improve-pi-system-prompt.md +34 -0
  44. package/docs/ideas/model-selector.md +40 -0
  45. package/docs/ideas/pi-task-memory.md +34 -0
  46. package/docs/ideas/qa-extension.md +43 -0
  47. package/docs/ideas/record-ideas-as-beads.md +115 -0
  48. package/docs/ideas/subagent-visibility.md +72 -0
  49. package/docs/ideas/task-session-context.md +89 -0
  50. package/docs/ideas/unified-ci-pipeline.md +28 -0
  51. package/docs/research/skill-design-research.md +4 -4
  52. package/docs/research/skill-improvements-analysis.md +1 -1
  53. package/docs/skills/skill-anatomy.md +47 -2
  54. package/docs/technical-direction/migration-execution-labels.md +132 -0
  55. package/extensions/agent-modes/README.md +54 -0
  56. package/extensions/agent-modes/discover.test.ts +241 -0
  57. package/extensions/agent-modes/discover.ts +458 -0
  58. package/extensions/agent-modes/index.ts +13 -224
  59. package/extensions/agent-modes/node_modules/.bin/pi +21 -0
  60. package/extensions/agent-modes/node_modules/.bin/tsc +21 -0
  61. package/extensions/agent-modes/node_modules/.bin/tsserver +21 -0
  62. package/extensions/agent-modes/node_modules/.bin/tsx +21 -0
  63. package/extensions/agent-modes/package.json +20 -0
  64. package/extensions/agent-modes/tsconfig.json +12 -0
  65. package/extensions/subagent/README.md +19 -0
  66. package/extensions/subagent/index.ts +131 -45
  67. package/extensions/subagent/node_modules/.bin/pi +21 -0
  68. package/extensions/subagent/node_modules/.bin/pi-ai +21 -0
  69. package/extensions/subagent/node_modules/.bin/tsc +21 -0
  70. package/extensions/subagent/node_modules/.bin/tsserver +21 -0
  71. package/extensions/subagent/node_modules/.bin/tsx +21 -0
  72. package/extensions/subagent/package.json +23 -0
  73. package/extensions/subagent/tsconfig.json +12 -0
  74. package/extensions/subagent/wait.test.ts +202 -0
  75. package/extensions/subagent/wait.ts +118 -0
  76. package/hooks/claude/hooks.json +38 -0
  77. package/hooks/claude/scripts/notify.mjs +54 -0
  78. package/lib/cli.mjs +68 -3
  79. package/package.json +6 -4
  80. package/plugin.json +1 -1
  81. package/pnpm-workspace.yaml +1 -1
  82. package/scripts/build-copilot-agents.mjs +30 -0
  83. package/scripts/lib/compose-agent.mjs +241 -0
  84. package/skills/engineering/design-an-interface/SKILL.md +78 -58
  85. package/skills/engineering/grill-with-docs/REFERENCE.md +78 -0
  86. package/skills/engineering/grill-with-docs/SKILL.md +66 -63
  87. package/skills/engineering/improve-codebase-architecture/SKILL.md +66 -48
  88. package/skills/engineering/technical-direction/FORMAT.md +38 -0
  89. package/skills/engineering/technical-direction/SKILL.md +70 -77
  90. package/skills/planning/classify-bead/SKILL.md +59 -35
  91. package/skills/planning/create-task/REFERENCE.md +40 -0
  92. package/skills/planning/create-task/SKILL.md +70 -66
  93. package/skills/planning/create-task/scripts/create-chores.ts +6 -1
  94. package/skills/planning/create-task/scripts/node_modules/.bin/tsc +21 -0
  95. package/skills/planning/create-task/scripts/node_modules/.bin/tsserver +21 -0
  96. package/skills/planning/create-task/scripts/node_modules/.bin/tsx +21 -0
  97. package/skills/planning/prd-to-tasks/REFERENCE.md +66 -0
  98. package/skills/planning/prd-to-tasks/SKILL.md +86 -170
  99. package/skills/planning/record-idea/FORMAT.md +44 -0
  100. package/skills/planning/record-idea/SKILL.md +70 -53
  101. package/skills/planning/request-refactor-plan/FORMAT.md +45 -0
  102. package/skills/planning/request-refactor-plan/SKILL.md +57 -46
  103. package/skills/planning/write-a-prd/FORMAT.md +54 -0
  104. package/skills/planning/write-a-prd/SKILL.md +49 -48
  105. package/skills/planning/write-a-ticket/SKILL.md +68 -53
  106. package/skills/productivity/handoff/SKILL.md +12 -0
  107. package/skills/productivity/init-beads/SKILL.md +48 -40
  108. package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsc +21 -0
  109. package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsserver +21 -0
  110. package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsx +21 -0
  111. package/skills/productivity/write-a-skill/SKILL.md +2 -1
  112. package/skills/review/maintain-agent-docs/SKILL.md +71 -51
  113. package/skills/workflow/hitl-collab/SKILL.md +86 -17
  114. package/skills/workflow/ralph/REFERENCE.md +24 -19
  115. package/skills/workflow/ralph/SKILL.md +88 -74
  116. package/skills/workflow/run-pipeline-stage/REFERENCE.md +22 -0
  117. package/skills/workflow/run-pipeline-stage/SKILL.md +91 -93
  118. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.test.ts +6 -107
  119. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +4 -2
  120. package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsc +21 -0
  121. package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsserver +21 -0
  122. package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsx +21 -0
  123. package/skills/workflow/using-agent-skills/SKILL.md +122 -0
  124. package/test/claude-installer.test.mjs +248 -0
  125. package/test/cli.test.mjs +115 -2
  126. package/test/copilot-installer.test.mjs +298 -0
  127. package/test/installer.test.mjs +179 -0
  128. package/test/notify-hook.test.mjs +63 -0
  129. package/test/pi-installer.test.mjs +371 -0
  130. package/token-map.README.md +130 -0
  131. package/token-map.json +106 -0
  132. package/.github/workflows/ci.test.ts +0 -217
  133. package/.github/workflows/release.yml +0 -58
  134. package/scripts/build-claude-agents.mjs +0 -179
  135. package/scripts/publish-release.sh +0 -32
@@ -61,18 +61,19 @@ Fix status bead showing wrong priority after update
61
61
 
62
62
  ## After merge to main
63
63
 
64
- The `release.yml` workflow handles everything automatically:
64
+ The `release` job in `.github/workflows/ci.yml` handles everything automatically:
65
65
 
66
66
  1. **Detects new changesets** on main
67
- 2. **Creates or updates a "Version Packages" PR** with bumped versions and updated CHANGELOG
67
+ 2. **Creates a "Version Packages" PR** — the `version` step runs `pnpm version-packages`, which bumps `package.json`, syncs `plugin.json` (via `scripts/sync-plugin-version.sh`), updates `CHANGELOG.md`, and regenerates the committed generated output (`pnpm build:claude`, `pnpm build:copilot`) so the drift gates never fail on a version bump
68
68
  3. **When "Version Packages" is merged**:
69
- - Bumps `package.json` version
70
- - Syncs `plugin.json` version (via `scripts/sync-plugin-version.sh`)
71
- - Updates `CHANGELOG.md`
72
69
  - Creates a git tag
73
- - Publishes to npm via OIDC (no `NPM_TOKEN` needed)
70
+ - Publishes to npm — `pnpm publish-package` packs with `pnpm pack` and publishes with `npm publish --provenance --access public`. Authenticates via npm Trusted Publishing (OIDC): the release job's `id-token` permission lets npm exchange a GitHub OIDC token for a short-lived npm token at publish time, so no `NPM_TOKEN` secret or `.npmrc` auth config is required — only the one-time npm-side Trusted Publishing setup on npmjs.com (package → Access → Trusted Publishing → GitHub repo `jaybeeuu/agent-cortex` + workflow `.github/workflows/ci.yml`)
74
71
  - Creates a GitHub release automatically
75
72
 
73
+ `changesets/action` execs the `version`/`publish` inputs without a shell, so each
74
+ must be a single unquoted command token — keep release logic in pnpm scripts
75
+ (`version-packages`, `publish-package`), never inline shell strings.
76
+
76
77
  ### Version lockstep
77
78
 
78
79
  All version numbers stay in lockstep automatically:
@@ -96,6 +97,6 @@ All version numbers stay in lockstep automatically:
96
97
  | Before (manual) | After (changesets) |
97
98
  |---|---|
98
99
  | Agent bumps versions locally | Agent writes a changeset file |
99
- | Manual GitHub release creation | Automated via `release.yml` |
100
- | `publish.yml` triggered by release | `release.yml` triggered by push to main |
100
+ | Manual GitHub release creation | Automated by the `release` job in `ci.yml` |
101
+ | `publish.yml` triggered by release | `ci.yml` release job on push to main |
101
102
  | Version sync was manual | `sync-plugin-version.sh` runs automatically |
@@ -7,7 +7,40 @@ on:
7
7
  pull_request:
8
8
 
9
9
  jobs:
10
- changeset:
10
+ setup:
11
+ name: Setup
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Setup Node
18
+ uses: actions/setup-node@v6
19
+ with:
20
+ node-version: 24
21
+
22
+ - name: Setup pnpm
23
+ uses: pnpm/action-setup@v4
24
+ with:
25
+ version: 10
26
+ run_install: false
27
+
28
+ - name: Cache pnpm store
29
+ uses: actions/cache@v4
30
+ with:
31
+ path: ~/.pnpm-store
32
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
33
+ restore-keys: |
34
+ ${{ runner.os }}-pnpm-
35
+
36
+ - name: Install dependencies
37
+ run: pnpm install --frozen-lockfile
38
+
39
+ - name: Build
40
+ run: pnpm build
41
+
42
+
43
+ changeset-check:
11
44
  name: Changeset check
12
45
  if: github.event_name == 'pull_request'
13
46
  runs-on: ubuntu-latest
@@ -21,7 +54,7 @@ jobs:
21
54
  BASE_REF: ${{ github.event.pull_request.base.ref }}
22
55
  run: |
23
56
  # Paths that require a changeset when modified
24
- VERSIONED_PATHS='extensions/\|skills/\|agents/\|package.json\|plugin.json'
57
+ VERSIONED_PATHS='extensions/|skills/|agents/|package\.json|plugin\.json'
25
58
 
26
59
  changed=$(git diff --name-only "origin/${BASE_REF}...HEAD")
27
60
  echo "Changed files:"
@@ -46,29 +79,178 @@ jobs:
46
79
 
47
80
  echo "Changeset found: $changesets"
48
81
 
49
- checks:
82
+ lint:
83
+ name: Lint
84
+ needs: setup
50
85
  runs-on: ubuntu-latest
51
86
  steps:
52
87
  - name: Checkout
53
88
  uses: actions/checkout@v4
89
+
54
90
  - name: Setup Node
55
- uses: actions/setup-node@v4
91
+ uses: actions/setup-node@v6
56
92
  with:
57
- node-version: 20
93
+ node-version: 24
94
+
95
+ - name: Cache pnpm store
96
+ uses: actions/cache@v4
97
+ with:
98
+ path: ~/.pnpm-store
99
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
100
+ restore-keys: |
101
+ ${{ runner.os }}-pnpm-
102
+
58
103
  - name: Setup pnpm
59
104
  uses: pnpm/action-setup@v4
60
105
  with:
61
106
  version: 10
62
107
  run_install: false
108
+
63
109
  - name: Install dependencies
64
110
  run: pnpm install --frozen-lockfile
111
+
65
112
  - name: Lint
66
113
  run: pnpm lint
114
+
115
+ test:
116
+ name: Test
117
+ needs: setup
118
+ runs-on: ubuntu-latest
119
+ steps:
120
+ - name: Checkout
121
+ uses: actions/checkout@v4
122
+
123
+ - name: Setup Node
124
+ uses: actions/setup-node@v6
125
+ with:
126
+ node-version: 24
127
+
128
+ - name: Cache pnpm store
129
+ uses: actions/cache@v4
130
+ with:
131
+ path: ~/.pnpm-store
132
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
133
+ restore-keys: |
134
+ ${{ runner.os }}-pnpm-
135
+
136
+ - name: Setup pnpm
137
+ uses: pnpm/action-setup@v4
138
+ with:
139
+ version: 10
140
+ run_install: false
141
+
142
+ - name: Install dependencies
143
+ run: pnpm install --frozen-lockfile
144
+
67
145
  - name: Test
68
146
  run: pnpm test
69
- - name: Build
70
- run: pnpm build
147
+
148
+ claude-plugin-check:
149
+ name: Claude plugin check
150
+ needs: setup
151
+ runs-on: ubuntu-latest
152
+ steps:
153
+ - name: Checkout
154
+ uses: actions/checkout@v4
155
+
156
+ - name: Setup Node
157
+ uses: actions/setup-node@v6
158
+ with:
159
+ node-version: 24
160
+
161
+ - name: Cache pnpm store
162
+ uses: actions/cache@v4
163
+ with:
164
+ path: ~/.pnpm-store
165
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
166
+ restore-keys: |
167
+ ${{ runner.os }}-pnpm-
168
+
169
+ - name: Setup pnpm
170
+ uses: pnpm/action-setup@v4
171
+ with:
172
+ version: 10
173
+ run_install: false
174
+
175
+ - name: Install dependencies
176
+ run: pnpm install --frozen-lockfile
177
+
178
+ # `pnpm build:claude` is an alias of `agent-cortex install claude` (both run
179
+ # bin/installers/claude.mjs), so this drift check proves the committed subtree
180
+ # equals the installer's output — stale output or hand-edits to generated
181
+ # files fail the build. The subtree stays committed because the marketplace
182
+ # install flow reads it straight from the working tree (fresh clone installs
183
+ # as-is).
71
184
  - name: Check generated Claude plugin is up to date
72
185
  run: |
73
186
  pnpm build:claude
74
- git diff --exit-code claude/agents/ claude/skills/
187
+ git diff --exit-code claude/agents/ claude/skills/ claude/.claude-plugin/plugin.json claude/hooks.json claude/hooks/
188
+
189
+ - name: Check generated Copilot agent files are up to date
190
+ run: |
191
+ pnpm build:copilot
192
+ git diff --exit-code -- 'agents/*.agent.md'
193
+
194
+ release:
195
+ name: Release
196
+ needs: [lint, test, claude-plugin-check]
197
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
198
+ runs-on: ubuntu-latest
199
+ permissions:
200
+ contents: write
201
+ pull-requests: write
202
+ # npm Trusted Publishing (OIDC): npm exchanges this id-token for a
203
+ # short-lived npm token at publish time — no token config or secret.
204
+ id-token: write
205
+ concurrency: ${{ github.workflow }}-${{ github.ref }}
206
+ steps:
207
+ - name: Checkout
208
+ uses: actions/checkout@v4
209
+ with:
210
+ fetch-depth: 0
211
+
212
+ - name: Setup Node
213
+ uses: actions/setup-node@v6
214
+ with:
215
+ node-version: 24
216
+
217
+ - name: Cache pnpm store
218
+ uses: actions/cache@v4
219
+ with:
220
+ path: ~/.pnpm-store
221
+ key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
222
+ restore-keys: |
223
+ ${{ runner.os }}-pnpm-
224
+
225
+ - name: Setup pnpm
226
+ uses: pnpm/action-setup@v4
227
+ with:
228
+ version: 10
229
+ run_install: false
230
+
231
+ - name: Install dependencies
232
+ run: pnpm install --frozen-lockfile
233
+
234
+ - name: Create Release Pull Request or Publish
235
+ id: changesets
236
+ uses: changesets/action@v1
237
+ with:
238
+ # changesets/action execs these inputs via @actions/exec with NO shell:
239
+ # the string is split by argStringToArray on whitespace (single quotes
240
+ # survive literally), so each must be a single unquoted command token
241
+ # that runs a pnpm script. version-packages bumps versions, syncs
242
+ # plugin.json, THEN regenerates the committed generated output
243
+ # (build:claude writes claude/.claude-plugin/plugin.json with the NEW
244
+ # version, build:copilot re-derives agents/*.agent.md) before the action
245
+ # commits, so the Version Packages PR always passes the drift gates.
246
+ version: pnpm version-packages
247
+ publish: pnpm publish-package
248
+ commit: "chore: version packages"
249
+ title: "chore: version packages"
250
+ env:
251
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
252
+ # Publish authenticates via npm Trusted Publishing (OIDC token
253
+ # exchange at publish time) — no NPM_TOKEN secret, no token config.
254
+ # Requires the one-time npm-side setup: npmjs.com → @jaybeeuu/
255
+ # agent-cortex → Access → Trusted Publishing, tied to GitHub repo
256
+ # jaybeeuu/agent-cortex + workflow .github/workflows/ci.yml.
package/AGENTS.md CHANGED
@@ -4,9 +4,10 @@ Instructions for agents working on this repository.
4
4
 
5
5
  ## What This Repo Is
6
6
 
7
- A personal Copilot CLI plugin containing custom agents and skills, plus PI extensions for
8
- enhancing the coding agent runtime. Changes here affect the behaviour of every agent, skill,
9
- and PI extension available in the author's coding sessions.
7
+ A personal Copilot CLI plugin containing custom agents and skills, shipped to Copilot, pi,
8
+ and Claude Code, plus PI extensions and Claude hooks for enhancing the coding agent
9
+ runtime. Changes here affect the behaviour of every agent, skill, and PI extension
10
+ available in the author's coding sessions.
10
11
 
11
12
  ## Structure
12
13
 
@@ -14,8 +15,12 @@ and PI extension available in the author's coding sessions.
14
15
  agent-cortex/
15
16
  ├── package.json # PI package manifest (pi: { extensions, skills })
16
17
  ├── plugin.json # GitHub Copilot plugin manifest — agents, skills, MCP servers
17
- ├── agents/ # Custom agents (*.agent.md)
18
- │ └── ralph.agent.md
18
+ ├── agents/ # Custom agents — canonical composable <name>/ dirs
19
+ │ ├── *.agent.md # generated from <name>/ by scripts/build-copilot-agents.mjs
20
+ │ ├── ralph/ # composable format — see agents/README.md
21
+ │ ├── plan/ # "
22
+ │ ├── ralph-plan/ # "
23
+ │ └── strategy/ # "
19
24
  ├── skills/ # Grouped by domain, discovered recursively
20
25
  │ ├── planning/ # Scope, spec, decompose
21
26
  │ ├── engineering/ # The coding loop
@@ -27,6 +32,8 @@ agent-cortex/
27
32
  │ └── skill-stats/
28
33
  │ ├── README.md # Installation & usage
29
34
  │ └── index.ts # Extension entrypoint
35
+ ├── hooks/ # Canonical Claude Code hooks (hooks.json + scripts — see docs/claude-hooks.md)
36
+ │ └── claude/ # generated into claude/hooks.json + claude/hooks/ by bin/installers/claude.mjs
30
37
  └── package.json # PI package manifest (pi: { extensions, skills })
31
38
  ```
32
39
 
@@ -52,7 +59,19 @@ Generated automatically by changesets. Do not edit `CHANGELOG.md` manually.
52
59
 
53
60
  ## Agent Conventions
54
61
 
55
- - Agent files are named `<name>.agent.md` and live in `agents/`.
62
+ - Agents live in composable `<name>/` directories under `agents/`: a shared `agent.md` body plus
63
+ per-harness subdirectories `pi/`, `copilot/`, `claude/` (frontmatter.json and optional section
64
+ files) per the spec in `agents/README.md`. `ralph`, `plan`, `ralph-plan`, and `strategy` all use
65
+ the composable layout. The flat `agents/*.agent.md` files are **generated output** — composed
66
+ from the canonical directories by the shared `bin/installers/copilot.mjs` code path behind both
67
+ `agent-cortex install copilot` and `scripts/build-copilot-agents.mjs` (thin wrapper), and
68
+ committed for Copilot CLI (plugin.json `agents: "agents/"` scans for `*.agent.md`); never edit
69
+ them by hand. The `claude/` subtree is generated by the install-time generator
70
+ `bin/installers/claude.mjs` (a plain `agent-cortex install claude` also registers the plugin
71
+ with Claude Code via the `claude plugin` CLI; `pnpm build:claude` is the generate-only alias,
72
+ running `agent-cortex install claude --output claude`; `ralph`
73
+ is authored natively in `agents-native/` and copied verbatim; the other agents compose from their
74
+ `claude/` harness dirs).
56
75
  - Keep orchestration logic in the agent file; extract shared per-task workflow into a skill
57
76
  so it can be reused (e.g. ralph delegates per-task stage execution to `run-pipeline-stage`).
58
77
 
@@ -65,6 +84,8 @@ Generated automatically by changesets. Do not edit `CHANGELOG.md` manually.
65
84
  commands — they should not add token overhead.
66
85
  - Extensions that persist data should write to `~/.pi/agent-cortex/` (global, cross-project)
67
86
  and tag records with the project path for per-project slicing.
87
+ - PI extensions with Claude Code equivalents are ported to `hooks/claude/`; the port/reject
88
+ audit with rationale lives in `docs/claude-hooks.md`.
68
89
 
69
90
  ## User preferences
70
91
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,77 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.39.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5d4159f: Handoff documents now end with a `## Starter prompt` section: a ready-to-paste first-message prompt pointing the next session at the handoff doc by absolute path and the artifacts it references, telling it to read those before acting, asking it to clean up any provisional artifacts unless the handoff says otherwise, and staying under ~150 words.
8
+ - 5351ae9: agent-cortex install claude now fully installs agent-cortex into Claude Code: it regenerates the claude/ subtree and registers it with the Claude Code runtime via the claude plugin CLI (--dry-run prints the plan without writing; --output <dir> generates only).
9
+
10
+ ### Patch Changes
11
+
12
+ - adb5f84: Add optional ASCII workflow diagram guidance (inclusion rules, style guide, template example) to the skill anatomy and reference it from write-a-skill
13
+ - 5d4159f: Fix create-chores to resolve `bd` via PATH by default instead of a machine-specific hardcoded path. The BD_PATH env override is retained for machines where bd is not on PATH.
14
+ - 3e8b6e7: Refactor the `hitl-collab` skill to the canonical anatomy template: added When to use / When NOT to use boundaries, Red Flags, Common Rationalizations, a worked handoff-doc example, and a verification checklist; switched bead updates to `--append-notes` so existing notes are preserved.
15
+ - b33d9ef: Refactor the improve-codebase-architecture skill to the anatomy template: add when-to-use / when-not-to-use boundaries, red flags, common rationalizations, philosophy, phase-gate checklists, cross-skill references, a worked example, and a verification checklist.
16
+ - da1e3dd: Add `bd dep add` line to the init-beads skill's embedded AGENTS.md quick-reference template so it matches the repo template and stops re-propagating the drift
17
+ - 358509f: Prune stale doc-contract prose assertions from the run-pipeline-stage progress test; re-enable the skills-script test suites in the pnpm workspace so they actually run in CI.
18
+ - 32b33ac: Refactor the record-idea skill to the anatomy template: add when-to-use boundaries, red flags, rationale, and a verification checklist; move the idea-record scaffold to FORMAT.md to match the generator script.
19
+ - 662cea5: Refactor the `classify-bead` skill to the anatomy template: adds when-not-to-use boundaries, red flags, common rationalizations, philosophy, and a verification checklist.
20
+ - bb01fd6: Refactor create-task skill to the anatomy template: adds When to use / When NOT to use, Red Flags, Common Rationalizations, verification checklist, and moves the bead-property contract detail to REFERENCE.md. No behavioural change — the create-chores script invocation contract is preserved exactly.
21
+ - 876e5cc: Refactor design-an-interface skill to the anatomy template: adds When to use, When NOT to use, verification checklist, phase gates, and rationalization sections while keeping the parallel sub-agent design workflow intact
22
+ - 00c4238: Refactor grill-with-docs to the anatomy template: add when-to-use boundaries, numbered workflow, red flags, common rationalizations, examples, and a verification checklist; consolidate the previously-dangling CONTEXT.md/ADR format links into REFERENCE.md.
23
+ - fd5f787: Refactor init-beads skill to the anatomy template: adds When to use / When NOT to use, Red Flags, Common Rationalizations, Cross-skill references, Examples, and a verification checklist. No behavioural change — the `bd init --quiet --stealth` invocation, install-method preference order, and AGENTS.md quick-reference block are preserved exactly.
24
+ - 608fb58: Refactor maintain-agent-docs skill to the canonical anatomy template: added When NOT to use, Philosophy, Red Flags, Common Rationalizations, Phase-gate checklist, Cross-skill references, Examples, and a concrete Verification checklist; tightened the description to the two-sentence format with quoted trigger phrases.
25
+ - 027431c: Refactor the `prd-to-tasks` skill to the canonical anatomy template: condensed the 5-phase workflow, moved the epic/task body templates into `REFERENCE.md`, added Examples and Phase-gate checklists, and aligned section ordering and voice with `docs/skills/skill-anatomy.md`.
26
+ - e80246a: Refactor the ralph skill to the canonical skill anatomy: add When to use / When NOT to use, Red Flags, Common Rationalizations, Philosophy, phase-gate checklists, cross-skill references, and a verification checklist; align the skill docs with the ralph agent definition (state.json for poll-timer and agent-ID→bead bookkeeping, parent-keyed stage log files, stage runners self-serving `bd prime`, and the single-feature-epic one-hop branching shortcut).
27
+ - d917afb: Refactor request-refactor-plan SKILL.md to the anatomy template; move the refactor plan template into FORMAT.md.
28
+ - d6d33ec: Refactor technical-direction skill to the canonical anatomy template, adding when-to-use/not-to-use boundaries, red flags, common rationalizations, cross-skill references, an examples section, and a verification checklist. The decision-memo template moves to FORMAT.md.
29
+ - 67a668f: Refactor the write-a-prd skill to the anatomy template: adds when-to-use/when-not-to-use boundaries, red flags, common rationalizations, phase gates, cross-skill references, an example, and a verification checklist; the PRD template moves to FORMAT.md.
30
+ - bedd373: Refactor the write-a-ticket skill to the canonical anatomy template: added when-to-use and when-not-to-use boundaries, red flags, common rationalizations, philosophy, cross-skill references, worked examples, and a verification checklist. The ticket template and per-section guidance are preserved.
31
+ - fd95ffe: Refactor run-pipeline-stage SKILL.md to the canonical anatomy template: add `When to use`, `When NOT to use`, `Workflow`, `Red Flags`, `Common Rationalizations`, `Cross-skill references`, `Examples`, `Philosophy / rationale`, and a `Verification checklist`; add quoted trigger phrases to the description; tokenize subagent dispatch as {{TOOL:task}}. No behavioural change to the stage pipeline — all playbooks, prompts, dispatch rules, and path references are preserved.
32
+
33
+ ## 1.38.1
34
+
35
+ ### Patch Changes
36
+
37
+ - 5def727: Fix generate-progress parser for current bd list format
38
+ - 735f083: Fix Release CI npm publish (ENEEDAUTH): the release job now publishes via npm Trusted Publishing (OIDC) — no `NPM_TOKEN` secret or `.npmrc` auth config. The `release` job's `id-token: write` permission is the only workflow-side requirement; npm exchanges the GitHub OIDC token for a short-lived npm token at publish time.
39
+
40
+ **One-time npm-side setup required** (no GitHub secret): on npmjs.com, open the package `@jaybeeuu/agent-cortex` → Access → Trusted Publishing → Add new publisher → GitHub, select the `jaybeeuu/agent-cortex` repository and the `.github/workflows/ci.yml` workflow. Publishing then needs no token configuration.
41
+
42
+ ## 1.38.0
43
+
44
+ ### Minor Changes
45
+
46
+ - fbc6fa5: Add the Copilot CLI harness installer (`agent-cortex install copilot`), sharing the generator with `pnpm build:copilot`. It regenerates the flat `agents/*.agent.md` files the Copilot plugin loads (plugin.json `agents: "agents/"`), with the same `--dry-run` / `--output` contract as the claude and pi installers.
47
+ - 42d3a33: Add central token-map.json mapping tool names, paths, and agent naming across the copilot, claude, and pi harnesses, with the token substitution contract for the install-time generation system. Use {{TOOL:...}} / {{PATH:...}} tokens in canonical sources; installers substitute per-harness names from the map.
48
+ - 3a7e896: Add using-agent-skills meta-skill with 8 core operating behaviors and skill routing tree. Routes incoming work to the right skill, enforces scope discipline, and flags persistent failures to the user instead of working around them.
49
+ - 4f5b134: Add a `wait_for_agents` tool to the subagent extension: it blocks until at least one background sub-agent (spawned with `task`) completes and returns its result, with `read_agent` kept as a fallback. Ralph's PI completion detection now waits on `wait_for_agents` instead of a `sleep 120` poll loop.
50
+ - e1180d5: Update the agent-modes extension to discover agents from the composable directory format (`agents/<name>/` + per-harness `pi/frontmatter.json`). The PI system prompt is composed from `agent.md`, resolving `{{SECTION:...}}` includes from the agent's `pi/` directory and substituting `{{TOOL:...}}` / `{{PATH:...}}` tokens via token-map.json, so tool restrictions now translate to real PI tool names (e.g. `view` → `read`, `web_fetch` → `fetch_content`, null-mapped tools dropped). Flat `*.agent.md` files remain supported as a fallback for agents that have not been migrated to composable directories yet.
51
+ - 603679a: Make the composable agent directories (`agents/<name>/`) canonical: the hand-authored flat `agents/*.agent.md` sources are removed and the flat Copilot/pi agent files are now generated output, composed from the canonical dirs by `scripts/build-copilot-agents.mjs` (`pnpm build:copilot`). `claude/agents/*.md` is composed from the same dirs' `claude/` harness by `scripts/build-claude-agents.mjs` (ralph stays native via `agents-native/ralph.md`). Agent names, descriptions, and tool sets are unchanged; agent bodies now carry the composable (tokenized) content. CI verifies both generated outputs never drift.
52
+ - 60d498f: Port the pi extensions with Claude equivalents to the Claude Code plugin's hooks:
53
+ SessionStart now also injects the using-agent-skills / bd-tool / git-workflow skill
54
+ policy, and a Notification hook matched on documented notification types
55
+ (`agent_completed|agent_needs_input|permission_prompt`) raises desktop notifications
56
+ via the bundled `hooks/scripts/notify.mjs`. Hook support scripts are now bundled
57
+ into `claude/hooks/` by the shared installer, and the audit (auto-name, skill-stats,
58
+ subagent, agent-modes rejected with rationale) is recorded in `docs/claude-hooks.md`.
59
+ - 6863b0e: Add `agent-cortex install claude` — install-time generator for the Claude Code plugin
60
+ subtree, sharing one code path with `pnpm build:claude` so the outputs can never diverge.
61
+ `claude/.claude-plugin/plugin.json` (version now tracked from `package.json`) and
62
+ `claude/hooks.json` (from the new canonical `hooks/claude/` source) are generated rather
63
+ than hand-maintained, and the committed `claude/skills/` gains the previously-missing
64
+ `using-agent-skills` symlink. Root tests (`test/`) are now included in `pnpm test`.
65
+ - f2b441e: Add the pi harness installer (`agent-cortex install pi`): composes agents from the canonical composable directories plus `pi/` sections, substitutes `{{TOOL:...}}` / `{{PATH:...}}` tokens against token-map.json's pi column (null-mapped tools dropped with warnings, paths resolved against the plugin root), and writes `<output>/agents/<name>.agent.md` plus token-substituted skill copies to `<output>/skills` (default `~/.pi/agent`). Supports `--dry-run`, `--output <dir>`, and an optional `--plugin-root <dir>` override. The shared composer gains pi-friendly options (`dropNullTools`, `pluginRoot`, `resolveRelativePaths`, `warn`) with the copilot/claude build defaults unchanged, and the root test suite is now wired into `pnpm test`.
66
+
67
+ ### Patch Changes
68
+
69
+ - 99fcc9a: Complete the move to install-time Claude code generation: the standalone `scripts/build-claude-agents.mjs` build script is removed and `pnpm build:claude` is now a pure alias of `agent-cortex install claude` — both invoke the shared `bin/installers/claude.mjs` generator, so there is a single code path for the committed `claude/` plugin subtree and install-time vs regenerated output can never diverge. Generated agents carry installer provenance headers, and CI's drift check (regenerate + `git diff --exit-code`) validates the committed subtree byte-for-byte against installer output. `agents-native/` remains the canonical source for Claude-native agents (`ralph`), copied verbatim by the installer.
70
+ - 9b0c4fc: Fix the release pipeline so Version Packages PRs regenerate generated output. `changesets/action` execs the `version`/`publish` inputs without a shell, so quoted multi-command strings crash (`bash -c '...'` split on whitespace → unterminated quote, exit 2). The chain now lives in exec-safe single-command pnpm scripts: `pnpm version-packages` bumps versions, syncs `plugin.json`, then regenerates the committed Claude/Copilot agent output so the drift gates never fail on the bumped version; `pnpm publish-package` performs the pack + provenance publish.
71
+ - f1b8a25: Add composable agent directory structures for the plan, ralph-plan, and strategy agents (`agents/plan/`, `agents/ralph-plan/`, `agents/strategy/` with per-harness `pi/`, `copilot/`, and `claude/` frontmatter). The existing flat `*.agent.md` files are retained until the composer/installer migration lands, so no shipped behaviour changes yet.
72
+ - d83a7cf: Add composable agent directory structure for the ralph agent (`agents/ralph/` with per-harness `pi/`, `copilot/`, and `claude/` frontmatter and polling sections). The existing flat `agents/ralph.agent.md` is retained until the composer/installer migration lands, so no shipped behaviour changes yet.
73
+ - c4728c5: Migrate hardcoded tool names in skill files to `{{TOOL:name}}` tokens (task, read_agent, bash, view, rg, glob) so installers can substitute per-harness names.
74
+
3
75
  ## 1.37.1
4
76
 
5
77
  ### Patch Changes