@jaybeeuu/agent-cortex 2.1.0 → 2.3.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 (181) hide show
  1. package/CHANGELOG.md +411 -0
  2. package/README.md +33 -13
  3. package/agents/README.md +22 -10
  4. package/agents/plan/agent.md +2 -2
  5. package/agents/ralph/agent.md +126 -88
  6. package/agents/ralph/claude/frontmatter.json +3 -3
  7. package/agents/ralph/claude/wake.md +46 -0
  8. package/agents/ralph/pi/{polling.md → wake.md} +35 -20
  9. package/agents/ralph-plan/agent.md +23 -11
  10. package/bin/agent-cortex.mjs +66 -4
  11. package/bin/installers/claude.mjs +182 -68
  12. package/bin/installers/pi.mjs +200 -24
  13. package/extensions/agent-guardrails/README.md +1 -1
  14. package/extensions/agent-guardrails/guardrails.ts +1 -1
  15. package/extensions/agent-guardrails/index.ts +1 -1
  16. package/extensions/agent-modes/discover.test.ts +2 -2
  17. package/extensions/output-style/README.md +1 -1
  18. package/extensions/output-style/index.ts +2 -2
  19. package/extensions/output-style/output-style.ts +2 -2
  20. package/hooks/claude/scripts/notify.mjs +8 -1
  21. package/lib/cli.mjs +91 -2
  22. package/package.json +27 -3
  23. package/scripts/check-changeset.mjs +4 -0
  24. package/scripts/check-no-sync.mjs +5 -1
  25. package/scripts/lib/compose-agent.mjs +69 -9
  26. package/scripts/lib/fs.mjs +10 -2
  27. package/scripts/lib/migrate.mjs +736 -0
  28. package/scripts/lib/release-gates.mjs +21 -1
  29. package/scripts/lib/skill-frontmatter.mjs +23 -6
  30. package/scripts/lib/skill-links.mjs +52 -0
  31. package/scripts/lib/verify-worker-tree.mjs +25 -0
  32. package/scripts/resolve-publish-command.mjs +4 -0
  33. package/skills/engineering/design-an-interface/SKILL.md +3 -3
  34. package/skills/engineering/grill-with-docs/SKILL.md +3 -5
  35. package/skills/engineering/improve-codebase-architecture/SKILL.md +5 -4
  36. package/skills/engineering/tdd/SKILL.md +5 -7
  37. package/skills/engineering/technical-direction/SKILL.md +5 -5
  38. package/skills/planning/classify-bead/REFERENCE.md +3 -3
  39. package/skills/planning/classify-bead/SKILL.md +14 -9
  40. package/skills/planning/classify-bead/scripts/classify-bead.mjs +5 -4
  41. package/skills/planning/create-task/REFERENCE.md +52 -3
  42. package/skills/planning/create-task/SKILL.md +70 -26
  43. package/skills/planning/create-task/scripts/{create-chores.ts → create-chores.mjs} +48 -23
  44. package/skills/planning/flesh-out-idea/REFERENCE.md +116 -0
  45. package/skills/planning/flesh-out-idea/SKILL.md +146 -0
  46. package/skills/planning/prd-to-tasks/REFERENCE.md +54 -5
  47. package/skills/planning/prd-to-tasks/SKILL.md +22 -16
  48. package/skills/planning/record-idea/FORMAT.md +66 -17
  49. package/skills/planning/record-idea/SKILL.md +48 -24
  50. package/skills/planning/request-refactor-plan/SKILL.md +4 -4
  51. package/skills/planning/spec-to-tickets/SKILL.md +5 -5
  52. package/skills/planning/write-a-prd/SKILL.md +8 -9
  53. package/skills/planning/write-a-ticket/SKILL.md +4 -6
  54. package/skills/productivity/bd-tool/SKILL.md +15 -10
  55. package/skills/productivity/grill-me/SKILL.md +5 -0
  56. package/skills/productivity/init-beads/SKILL.md +3 -3
  57. package/skills/productivity/migration/REFERENCE.md +227 -0
  58. package/skills/productivity/migration/SKILL.md +188 -0
  59. package/skills/productivity/validate-agent-dir/scripts/{validate-agent-dir.ts → validate-agent-dir.mjs} +49 -28
  60. package/skills/productivity/write-a-skill/SKILL.md +5 -5
  61. package/skills/review/maintain-agent-docs/SKILL.md +5 -7
  62. package/skills/review/refactor-skill/SKILL.md +4 -3
  63. package/skills/review/review-security/SKILL.md +3 -5
  64. package/skills/style/style-code/SKILL.md +5 -10
  65. package/skills/style/style-comms/SKILL.md +5 -7
  66. package/skills/style/style-documentation/SKILL.md +5 -6
  67. package/skills/style/style-tests/SKILL.md +5 -7
  68. package/skills/workflow/git-workflow/SKILL.md +52 -26
  69. package/skills/workflow/hitl-collab/SKILL.md +4 -6
  70. package/skills/workflow/plan/SKILL.md +41 -30
  71. package/skills/workflow/ralph/REFERENCE.md +182 -51
  72. package/skills/workflow/ralph/SKILL.md +89 -50
  73. package/skills/workflow/run-pipeline-stage/SKILL.md +72 -71
  74. package/skills/workflow/run-pipeline-stage/playbooks/code.md +11 -0
  75. package/skills/workflow/run-pipeline-stage/playbooks/document.md +12 -0
  76. package/skills/workflow/run-pipeline-stage/playbooks/fix.md +12 -0
  77. package/skills/workflow/run-pipeline-stage/playbooks/review.md +11 -0
  78. package/skills/workflow/run-pipeline-stage/playbooks/verify.md +13 -0
  79. package/skills/workflow/run-pipeline-stage/prompts/stage-runner.md +73 -1
  80. package/token-map.README.md +9 -4
  81. package/token-map.json +13 -6
  82. package/.agents/skills/style-versioning/SKILL.md +0 -172
  83. package/.changeset/README.md +0 -8
  84. package/.changeset/config.json +0 -11
  85. package/.github/workflows/ci.yml +0 -302
  86. package/.junie/guidelines.md +0 -87
  87. package/.junie/mcp/mcp.json +0 -10
  88. package/AGENTS.md +0 -153
  89. package/agents/ralph/claude/polling.md +0 -31
  90. package/agents-native/ralph.md +0 -203
  91. package/docs/claude-hooks.md +0 -144
  92. package/docs/commit-signing.md +0 -231
  93. package/docs/ideas/auto-model-selection.md +0 -75
  94. package/docs/ideas/ban-content-assertion-tests.md +0 -75
  95. package/docs/ideas/bead-progress-notes-for-session-resumption.md +0 -75
  96. package/docs/ideas/classify-beads-via-deterministic-script-with-agent-fallback.md +0 -70
  97. package/docs/ideas/ctx-alias-version-and-update-commands.md +0 -65
  98. package/docs/ideas/ctx-feedback-command-for-capturing-ideas-from-any-machine.md +0 -67
  99. package/docs/ideas/dedicated-review-tests-skill.md +0 -71
  100. package/docs/ideas/deployment-beads-for-post-merge-pipelines.md +0 -36
  101. package/docs/ideas/design-and-delivery-as-separate-bead-trees/design-and-delivery-as-separate-bead-trees.md +0 -99
  102. package/docs/ideas/enable-signed-commit-enforcement-changesets-bot-commits-must-be-signed.md +0 -42
  103. package/docs/ideas/extension-manifests.md +0 -121
  104. package/docs/ideas/improve-pi-system-prompt.md +0 -43
  105. package/docs/ideas/map-every-cortex-tool-to-a-real-pi-equivalent.md +0 -95
  106. package/docs/ideas/model-selector.md +0 -40
  107. package/docs/ideas/pi-task-memory.md +0 -34
  108. package/docs/ideas/qa-extension.md +0 -43
  109. package/docs/ideas/record-idea-implementation-questions.md +0 -68
  110. package/docs/ideas/record-ideas-as-beads.md +0 -115
  111. package/docs/ideas/self-flushing-session.md +0 -72
  112. package/docs/ideas/state-in-beads-not-md.md +0 -69
  113. package/docs/ideas/subagent-visibility.md +0 -72
  114. package/docs/ideas/task-session-context.local.md +0 -95
  115. package/docs/ideas/task-session-context.md +0 -89
  116. package/docs/ideas/test-data-creation-helpers.md +0 -92
  117. package/docs/ideas/test-planning-stage-bead-in-feature-planning.md +0 -68
  118. package/docs/ideas/unified-ci-pipeline.md +0 -28
  119. package/docs/ideas/unify-the-ticket-and-task-decomposition-workflows.md +0 -71
  120. package/docs/ideas/worktree-housekeeping-for-closed-beads.md +0 -39
  121. package/docs/inspirations.md +0 -33
  122. package/docs/research/disable-model-invocation.md +0 -82
  123. package/docs/research/gas-city-research.md +0 -256
  124. package/docs/research/skill-design-research.md +0 -286
  125. package/docs/research/skill-improvements-analysis.md +0 -117
  126. package/docs/research/skill-patterns-research.md +0 -24
  127. package/docs/skills/skill-anatomy.md +0 -200
  128. package/docs/technical-direction/harness-config.md +0 -177
  129. package/docs/technical-direction/migration-execution-labels.md +0 -177
  130. package/docs/user-preferences.md +0 -17
  131. package/extensions/agent-guardrails/tsconfig.json +0 -12
  132. package/extensions/agent-modes/tsconfig.json +0 -12
  133. package/extensions/output-style/tsconfig.json +0 -12
  134. package/extensions/session-start/tsconfig.json +0 -12
  135. package/extensions/skill-stats/pnpm-lock.yaml +0 -329
  136. package/extensions/skill-stats/tsconfig.json +0 -12
  137. package/extensions/subagent/agents/planner.md +0 -37
  138. package/extensions/subagent/agents/reviewer.md +0 -35
  139. package/extensions/subagent/agents/scout.md +0 -50
  140. package/extensions/subagent/agents/worker.md +0 -24
  141. package/extensions/subagent/prompts/implement-and-review.md +0 -10
  142. package/extensions/subagent/prompts/implement.md +0 -10
  143. package/extensions/subagent/prompts/scout-and-plan.md +0 -9
  144. package/extensions/subagent/tsconfig.json +0 -12
  145. package/pi/keybindings.json +0 -3
  146. package/pi/settings.json +0 -34
  147. package/pnpm-workspace.yaml +0 -14
  148. package/skills/planning/create-task/scripts/package.json +0 -14
  149. package/skills/planning/create-task/scripts/pnpm-lock.yaml +0 -342
  150. package/skills/planning/create-task/scripts/tsconfig.json +0 -12
  151. package/skills/planning/record-idea/scripts/new-idea.sh +0 -89
  152. package/skills/productivity/validate-agent-dir/scripts/package.json +0 -15
  153. package/skills/productivity/validate-agent-dir/scripts/pnpm-lock.yaml +0 -329
  154. package/skills/productivity/validate-agent-dir/scripts/pnpm-workspace.yaml +0 -2
  155. package/skills/productivity/validate-agent-dir/scripts/tsconfig.json +0 -19
  156. package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.test.ts +0 -317
  157. package/skills/workflow/run-pipeline-stage/REFERENCE.md +0 -22
  158. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.test.ts +0 -682
  159. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +0 -588
  160. package/skills/workflow/run-pipeline-stage/scripts/package.json +0 -15
  161. package/skills/workflow/run-pipeline-stage/scripts/pnpm-lock.yaml +0 -342
  162. package/skills/workflow/run-pipeline-stage/scripts/pnpm-workspace.yaml +0 -2
  163. package/skills/workflow/run-pipeline-stage/scripts/tsconfig.json +0 -12
  164. package/test/classify-bead.test.mjs +0 -277
  165. package/test/claude-installer.test.mjs +0 -308
  166. package/test/cli.test.mjs +0 -314
  167. package/test/create-chores.test.mjs +0 -85
  168. package/test/fake-bd.test.mjs +0 -72
  169. package/test/fs.test.mjs +0 -76
  170. package/test/helpers/fake-bd.mjs +0 -87
  171. package/test/helpers/fake-claude.mjs +0 -152
  172. package/test/helpers/fake-pi.mjs +0 -132
  173. package/test/installer.test.mjs +0 -806
  174. package/test/notify-hook.test.mjs +0 -63
  175. package/test/pending-gates.test.mjs +0 -147
  176. package/test/pi-installer.test.mjs +0 -785
  177. package/test/pi-register.test.mjs +0 -342
  178. package/test/pi-sweep.test.mjs +0 -619
  179. package/test/release-gates.test.mjs +0 -190
  180. package/test/skill-frontmatter.test.mjs +0 -137
  181. package/test/verify-worker-tree.test.mjs +0 -120
@@ -1,8 +0,0 @@
1
- # Changesets
2
-
3
- Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
- with multi-package repos, or single-package repos to help you version and publish your code. You can
5
- find the full documentation for it [in our repository](https://github.com/changesets/changesets).
6
-
7
- We have a quick list of common questions to get you started engaging with this project in
8
- [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
3
- "changelog": "@changesets/cli/changelog",
4
- "commit": false,
5
- "fixed": [],
6
- "linked": [],
7
- "access": "public",
8
- "baseBranch": "main",
9
- "updateInternalDependencies": "patch",
10
- "ignore": []
11
- }
@@ -1,302 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- # The default types (opened/synchronize/reopened) would make the documented
9
- # `no-publish` opt-out unreachable: labelling a PR after the check failed
10
- # would never re-trigger it, and a manual re-run replays the original event
11
- # payload. Label events keep the gate honest in both directions — adding the
12
- # label turns it green, removing it turns it red again.
13
- types: [opened, synchronize, reopened, labeled, unlabeled]
14
-
15
- jobs:
16
- setup:
17
- name: Setup
18
- runs-on: ubuntu-latest
19
- steps:
20
- - name: Checkout
21
- uses: actions/checkout@v4
22
-
23
- - name: Setup Node
24
- uses: actions/setup-node@v6
25
- with:
26
- node-version: 24
27
-
28
- - name: Setup pnpm
29
- uses: pnpm/action-setup@v4
30
- with:
31
- version: 12
32
- run_install: false
33
-
34
- - name: Cache pnpm store
35
- uses: actions/cache@v4
36
- with:
37
- path: ~/.pnpm-store
38
- key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
39
- restore-keys: |
40
- ${{ runner.os }}-pnpm-
41
-
42
- - name: Install dependencies
43
- run: pnpm install --frozen-lockfile
44
-
45
- - name: Build
46
- run: pnpm build
47
-
48
-
49
- changeset-check:
50
- name: Changeset check
51
- # The gate is a pure, idempotent recomputation of the diff plus PR metadata,
52
- # so every pull_request event must run it. Do NOT narrow this to the
53
- # labels that can change the verdict: GitHub reports a skipped job as a
54
- # success (docs.github.com - about-status-checks), so skipping on unrelated
55
- # label churn would silently turn a failing gate green and let a
56
- # changeset-less PR merge.
57
- if: github.event_name == 'pull_request'
58
- runs-on: ubuntu-latest
59
- steps:
60
- - name: Checkout
61
- uses: actions/checkout@v4
62
- with:
63
- fetch-depth: 0
64
-
65
- - name: Setup Node
66
- uses: actions/setup-node@v6
67
- with:
68
- node-version: 24
69
-
70
- # Publishing is the default: every PR must add a changeset. The only
71
- # exemptions are the changesets bot's Version Packages PR (it consumes
72
- # changesets and adds none) and PRs explicitly labelled `no-publish`.
73
- # Deciding that in code keeps the rule unit-tested; this step only feeds
74
- # it the diff and the PR metadata.
75
- - name: Require a changeset unless labelled no-publish
76
- env:
77
- BASE_REF: ${{ github.event.pull_request.base.ref }}
78
- PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
79
- PR_ACTOR: ${{ github.event.pull_request.user.login }}
80
- PR_LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }}
81
- run: |
82
- git diff --name-status "origin/${BASE_REF}...HEAD" | node scripts/check-changeset.mjs
83
-
84
- lint:
85
- name: Lint
86
- needs: setup
87
- runs-on: ubuntu-latest
88
- steps:
89
- - name: Checkout
90
- uses: actions/checkout@v4
91
-
92
- - name: Setup Node
93
- uses: actions/setup-node@v6
94
- with:
95
- node-version: 24
96
-
97
- - name: Cache pnpm store
98
- uses: actions/cache@v4
99
- with:
100
- path: ~/.pnpm-store
101
- key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
102
- restore-keys: |
103
- ${{ runner.os }}-pnpm-
104
-
105
- - name: Setup pnpm
106
- uses: pnpm/action-setup@v4
107
- with:
108
- version: 12
109
- run_install: false
110
-
111
- - name: Install dependencies
112
- run: pnpm install --frozen-lockfile
113
-
114
- - name: Lint
115
- run: pnpm lint
116
-
117
- test:
118
- name: Test
119
- needs: setup
120
- runs-on: ubuntu-latest
121
- steps:
122
- - name: Checkout
123
- uses: actions/checkout@v4
124
-
125
- - name: Setup Node
126
- uses: actions/setup-node@v6
127
- with:
128
- node-version: 24
129
-
130
- - name: Cache pnpm store
131
- uses: actions/cache@v4
132
- with:
133
- path: ~/.pnpm-store
134
- key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
135
- restore-keys: |
136
- ${{ runner.os }}-pnpm-
137
-
138
- - name: Setup pnpm
139
- uses: pnpm/action-setup@v4
140
- with:
141
- version: 12
142
- run_install: false
143
-
144
- - name: Install dependencies
145
- run: pnpm install --frozen-lockfile
146
-
147
- - name: Test
148
- run: pnpm test
149
-
150
- claude-plugin-check:
151
- name: Claude plugin materialiser check
152
- needs: setup
153
- runs-on: ubuntu-latest
154
- steps:
155
- - name: Checkout
156
- uses: actions/checkout@v4
157
-
158
- - name: Setup Node
159
- uses: actions/setup-node@v6
160
- with:
161
- node-version: 24
162
-
163
- - name: Cache pnpm store
164
- uses: actions/cache@v4
165
- with:
166
- path: ~/.pnpm-store
167
- key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
168
- restore-keys: |
169
- ${{ runner.os }}-pnpm-
170
-
171
- - name: Setup pnpm
172
- uses: pnpm/action-setup@v4
173
- with:
174
- version: 12
175
- run_install: false
176
-
177
- - name: Install dependencies
178
- run: pnpm install --frozen-lockfile
179
-
180
- # The claude/ subtree is retired — the installer is the only generator
181
- # (plain `agent-cortex install claude` materialises ~/.agent-cortex/claude;
182
- # `--output <dir>` is generate-only for tests). There is no committed
183
- # output to diff, so this job validates the materialiser itself: it must
184
- # produce a complete, structural plugin (generated + hand-authored pieces),
185
- # no symlinks, no literal {{TOOL:/{{PATH:/{{SECTION: tokens, and a
186
- # plugin.json version tracking the package — exactly what a real install
187
- # would ship.
188
- - name: Materialise the Claude plugin and run structural checks
189
- run: |
190
- set -euo pipefail
191
- OUT="$RUNNER_TEMP/claude-plugin-check"
192
- node bin/agent-cortex.mjs install claude --output "$OUT"
193
-
194
- # structure: generated + hand-authored pieces all present
195
- test -f "$OUT/.claude-plugin/plugin.json"
196
- test -f "$OUT/agents/plan.md"
197
- test -f "$OUT/agents/ralph.md"
198
- test -f "$OUT/skills/tdd/SKILL.md"
199
- test -f "$OUT/hooks.json"
200
- test -f "$OUT/hooks/scripts/notify.mjs"
201
- test -f "$OUT/.mcp.json"
202
- test -f "$OUT/scripts/statusline-command.sh"
203
-
204
- # flat-copy guarantee: no symlinks in the materialised tree
205
- if [ -n "$(find "$OUT" -type l)" ]; then
206
- echo "::error::symlinks found in materialised Claude plugin"
207
- exit 1
208
- fi
209
-
210
- # token substitution: no literal tokens survive materialisation
211
- TOKENS=$(grep -rlE '\{\{(TOOL|PATH|SECTION):' "$OUT" || true)
212
- if [ -n "$TOKENS" ]; then
213
- echo "::error::literal substitution tokens in materialised Claude plugin:"
214
- echo "$TOKENS"
215
- exit 1
216
- fi
217
-
218
- # plugin version tracks the package (never stale)
219
- PKG_VERSION=$(node -p "require('./package.json').version")
220
- PLUGIN_VERSION=$(node -p "require('$OUT/.claude-plugin/plugin.json').version")
221
- test "$PKG_VERSION" = "$PLUGIN_VERSION"
222
-
223
- release:
224
- name: Release
225
- needs: [lint, test, claude-plugin-check]
226
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
227
- runs-on: ubuntu-latest
228
- permissions:
229
- contents: write
230
- pull-requests: write
231
- # npm Trusted Publishing (OIDC): npm exchanges this id-token for a
232
- # short-lived npm token at publish time — no token config or secret.
233
- id-token: write
234
- concurrency: ${{ github.workflow }}-${{ github.ref }}
235
- steps:
236
- - name: Checkout
237
- uses: actions/checkout@v4
238
- with:
239
- fetch-depth: 0
240
-
241
- - name: Setup Node
242
- uses: actions/setup-node@v6
243
- with:
244
- node-version: 24
245
-
246
- - name: Cache pnpm store
247
- uses: actions/cache@v4
248
- with:
249
- path: ~/.pnpm-store
250
- key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
251
- restore-keys: |
252
- ${{ runner.os }}-pnpm-
253
-
254
- - name: Setup pnpm
255
- uses: pnpm/action-setup@v4
256
- with:
257
- version: 12
258
- run_install: false
259
-
260
- - name: Install dependencies
261
- run: pnpm install --frozen-lockfile
262
-
263
- # Labels are invisible on a push event, so resolve the PR merged for this
264
- # commit through the API and read its labels. No new secret or scope: the
265
- # job already holds pull-requests: write, gh is preinstalled, and
266
- # GITHUB_TOKEN is already here. A commit with no merged PR (direct push)
267
- # resolves to no labels — publish stays the default, so attempting to
268
- # publish an already-published version still fails loudly.
269
- - name: Resolve publish command
270
- id: gate
271
- env:
272
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
273
- run: |
274
- labels=$(gh api "repos/${{ github.repository }}/commits/${{ github.sha }}/pulls" \
275
- --jq '[.[] | select(.merged_at != null) | .labels[].name]')
276
- publish=$(node scripts/resolve-publish-command.mjs "$labels")
277
- echo "publish=${publish}" >> "$GITHUB_OUTPUT"
278
-
279
- - name: Create Release Pull Request or Publish
280
- id: changesets
281
- uses: changesets/action@v1
282
- with:
283
- # changesets/action execs these inputs via @actions/exec with NO shell:
284
- # the string is split by argStringToArray on whitespace (single quotes
285
- # survive literally), so each must be a single unquoted command token
286
- # that runs a pnpm script. version-packages bumps the package version
287
- # and rewrites CHANGELOG.md, and nothing else is committed: the Claude
288
- # plugin is materialised at install time with the package version, so
289
- # there is no committed output to regenerate.
290
- version: pnpm version-packages
291
- # pnpm publish-package when the merged PR is unlabelled, pnpm
292
- # publish-noop when it carries `no-publish`.
293
- publish: ${{ steps.gate.outputs.publish }}
294
- commit: "chore: version packages"
295
- title: "chore: version packages"
296
- env:
297
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
298
- # Publish authenticates via npm Trusted Publishing (OIDC token
299
- # exchange at publish time) — no NPM_TOKEN secret, no token config.
300
- # Requires the one-time npm-side setup: npmjs.com → @jaybeeuu/
301
- # agent-cortex → Access → Trusted Publishing, tied to GitHub repo
302
- # jaybeeuu/agent-cortex + workflow .github/workflows/ci.yml.
@@ -1,87 +0,0 @@
1
- # Beads Issue Tracking Instructions
2
-
3
- This project uses **Beads (bd)** for issue tracking. Use the bd CLI or MCP tools for all task management.
4
-
5
- ## Core Workflow Rules
6
-
7
- 1. **Track ALL work in bd** - Never use markdown TODOs or comment-based task lists
8
- 2. **Check ready work first** - Run `bd ready` to find unblocked issues
9
- 3. **Always include descriptions** - Provide meaningful context when creating issues
10
- 4. **Link discovered work** - Use `discovered-from` dependencies for issues found during work
11
- 5. **Sync at session end** - Run `bd dolt push` before ending your session
12
-
13
- ## Quick Command Reference
14
-
15
- ### Finding Work
16
- ```bash
17
- bd ready # Show unblocked issues ready for work
18
- bd list --status open # List all open issues
19
- bd show <id> # View issue details
20
- bd blocked # Show blocked issues and their blockers
21
- ```
22
-
23
- ### Creating Issues
24
- ```bash
25
- bd create "Title" --description="Details" -t bug|feature|task -p 0-4 --json
26
- bd create "Found bug" --description="Details" --deps discovered-from:bd-42 --json
27
- ```
28
-
29
- ### Working on Issues
30
- ```bash
31
- bd update <id> --claim # Claim work atomically
32
- bd update <id> --priority 1 # Change priority
33
- bd close <id> --reason "Completed" # Mark complete
34
- ```
35
-
36
- ### Dependencies
37
- ```bash
38
- bd dep add <issue> <depends-on> # Add dependency (issue depends on depends-on)
39
- bd dep add <issue> <depends-on> --type=related # Soft link
40
- ```
41
-
42
- ### Syncing
43
- ```bash
44
- bd dolt push # ALWAYS run at session end - commits and pushes changes
45
- ```
46
-
47
- ## Issue Types
48
-
49
- - `bug` - Something broken that needs fixing
50
- - `feature` - New functionality
51
- - `task` - Work item (tests, docs, refactoring)
52
- - `epic` - Large feature composed of multiple issues
53
- - `chore` - Maintenance work (dependencies, tooling)
54
-
55
- ## Priorities
56
-
57
- - `0` - Critical (security, data loss, broken builds)
58
- - `1` - High (major features, important bugs)
59
- - `2` - Medium (default, nice-to-have)
60
- - `3` - Low (polish, optimization)
61
- - `4` - Backlog (future ideas)
62
-
63
- ## MCP Tools Available
64
-
65
- If the MCP server is configured, you can use these tools directly:
66
- - `mcp_beads_ready` - Find ready tasks
67
- - `mcp_beads_list` - List issues with filters
68
- - `mcp_beads_show` - Show issue details
69
- - `mcp_beads_create` - Create new issues
70
- - `mcp_beads_update` - Update issue status/priority
71
- - `mcp_beads_close` - Close completed issues
72
- - `mcp_beads_dep` - Manage dependencies
73
- - `mcp_beads_blocked` - Show blocked issues
74
- - `mcp_beads_stats` - Get issue statistics
75
-
76
- ## Important Rules
77
-
78
- - ✅ Use bd for ALL task tracking
79
- - ✅ Always use `--json` flag for programmatic use
80
- - ✅ Link discovered work with `discovered-from` dependencies
81
- - ✅ Check `bd ready` before asking "what should I work on?"
82
- - ✅ Run `bd dolt push` at end of session
83
- - ❌ Do NOT create markdown TODO lists
84
- - ❌ Do NOT use external issue trackers
85
- - ❌ Do NOT duplicate tracking systems
86
-
87
- For more details, run `bd --help` or see the project's AGENTS.md file.
@@ -1,10 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "beads": {
4
- "args": [
5
- "mcp"
6
- ],
7
- "command": "bd"
8
- }
9
- }
10
- }
package/AGENTS.md DELETED
@@ -1,153 +0,0 @@
1
- # AGENTS.md
2
-
3
- Instructions for agents working on this repository.
4
-
5
- ## What This Repo Is
6
-
7
- A personal collection of custom agents and skills, shipped to pi and Claude Code, plus PI
8
- extensions and Claude hooks for enhancing the coding agent runtime. Changes here affect the
9
- behaviour of every agent, skill, and PI extension available in the author's coding sessions.
10
-
11
- ## Structure
12
-
13
- ```
14
- agent-cortex/
15
- ├── package.json # PI package manifest (pi: { extensions, skills }) + pi runtime deps
16
- ├── agents/ # Custom agents — canonical composable <name>/ dirs
17
- │ ├── ralph/ # composable format (shared agent.md + pi/, claude/) — see agents/README.md
18
- │ ├── plan/ # "
19
- │ ├── ralph-plan/ # "
20
- │ └── strategy/ # "
21
- ├── skills/ # Grouped by domain, discovered recursively
22
- │ ├── planning/ # Scope, spec, decompose
23
- │ ├── engineering/ # The coding loop
24
- │ ├── productivity/ # Workflow tooling
25
- │ ├── style/ # Conventions and standards
26
- │ ├── workflow/ # Orchestration and pipeline
27
- │ └── review/ # Auditing and maintenance
28
- ├── extensions/ # PI extensions (one directory per extension, each with index.ts)
29
- │ └── skill-stats/
30
- │ ├── README.md # Installation & usage
31
- │ └── index.ts # Extension entrypoint
32
- ├── hooks/ # Canonical Claude Code hooks (hooks.json + scripts — see docs/claude-hooks.md)
33
- │ └── claude/ # generated into the plugin's hooks.json + hooks/ by bin/installers/claude.mjs
34
- ├── claude/ # Committed Claude user-settings template — merged into ~/.claude/settings.json on install
35
- ├── claude-extras/ # Hand-authored Claude plugin extras
36
- │ ├── .mcp.json # MCP servers (context7, github) — copied into installs
37
- │ └── scripts/ # statusline-command.sh — copied into installs (executable)
38
- └── package.json # PI package manifest (pi: { extensions, skills }) + pi runtime deps
39
- ```
40
-
41
- ## Versioning
42
-
43
- Use `pnpm changeset` for all version bumps. Never edit versions manually.
44
- `package.json` and `CHANGELOG.md` stay in lockstep automatically.
45
- See the `style-versioning` skill for the full workflow.
46
-
47
- ## Changelog
48
-
49
- Generated automatically by changesets. Do not edit `CHANGELOG.md` manually.
50
-
51
- ## Coding Conventions
52
-
53
- - **Landing method**: pull requests are squash-merged. Merge commits are disabled in the
54
- repository settings and `main` requires linear history, so a branch's own commit shape never
55
- reaches `main` — bring a behind branch up to date by merging `main` in rather than rebasing it.
56
- `docs/commit-signing.md` records why squash is the only landing path that produces a signed
57
- commit; the rebase-versus-merge reasoning lives in the `git-workflow` skill.
58
- - **Never block the main thread**: no `*Sync` functions (`readFileSync`, `spawnSync`, …).
59
- Tooling code in `bin/`, `scripts/`, `lib/`, `hooks/`, and `test/` must be async —
60
- enforced by `scripts/check-no-sync.mjs` (runs via `pnpm lint`). Skill-owned
61
- scripts (`skills/*/scripts`) and `extensions/` are the remaining sync surfaces.
62
- - **Share generic tooling helpers in `scripts/lib/`**: tooling code (installers under
63
- `bin/installers/`, hooks, other scripts) imports shared utilities from `scripts/lib/`
64
- (e.g. `compose-agent.mjs`, `fs.mjs`) rather than redefining them inline.
65
-
66
- ## Skill Conventions
67
-
68
- - **Skills are portable, not repo documentation.** `skills/` is installed onto arbitrary machines
69
- (pi, Claude Code), so it describes general practice and the author's portable
70
- preferences — never how this repository is configured or how to work in it. Facts about this
71
- checkout (branch bases, merge method, signature rules, required checks, release mechanics) belong
72
- in `AGENTS.md`, `docs/`, or the tracker. Repo-local `.agents/skills/` follows the same rule: a
73
- skill is a skill, not a place for this repo's configuration.
74
- - `SKILL.md` must include a YAML front-matter block with `name` and `description`. `pnpm lint`
75
- enforces this (`pnpm check:skills`), because PI silently drops a skill whose frontmatter it
76
- cannot parse.
77
- - `description` must be ≤ 1024 characters. First sentence: what it does. Second: "Use when…".
78
- - Keep `SKILL.md` near the ~150-line target in `docs/skills/skill-anatomy.md`, overflowing into
79
- purpose-named support files (`REFERENCE.md`, `EXAMPLES.md`, `FORMAT.md`). `style-tests`
80
- deliberately sits at the top of that range rather than splitting — its principles must load
81
- automatically with the skill.
82
- - Add utility scripts to `scripts/` when an operation is deterministic and would otherwise be
83
- regenerated each time (e.g. install scripts, scanners).
84
- - Skill names use kebab-case and are grouped by prefix where related (e.g. `review-security`,
85
- `review-code`; `style-code`, `style-comms`, `style-documentation`).
86
-
87
- ## Agent Conventions
88
-
89
- - Agents live in composable `<name>/` directories under `agents/`: a shared `agent.md` body plus
90
- per-harness subdirectories `pi/` and `claude/` (frontmatter.json and optional section files) per
91
- the spec in `agents/README.md`. `ralph`, `plan`, `ralph-plan`, and `strategy` all use the
92
- composable layout, and no flat agent file is committed — each harness renders its own at install
93
- time. The Claude plugin is materialised by the install-time generator
94
- `bin/installers/claude.mjs`: a plain `agent-cortex install claude` copies it into
95
- `~/.agent-cortex/claude` (skills copied flat with `{{TOOL:...}}`/`{{PATH:...}}` substituted,
96
- never symlinked), writes the marketplace manifest at
97
- `~/.agent-cortex/.claude-plugin/marketplace.json`, merges the committed `claude/settings.json`
98
- template into `~/.claude/settings.json`, and registers it with Claude Code via the
99
- `claude plugin` CLI. The settings merge preserves personal config: the CLI owns exactly
100
- `enabledPlugins` + `extraKnownMarketplaces`, and every other key is left untouched. Only
101
- that settings template is committed under `claude/` — the generated plugin subtree is not;
102
- hand-authored plugin extras live in `claude-extras/` (`.mcp.json`, `scripts/`), and
103
- `--output <dir>` is the generate-only form (tests/CI materialiser checks); `ralph`
104
- is authored natively in `agents-native/` and copied verbatim; the other agents compose from their
105
- `claude/` harness dirs).
106
- - The pi package is materialised by `bin/installers/pi.mjs`: `agent-cortex install pi` stages a
107
- self-contained pi package in `~/.agent-cortex/pi` (manifest, flat rendered agents, token-substituted
108
- skills, a copy of `extensions/`, `token-map.json`, and the bundled `pi.packages` closure under
109
- `node_modules/`) and registers that directory with pi through the `pi` CLI — pi's own
110
- `~/.pi/agent/settings.json` is read, never written. `--output <dir>` stages only (no registration,
111
- no sweep) and `--dry-run` reports the plan. Once registration succeeds, a one-shot migration sweeps
112
- the copies the pre-staged-model installer rendered into `~/.pi/agent`, attributing them by name from
113
- the package root and recording completion in `~/.agent-cortex/legacy-sweep.json`; `~/.pi/agent/extensions`
114
- is never touched. Run it from the main checkout: the staged package is a snapshot of the checkout you
115
- invoked, so a run from a ralph worktree stages that worktree's content.
116
- - Keep orchestration logic in the agent file; extract shared per-task workflow into a skill
117
- so it can be reused (e.g. ralph delegates per-task stage execution to `run-pipeline-stage`).
118
-
119
- ## PI Extension Conventions
120
-
121
- - PI extensions live in `extensions/`, one subdirectory per extension.
122
- - Each extension directory contains `index.ts` (entrypoint) and `README.md` (usage).
123
- - Extensions are auto-discovered when the repo is installed as a PI package via `pi install`.
124
- - Keep extensions lightweight: no internal LLM calls. Extensions observe events and provide
125
- commands — they should not add token overhead.
126
- - Register CLI flags from the extension factory (load time), never from a `session_start`
127
- handler: PI matches parsed CLI flags against the extensions loaded at startup, so late
128
- registration makes the flag fail with `Unknown option`.
129
- - Extensions that persist data should write to `~/.pi/agent-cortex/` (global, cross-project)
130
- and tag records with the project path for per-project slicing.
131
- - PI extensions with Claude Code equivalents are ported to `hooks/claude/`; the port/reject
132
- audit with rationale lives in `docs/claude-hooks.md`.
133
-
134
- ## User preferences
135
-
136
- Before making tooling or workflow decisions, read `docs/user-preferences.md` for the
137
- user's personal development preferences (e.g. preferred package manager, tooling
138
- choices). These preferences apply across all projects where this plugin is active.
139
-
140
- ## Task tracking
141
-
142
- This project uses **bd (beads)** for task tracking.
143
-
144
- Run `bd prime` at the start of each session for context.
145
-
146
- Quick reference:
147
- - `bd ready` — list unblocked work
148
- - `bd create "Title" -p <0-3>` — create a task (P0 = critical)
149
- - `bd update <id> --claim` — claim a task
150
- - `bd close <id>` — complete a task
151
- - `bd dep add <A> <B>` — **"A depends on B"** (B blocks A). First arg waits, second arg
152
- is waited-for. To express "X blocks Y", write `bd dep add Y X`.
153
- - `bd dolt push` — sync to remote at session end
@@ -1,31 +0,0 @@
1
- ## Spawning subagents (Claude Code)
2
-
3
- RALPH HAS ONLY ONE WAY TO SPAWN SUBAGENTS: call the **`Task`** tool (not bash, not any other tool).
4
-
5
- **`Task`** — Spawn a background sub-agent and return a task ID immediately.
6
- - `prompt` (string, required): Full task prompt for the sub-agent.
7
- - `cwd` (string, optional): Working directory for the sub-agent (default: current project root). Always set this to the feature worktree path when running stage chores.
8
- - `model`, `subagent_type` (optional): Overrides for the worker; the Implementer and Reviewer workers keep the default (full reasoning), the Fix worker uses `model: haiku`.
9
-
10
- The response is a plain task ID string. Store it in memory — you need it to track the worker against its parent bead. Use `TaskList`/`TaskGet` to see which workers are still running and `TaskStop` to cancel one.
11
-
12
- Rules:
13
- - NEVER use `bash` to spawn subagents (no `claude`, no `tsx`, no `node` scripts).
14
- - NEVER try to run subagent work inline yourself — you only orchestrate.
15
- - ALWAYS use `Task` for every subagent interaction; track running workers with `TaskList`/`TaskGet`.
16
- - ALWAYS set `cwd` to the feature worktree path when running stage chores.
17
- - ALWAYS keep the task ID in memory to correlate a completion with its parent bead.
18
-
19
- ## Completion detection (Claude Code — event-driven, no polling)
20
-
21
- Claude Code **re-invokes you automatically when a background worker completes** — the worker's result is delivered to you inline on the wake-up. **Do not poll and do not `sleep`.** React to completions as they arrive.
22
-
23
- - There is **no poll timer anywhere in this pipeline**: nothing in initialization starts one, and there is nothing to kill in **HITL Pause** — when you stop, you simply stop. The harness wakes you again when the user re-invokes you.
24
- - There is **no log tailing on Claude**: workers' progress lines (`.agent-cortex/ralph/ralph-<parentId>.log`) are written by the workers themselves and surfaced by the harness with the completion — nothing to flush, nothing to poll. Produce the shared chat summaries from the delivered result instead.
25
- - On each completion, apply the shared handling in the **Event loop** section of agent.md (steps 3–8: correlate the task ID to its bead via `state.json`, parse the REPORT, close the chore, advance the parent, check for newly ready beads, run the shutdown check). `state.json` `logLine` tracking is not used on Claude.
26
-
27
- ## Completion constraints
28
-
29
- - **Always** keep completion tracking active while worker results are outstanding — the harness delivers each completion precisely once; never re-request a result.
30
- - **Never** poll, **never** `sleep`, **never** start a background timer.
31
- - **Never** post empty status updates — only surface actual completions.