@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,342 +0,0 @@
1
- lockfileVersion: '9.0'
2
-
3
- settings:
4
- autoInstallPeers: true
5
- excludeLinksFromLockfile: false
6
-
7
- importers:
8
-
9
- .:
10
- devDependencies:
11
- '@types/node':
12
- specifier: ^22.0.0
13
- version: 22.19.17
14
- tsx:
15
- specifier: ^4.0.0
16
- version: 4.21.0
17
- typescript:
18
- specifier: ^5.0.0
19
- version: 5.9.3
20
-
21
- packages:
22
-
23
- '@esbuild/aix-ppc64@0.27.7':
24
- resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==}
25
- engines: {node: '>=18'}
26
- cpu: [ppc64]
27
- os: [aix]
28
-
29
- '@esbuild/android-arm64@0.27.7':
30
- resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==}
31
- engines: {node: '>=18'}
32
- cpu: [arm64]
33
- os: [android]
34
-
35
- '@esbuild/android-arm@0.27.7':
36
- resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==}
37
- engines: {node: '>=18'}
38
- cpu: [arm]
39
- os: [android]
40
-
41
- '@esbuild/android-x64@0.27.7':
42
- resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==}
43
- engines: {node: '>=18'}
44
- cpu: [x64]
45
- os: [android]
46
-
47
- '@esbuild/darwin-arm64@0.27.7':
48
- resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==}
49
- engines: {node: '>=18'}
50
- cpu: [arm64]
51
- os: [darwin]
52
-
53
- '@esbuild/darwin-x64@0.27.7':
54
- resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==}
55
- engines: {node: '>=18'}
56
- cpu: [x64]
57
- os: [darwin]
58
-
59
- '@esbuild/freebsd-arm64@0.27.7':
60
- resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==}
61
- engines: {node: '>=18'}
62
- cpu: [arm64]
63
- os: [freebsd]
64
-
65
- '@esbuild/freebsd-x64@0.27.7':
66
- resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==}
67
- engines: {node: '>=18'}
68
- cpu: [x64]
69
- os: [freebsd]
70
-
71
- '@esbuild/linux-arm64@0.27.7':
72
- resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==}
73
- engines: {node: '>=18'}
74
- cpu: [arm64]
75
- os: [linux]
76
-
77
- '@esbuild/linux-arm@0.27.7':
78
- resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==}
79
- engines: {node: '>=18'}
80
- cpu: [arm]
81
- os: [linux]
82
-
83
- '@esbuild/linux-ia32@0.27.7':
84
- resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==}
85
- engines: {node: '>=18'}
86
- cpu: [ia32]
87
- os: [linux]
88
-
89
- '@esbuild/linux-loong64@0.27.7':
90
- resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==}
91
- engines: {node: '>=18'}
92
- cpu: [loong64]
93
- os: [linux]
94
-
95
- '@esbuild/linux-mips64el@0.27.7':
96
- resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==}
97
- engines: {node: '>=18'}
98
- cpu: [mips64el]
99
- os: [linux]
100
-
101
- '@esbuild/linux-ppc64@0.27.7':
102
- resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==}
103
- engines: {node: '>=18'}
104
- cpu: [ppc64]
105
- os: [linux]
106
-
107
- '@esbuild/linux-riscv64@0.27.7':
108
- resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==}
109
- engines: {node: '>=18'}
110
- cpu: [riscv64]
111
- os: [linux]
112
-
113
- '@esbuild/linux-s390x@0.27.7':
114
- resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==}
115
- engines: {node: '>=18'}
116
- cpu: [s390x]
117
- os: [linux]
118
-
119
- '@esbuild/linux-x64@0.27.7':
120
- resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==}
121
- engines: {node: '>=18'}
122
- cpu: [x64]
123
- os: [linux]
124
-
125
- '@esbuild/netbsd-arm64@0.27.7':
126
- resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==}
127
- engines: {node: '>=18'}
128
- cpu: [arm64]
129
- os: [netbsd]
130
-
131
- '@esbuild/netbsd-x64@0.27.7':
132
- resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==}
133
- engines: {node: '>=18'}
134
- cpu: [x64]
135
- os: [netbsd]
136
-
137
- '@esbuild/openbsd-arm64@0.27.7':
138
- resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==}
139
- engines: {node: '>=18'}
140
- cpu: [arm64]
141
- os: [openbsd]
142
-
143
- '@esbuild/openbsd-x64@0.27.7':
144
- resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==}
145
- engines: {node: '>=18'}
146
- cpu: [x64]
147
- os: [openbsd]
148
-
149
- '@esbuild/openharmony-arm64@0.27.7':
150
- resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==}
151
- engines: {node: '>=18'}
152
- cpu: [arm64]
153
- os: [openharmony]
154
-
155
- '@esbuild/sunos-x64@0.27.7':
156
- resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==}
157
- engines: {node: '>=18'}
158
- cpu: [x64]
159
- os: [sunos]
160
-
161
- '@esbuild/win32-arm64@0.27.7':
162
- resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==}
163
- engines: {node: '>=18'}
164
- cpu: [arm64]
165
- os: [win32]
166
-
167
- '@esbuild/win32-ia32@0.27.7':
168
- resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==}
169
- engines: {node: '>=18'}
170
- cpu: [ia32]
171
- os: [win32]
172
-
173
- '@esbuild/win32-x64@0.27.7':
174
- resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==}
175
- engines: {node: '>=18'}
176
- cpu: [x64]
177
- os: [win32]
178
-
179
- '@types/node@22.19.17':
180
- resolution: {integrity: sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==}
181
-
182
- esbuild@0.27.7:
183
- resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==}
184
- engines: {node: '>=18'}
185
- hasBin: true
186
-
187
- fsevents@2.3.3:
188
- resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
189
- engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
190
- os: [darwin]
191
-
192
- get-tsconfig@4.14.0:
193
- resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==}
194
-
195
- resolve-pkg-maps@1.0.0:
196
- resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
197
-
198
- tsx@4.21.0:
199
- resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==}
200
- engines: {node: '>=18.0.0'}
201
- hasBin: true
202
-
203
- typescript@5.9.3:
204
- resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==}
205
- engines: {node: '>=14.17'}
206
- hasBin: true
207
-
208
- undici-types@6.21.0:
209
- resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
210
-
211
- snapshots:
212
-
213
- '@esbuild/aix-ppc64@0.27.7':
214
- optional: true
215
-
216
- '@esbuild/android-arm64@0.27.7':
217
- optional: true
218
-
219
- '@esbuild/android-arm@0.27.7':
220
- optional: true
221
-
222
- '@esbuild/android-x64@0.27.7':
223
- optional: true
224
-
225
- '@esbuild/darwin-arm64@0.27.7':
226
- optional: true
227
-
228
- '@esbuild/darwin-x64@0.27.7':
229
- optional: true
230
-
231
- '@esbuild/freebsd-arm64@0.27.7':
232
- optional: true
233
-
234
- '@esbuild/freebsd-x64@0.27.7':
235
- optional: true
236
-
237
- '@esbuild/linux-arm64@0.27.7':
238
- optional: true
239
-
240
- '@esbuild/linux-arm@0.27.7':
241
- optional: true
242
-
243
- '@esbuild/linux-ia32@0.27.7':
244
- optional: true
245
-
246
- '@esbuild/linux-loong64@0.27.7':
247
- optional: true
248
-
249
- '@esbuild/linux-mips64el@0.27.7':
250
- optional: true
251
-
252
- '@esbuild/linux-ppc64@0.27.7':
253
- optional: true
254
-
255
- '@esbuild/linux-riscv64@0.27.7':
256
- optional: true
257
-
258
- '@esbuild/linux-s390x@0.27.7':
259
- optional: true
260
-
261
- '@esbuild/linux-x64@0.27.7':
262
- optional: true
263
-
264
- '@esbuild/netbsd-arm64@0.27.7':
265
- optional: true
266
-
267
- '@esbuild/netbsd-x64@0.27.7':
268
- optional: true
269
-
270
- '@esbuild/openbsd-arm64@0.27.7':
271
- optional: true
272
-
273
- '@esbuild/openbsd-x64@0.27.7':
274
- optional: true
275
-
276
- '@esbuild/openharmony-arm64@0.27.7':
277
- optional: true
278
-
279
- '@esbuild/sunos-x64@0.27.7':
280
- optional: true
281
-
282
- '@esbuild/win32-arm64@0.27.7':
283
- optional: true
284
-
285
- '@esbuild/win32-ia32@0.27.7':
286
- optional: true
287
-
288
- '@esbuild/win32-x64@0.27.7':
289
- optional: true
290
-
291
- '@types/node@22.19.17':
292
- dependencies:
293
- undici-types: 6.21.0
294
-
295
- esbuild@0.27.7:
296
- optionalDependencies:
297
- '@esbuild/aix-ppc64': 0.27.7
298
- '@esbuild/android-arm': 0.27.7
299
- '@esbuild/android-arm64': 0.27.7
300
- '@esbuild/android-x64': 0.27.7
301
- '@esbuild/darwin-arm64': 0.27.7
302
- '@esbuild/darwin-x64': 0.27.7
303
- '@esbuild/freebsd-arm64': 0.27.7
304
- '@esbuild/freebsd-x64': 0.27.7
305
- '@esbuild/linux-arm': 0.27.7
306
- '@esbuild/linux-arm64': 0.27.7
307
- '@esbuild/linux-ia32': 0.27.7
308
- '@esbuild/linux-loong64': 0.27.7
309
- '@esbuild/linux-mips64el': 0.27.7
310
- '@esbuild/linux-ppc64': 0.27.7
311
- '@esbuild/linux-riscv64': 0.27.7
312
- '@esbuild/linux-s390x': 0.27.7
313
- '@esbuild/linux-x64': 0.27.7
314
- '@esbuild/netbsd-arm64': 0.27.7
315
- '@esbuild/netbsd-x64': 0.27.7
316
- '@esbuild/openbsd-arm64': 0.27.7
317
- '@esbuild/openbsd-x64': 0.27.7
318
- '@esbuild/openharmony-arm64': 0.27.7
319
- '@esbuild/sunos-x64': 0.27.7
320
- '@esbuild/win32-arm64': 0.27.7
321
- '@esbuild/win32-ia32': 0.27.7
322
- '@esbuild/win32-x64': 0.27.7
323
-
324
- fsevents@2.3.3:
325
- optional: true
326
-
327
- get-tsconfig@4.14.0:
328
- dependencies:
329
- resolve-pkg-maps: 1.0.0
330
-
331
- resolve-pkg-maps@1.0.0: {}
332
-
333
- tsx@4.21.0:
334
- dependencies:
335
- esbuild: 0.27.7
336
- get-tsconfig: 4.14.0
337
- optionalDependencies:
338
- fsevents: 2.3.3
339
-
340
- typescript@5.9.3: {}
341
-
342
- undici-types@6.21.0: {}
@@ -1,2 +0,0 @@
1
- allowBuilds:
2
- esbuild: true
@@ -1,12 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "Node16",
5
- "moduleResolution": "Node16",
6
- "strict": true,
7
- "noEmit": true,
8
- "allowImportingTsExtensions": true,
9
- "skipLibCheck": true
10
- },
11
- "include": ["*.ts"]
12
- }
@@ -1,277 +0,0 @@
1
- import { describe, it } from 'node:test';
2
- import assert from 'node:assert/strict';
3
- import { access } from 'node:fs/promises';
4
- import { dirname, resolve } from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- import { resolveClassification, auditBeads, runCli } from '../skills/planning/classify-bead/scripts/classify-bead.mjs';
8
-
9
- const testDir = dirname(fileURLToPath(import.meta.url));
10
-
11
- describe('resolveClassification', () => {
12
- it('resolves AFK from an existing implementation-type:afk label', () => {
13
- const result = resolveClassification({
14
- labels: ['implementation-type:afk'],
15
- description: 'Do a thing.',
16
- });
17
-
18
- assert.equal(result.classification, 'afk');
19
- assert.equal(result.source, 'label');
20
- assert.equal(result.escalate, false);
21
- });
22
-
23
- it('resolves HITL from an existing implementation-type:hitl label', () => {
24
- const result = resolveClassification({
25
- labels: ['implementation-type:hitl'],
26
- description: 'Provision the staging cluster.',
27
- });
28
-
29
- assert.equal(result.classification, 'hitl');
30
- assert.equal(result.source, 'label');
31
- assert.equal(result.escalate, false);
32
- });
33
-
34
- it('prefers AFK when both implementation-type labels are present', () => {
35
- const result = resolveClassification({
36
- labels: ['implementation-type:hitl', 'implementation-type:afk'],
37
- description: 'Ambiguous bead.',
38
- });
39
-
40
- assert.equal(result.classification, 'afk');
41
- });
42
-
43
- it('resolves AFK from a legacy ## Type block when no label is present', () => {
44
- const result = resolveClassification({
45
- labels: [],
46
- description: 'Add the export API.\n\n## Type\n\nAFK\n\n## Design\n\nSomething.',
47
- });
48
-
49
- assert.equal(result.classification, 'afk');
50
- assert.equal(result.source, 'type-field');
51
- assert.equal(result.escalate, false);
52
- });
53
-
54
- it('resolves HITL from a case-insensitive ## type block', () => {
55
- const result = resolveClassification({
56
- labels: [],
57
- description: 'Rotate the signing key.\n\n## type\n\nhitl',
58
- });
59
-
60
- assert.equal(result.classification, 'hitl');
61
- assert.equal(result.source, 'type-field');
62
- });
63
-
64
- it('resolves an inline ## Type: AFK field', () => {
65
- const result = resolveClassification({
66
- labels: [],
67
- description: 'Tidy the logs.\n\n## Type: AFK\n',
68
- });
69
-
70
- assert.equal(result.classification, 'afk');
71
- assert.equal(result.source, 'type-field');
72
- });
73
-
74
- it('prefers the label over a conflicting ## Type field', () => {
75
- const result = resolveClassification({
76
- labels: ['implementation-type:afk'],
77
- description: 'Conflicting bead.\n\n## Type\n\nHITL',
78
- });
79
-
80
- assert.equal(result.classification, 'afk');
81
- assert.equal(result.source, 'label');
82
- });
83
-
84
- it('escalates when the ## Type field carries no AFK/HITL value', () => {
85
- const result = resolveClassification({
86
- labels: [],
87
- description: 'A feature.\n\n## Type\n\nFeature',
88
- });
89
-
90
- assert.equal(result.classification, null);
91
- assert.equal(result.escalate, true);
92
- });
93
-
94
- it('resolves AFK from explicit no-human phrasing', () => {
95
- const result = resolveClassification({
96
- labels: [],
97
- description: 'Rename the column; no human review required.',
98
- });
99
-
100
- assert.equal(result.classification, 'afk');
101
- assert.equal(result.source, 'heuristic');
102
- });
103
-
104
- it('resolves HITL from an explicit human sign-off requirement', () => {
105
- const result = resolveClassification({
106
- labels: [],
107
- description: 'Ship the redesign once it has stakeholder sign-off.',
108
- });
109
-
110
- assert.equal(result.classification, 'hitl');
111
- assert.equal(result.source, 'heuristic');
112
- });
113
-
114
- it('lets a HITL signal outrank a generic automated-tests signal', () => {
115
- const result = resolveClassification({
116
- labels: [],
117
- description: 'Has automated tests, but the release requires human approval.',
118
- });
119
-
120
- assert.equal(result.classification, 'hitl');
121
- });
122
-
123
- it('resolves AFK when the acceptance criteria are automated tests', () => {
124
- const result = resolveClassification({
125
- labels: [],
126
- description: 'Cover the parser with automated tests.',
127
- });
128
-
129
- assert.equal(result.classification, 'afk');
130
- });
131
-
132
- it('escalates when no deterministic signal is present', () => {
133
- const result = resolveClassification({
134
- labels: [],
135
- description: 'Rework the billing domain model to support proration.',
136
- });
137
-
138
- assert.equal(result.classification, null);
139
- assert.equal(result.source, null);
140
- assert.equal(result.escalate, true);
141
- });
142
-
143
- it('prefers the ## Type field over heuristic signals', () => {
144
- const result = resolveClassification({
145
- labels: [],
146
- description: '## Type\n\nHITL\n\nCover it with automated tests.',
147
- });
148
-
149
- assert.equal(result.classification, 'hitl');
150
- assert.equal(result.source, 'type-field');
151
- });
152
- });
153
-
154
- describe('auditBeads', () => {
155
- const sample = [
156
- { labels: ['implementation-type:afk'], description: '' },
157
- { labels: ['implementation-type:hitl'], description: '' },
158
- { labels: [], description: '## Type\n\nAFK' },
159
- { labels: [], description: 'Rework the billing domain model.' },
160
- ];
161
-
162
- it('counts each resolution source and the deterministic share', () => {
163
- const summary = auditBeads(sample);
164
-
165
- assert.deepEqual(summary.bySource, { label: 2, typeField: 1, heuristic: 0, rubric: 1 });
166
- assert.equal(summary.deterministic, 3);
167
- assert.equal(summary.needsRubric, 1);
168
- assert.equal(summary.deterministicRatio, 0.75);
169
- });
170
-
171
- it('reports a zero ratio for an empty sample', () => {
172
- assert.equal(auditBeads([]).deterministicRatio, 0);
173
- });
174
- });
175
-
176
- describe('runCli', () => {
177
- function makeExec(beads) {
178
- const calls = [];
179
- const exec = async (args) => {
180
- calls.push(args);
181
- if (args[0] === 'show') return JSON.stringify(beads);
182
- if (args[0] === 'list') return JSON.stringify(beads);
183
- if (args[0] === 'tag') return '';
184
- throw new Error(`unexpected bd call: ${args.join(' ')}`);
185
- };
186
- return { exec, calls };
187
- }
188
-
189
- function capture() {
190
- let output = '';
191
- return { write: (chunk) => { output += chunk; }, read: () => JSON.parse(output) };
192
- }
193
-
194
- it('applies the label when the ## Type field resolves the classification', async () => {
195
- const { exec, calls } = makeExec([{ id: 'proj-1', labels: [], description: '## Type\n\nAFK' }]);
196
- const out = capture();
197
-
198
- const code = await runCli({ argv: ['proj-1'], exec, write: out.write });
199
-
200
- assert.equal(code, 0);
201
- assert.deepEqual(calls, [
202
- ['show', 'proj-1', '--json'],
203
- ['tag', 'proj-1', 'implementation-type:afk'],
204
- ]);
205
- assert.deepEqual(out.read(), {
206
- id: 'proj-1',
207
- classification: 'afk',
208
- source: 'type-field',
209
- reason: 'legacy ## Type field declares AFK',
210
- escalate: false,
211
- applied: true,
212
- label: 'implementation-type:afk',
213
- });
214
- });
215
-
216
- it('does not re-apply a label that is already present', async () => {
217
- const { exec, calls } = makeExec([{ id: 'proj-2', labels: ['implementation-type:hitl'], description: '' }]);
218
- const out = capture();
219
-
220
- const code = await runCli({ argv: ['proj-2'], exec, write: out.write });
221
-
222
- assert.equal(code, 0);
223
- assert.deepEqual(calls, [['show', 'proj-2', '--json']]);
224
- assert.equal(out.read().applied, false);
225
- assert.equal(out.read().classification, 'hitl');
226
- });
227
-
228
- it('escalates without applying a label when no deterministic signal is present', async () => {
229
- const { exec, calls } = makeExec([{ id: 'proj-3', labels: [], description: 'Rework the billing model.' }]);
230
- const out = capture();
231
-
232
- const code = await runCli({ argv: ['proj-3'], exec, write: out.write });
233
-
234
- assert.equal(code, 0);
235
- assert.deepEqual(calls, [['show', 'proj-3', '--json']]);
236
- assert.equal(out.read().escalate, true);
237
- assert.equal(out.read().label, null);
238
- });
239
-
240
- it('resolves without applying a label under --dry-run', async () => {
241
- const { exec, calls } = makeExec([{ id: 'proj-4', labels: [], description: '## Type\n\nHITL' }]);
242
- const out = capture();
243
-
244
- const code = await runCli({ argv: ['proj-4', '--dry-run'], exec, write: out.write });
245
-
246
- assert.equal(code, 0);
247
- assert.deepEqual(calls, [['show', 'proj-4', '--json']]);
248
- assert.equal(out.read().classification, 'hitl');
249
- assert.equal(out.read().applied, false);
250
- });
251
-
252
- it('reports the deterministic split in --audit mode', async () => {
253
- const beads = [
254
- { labels: ['implementation-type:afk'], description: '' },
255
- { labels: [], description: 'Rework the billing model.' },
256
- ];
257
- const { exec, calls } = makeExec(beads);
258
- const out = capture();
259
-
260
- const code = await runCli({ argv: ['--audit', '--limit', '2'], exec, write: out.write });
261
-
262
- assert.equal(code, 0);
263
- assert.deepEqual(calls, [['list', '--all', '--json', '--limit', '2', '--sort', 'created']]);
264
- assert.equal(out.read().deterministic, 1);
265
- assert.equal(out.read().needsRubric, 1);
266
- });
267
- });
268
-
269
- describe('classifier wiring', () => {
270
- it('exposes the classifier at the sibling path callers are told to use', async () => {
271
- // create-task/SKILL.md resolves <skill-scripts>/../../classify-bead/scripts/classify-bead.mjs.
272
- const createTaskScripts = resolve(testDir, '../skills/planning/create-task/scripts');
273
- const classifier = resolve(createTaskScripts, '../../classify-bead/scripts/classify-bead.mjs');
274
-
275
- await assert.doesNotReject(access(classifier));
276
- });
277
- });