@jaybeeuu/agent-cortex 1.20.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 (154) hide show
  1. package/.beads/README.md +81 -0
  2. package/.beads/config.yaml +1 -0
  3. package/.beads/issues.jsonl +236 -0
  4. package/.beads/metadata.json +7 -0
  5. package/.claude-plugin/marketplace.json +16 -0
  6. package/.github/workflows/ci.test.ts +217 -0
  7. package/.github/workflows/ci.yml +35 -0
  8. package/.github/workflows/publish.yml +36 -0
  9. package/.junie/guidelines.md +87 -0
  10. package/.junie/mcp/mcp.json +10 -0
  11. package/AGENTS.md +102 -0
  12. package/CHANGELOG.md +705 -0
  13. package/README.md +209 -0
  14. package/agents/README.md +235 -0
  15. package/agents/plan.agent.md +56 -0
  16. package/agents/ralph-plan.agent.md +119 -0
  17. package/agents/ralph.agent.md +305 -0
  18. package/agents/strategy.agent.md +109 -0
  19. package/agents-native/ralph.md +193 -0
  20. package/bin/agent-cortex.mjs +27 -0
  21. package/claude/.claude-plugin/plugin.json +11 -0
  22. package/claude/.mcp.json +18 -0
  23. package/claude/agents/plan.md +56 -0
  24. package/claude/agents/ralph-plan.md +119 -0
  25. package/claude/agents/ralph.md +193 -0
  26. package/claude/agents/strategy.md +109 -0
  27. package/claude/hooks.json +23 -0
  28. package/claude/scripts/statusline-command.sh +124 -0
  29. package/docs/ideas/auto-model-selection.md +75 -0
  30. package/docs/ideas/improve-pi-system-prompt.md +34 -0
  31. package/docs/ideas/model-selector.md +40 -0
  32. package/docs/ideas/pi-task-memory.md +34 -0
  33. package/docs/ideas/qa-extension.md +43 -0
  34. package/docs/inspirations.md +33 -0
  35. package/docs/research/gas-city-research.md +256 -0
  36. package/docs/research/skill-design-research.md +286 -0
  37. package/docs/research/skill-improvements-analysis.md +117 -0
  38. package/docs/research/skill-patterns-research.md +24 -0
  39. package/docs/skills/skill-anatomy.md +149 -0
  40. package/docs/user-preferences.md +17 -0
  41. package/extensions/agent-modes/index.ts +507 -0
  42. package/extensions/auto-name.ts +107 -0
  43. package/extensions/context-loader.md +35 -0
  44. package/extensions/context-loader.ts +65 -0
  45. package/extensions/lib/tiny-model.ts +212 -0
  46. package/extensions/notify/index.ts +293 -0
  47. package/extensions/session-start.ts +44 -0
  48. package/extensions/skill-stats/README.md +74 -0
  49. package/extensions/skill-stats/context-loader.test.ts +107 -0
  50. package/extensions/skill-stats/discover.ts +119 -0
  51. package/extensions/skill-stats/format.ts +13 -0
  52. package/extensions/skill-stats/index.test.ts +452 -0
  53. package/extensions/skill-stats/index.ts +222 -0
  54. package/extensions/skill-stats/package.json +19 -0
  55. package/extensions/skill-stats/pnpm-lock.yaml +329 -0
  56. package/extensions/skill-stats/record.ts +48 -0
  57. package/extensions/skill-stats/store.ts +104 -0
  58. package/extensions/skill-stats/tsconfig.json +12 -0
  59. package/extensions/subagent/README.md +175 -0
  60. package/extensions/subagent/agents/planner.md +37 -0
  61. package/extensions/subagent/agents/reviewer.md +35 -0
  62. package/extensions/subagent/agents/scout.md +50 -0
  63. package/extensions/subagent/agents/worker.md +24 -0
  64. package/extensions/subagent/agents.ts +126 -0
  65. package/extensions/subagent/index.ts +1138 -0
  66. package/extensions/subagent/prompts/implement-and-review.md +10 -0
  67. package/extensions/subagent/prompts/implement.md +10 -0
  68. package/extensions/subagent/prompts/scout-and-plan.md +9 -0
  69. package/hooks.json +10 -0
  70. package/lib/cli.mjs +37 -0
  71. package/package.json +39 -0
  72. package/pi/keybindings.json +3 -0
  73. package/pi/settings.json +29 -0
  74. package/plugin.json +35 -0
  75. package/pnpm-workspace.yaml +7 -0
  76. package/scripts/build-claude-agents.mjs +179 -0
  77. package/scripts/install-instructions.sh +82 -0
  78. package/skills/engineering/design-an-interface/SKILL.md +94 -0
  79. package/skills/engineering/grill-with-docs/SKILL.md +88 -0
  80. package/skills/engineering/improve-codebase-architecture/REFERENCE.md +78 -0
  81. package/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
  82. package/skills/engineering/tdd/SKILL.md +150 -0
  83. package/skills/engineering/tdd/deep-modules.md +33 -0
  84. package/skills/engineering/tdd/interface-design.md +31 -0
  85. package/skills/engineering/tdd/mocking.md +59 -0
  86. package/skills/engineering/tdd/refactoring.md +10 -0
  87. package/skills/engineering/tdd/tests.md +61 -0
  88. package/skills/engineering/technical-direction/SKILL.md +86 -0
  89. package/skills/planning/classify-bead/SKILL.md +67 -0
  90. package/skills/planning/create-task/SKILL.md +96 -0
  91. package/skills/planning/create-task/pipeline.json +33 -0
  92. package/skills/planning/create-task/scripts/create-chores.ts +112 -0
  93. package/skills/planning/create-task/scripts/package.json +14 -0
  94. package/skills/planning/create-task/scripts/pnpm-lock.yaml +342 -0
  95. package/skills/planning/create-task/scripts/tsconfig.json +12 -0
  96. package/skills/planning/create-task/templates/code.md +40 -0
  97. package/skills/planning/create-task/templates/document.md +40 -0
  98. package/skills/planning/create-task/templates/fix.md +27 -0
  99. package/skills/planning/create-task/templates/review.md +36 -0
  100. package/skills/planning/create-task/templates/verify.md +43 -0
  101. package/skills/planning/prd-to-tasks/SKILL.md +227 -0
  102. package/skills/planning/record-idea/SKILL.md +62 -0
  103. package/skills/planning/record-idea/scripts/new-idea.sh +89 -0
  104. package/skills/planning/request-refactor-plan/SKILL.md +73 -0
  105. package/skills/planning/write-a-prd/SKILL.md +74 -0
  106. package/skills/planning/write-a-ticket/SKILL.md +97 -0
  107. package/skills/productivity/bd-tool/SKILL.md +90 -0
  108. package/skills/productivity/grill-me/SKILL.md +10 -0
  109. package/skills/productivity/handoff/SKILL.md +15 -0
  110. package/skills/productivity/init-beads/SKILL.md +93 -0
  111. package/skills/productivity/teach/GLOSSARY-FORMAT.md +35 -0
  112. package/skills/productivity/teach/LEARNING-RECORD-FORMAT.md +46 -0
  113. package/skills/productivity/teach/MISSION-FORMAT.md +31 -0
  114. package/skills/productivity/teach/RESOURCES-FORMAT.md +32 -0
  115. package/skills/productivity/teach/SKILL.md +109 -0
  116. package/skills/productivity/validate-agent-dir/scripts/package.json +15 -0
  117. package/skills/productivity/validate-agent-dir/scripts/pnpm-lock.yaml +329 -0
  118. package/skills/productivity/validate-agent-dir/scripts/pnpm-workspace.yaml +2 -0
  119. package/skills/productivity/validate-agent-dir/scripts/tsconfig.json +19 -0
  120. package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.test.ts +317 -0
  121. package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.ts +127 -0
  122. package/skills/productivity/write-a-skill/SKILL.md +74 -0
  123. package/skills/review/maintain-agent-docs/REFERENCE.md +246 -0
  124. package/skills/review/maintain-agent-docs/SKILL.md +83 -0
  125. package/skills/review/refactor-skill/EXAMPLES.md +20 -0
  126. package/skills/review/refactor-skill/SKILL.md +148 -0
  127. package/skills/review/review-security/SKILL.md +107 -0
  128. package/skills/review/review-security/scripts/install-gitleaks.sh +43 -0
  129. package/skills/style/style-code/REFERENCE.md +38 -0
  130. package/skills/style/style-code/SKILL.md +113 -0
  131. package/skills/style/style-comms/SKILL.md +93 -0
  132. package/skills/style/style-documentation/SKILL.md +112 -0
  133. package/skills/style/style-tests/SKILL.md +97 -0
  134. package/skills/workflow/git-workflow/SKILL.md +85 -0
  135. package/skills/workflow/hitl-collab/SKILL.md +29 -0
  136. package/skills/workflow/plan/SKILL.md +272 -0
  137. package/skills/workflow/ralph/REFERENCE.md +202 -0
  138. package/skills/workflow/ralph/SKILL.md +105 -0
  139. package/skills/workflow/run-pipeline-stage/SKILL.md +151 -0
  140. package/skills/workflow/run-pipeline-stage/playbooks/code.md +17 -0
  141. package/skills/workflow/run-pipeline-stage/playbooks/document.md +18 -0
  142. package/skills/workflow/run-pipeline-stage/playbooks/fix.md +17 -0
  143. package/skills/workflow/run-pipeline-stage/playbooks/review.md +19 -0
  144. package/skills/workflow/run-pipeline-stage/playbooks/verify.md +14 -0
  145. package/skills/workflow/run-pipeline-stage/prompts/stage-runner.md +20 -0
  146. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.test.ts +783 -0
  147. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +586 -0
  148. package/skills/workflow/run-pipeline-stage/scripts/package.json +15 -0
  149. package/skills/workflow/run-pipeline-stage/scripts/pnpm-lock.yaml +342 -0
  150. package/skills/workflow/run-pipeline-stage/scripts/pnpm-workspace.yaml +2 -0
  151. package/skills/workflow/run-pipeline-stage/scripts/tsconfig.json +12 -0
  152. package/skills/workflow/using-agent-skills/SKILL.md +109 -0
  153. package/skills/workflow/using-agent-skills/scripts/validate-skill-structure.test.ts +73 -0
  154. package/test/cli.test.mjs +149 -0
@@ -0,0 +1,342 @@
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: {}
@@ -0,0 +1,2 @@
1
+ allowBuilds:
2
+ esbuild: true
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: using-agent-skills
3
+ description: Routes incoming work to the right skill and enforces core agent behaviors. Use when starting a session, deciding which skill applies, or when you need to check "which skill should I use?".
4
+ ---
5
+
6
+ # Using Agent Skills
7
+
8
+ ## When to use
9
+
10
+ - Starting a new session and need to orient on available workflows.
11
+ - A task arrives and you need to decide which skill applies.
12
+ - The user asks "which skill should I use for this?"
13
+ - You want to verify that core operating behaviors are being followed.
14
+
15
+ ## Workflow
16
+
17
+ When a task arrives, identify the development phase and apply the corresponding skill:
18
+
19
+ ```
20
+ Task arrives
21
+ │
22
+ ├── Don't know what to build yet? ──────→ grill-me
23
+ ├── Have a rough idea? ─────────────────→ record-idea
24
+ ├── New feature / PRD needed? ──────────→ write-a-prd
25
+ ├── PRD approved, need tasks? ──────────→ prd-to-tasks
26
+ ├── Need a single task tracked? ────────→ create-task
27
+ ├── Need to plan a feature end-to-end? ─→ plan
28
+ ├── Running beads / task execution? ────→ ralph
29
+ │ └── Single stage? ─────────────────→ run-pipeline-stage
30
+ ├── Implementing code? ────────────────→ tdd
31
+ │ └── Designing an interface? ───────→ design-an-interface
32
+ ├── Reviewing code? ───────────────────→ style-code
33
+ │ └── Security concerns? ────────────→ review-security
34
+ ├── Writing tests? ────────────────────→ style-tests
35
+ ├── Writing docs? ─────────────────────→ style-documentation
36
+ ├── Writing external comms? ───────────→ style-comms
37
+ ├── Stress-testing a plan? ────────────→ grill-with-docs
38
+ ├── Planning a refactor? ──────────────→ request-refactor-plan
39
+ ├── Evaluating architecture? ──────────→ technical-direction
40
+ ├── Finding refactor opportunities? ───→ improve-codebase-architecture
41
+ ├── Need task tracking? ───────────────→ bd-tool
42
+ ├── Need human review / HITL? ─────────→ hitl-collab
43
+ ├── Need a handoff doc? ───────────────→ handoff
44
+ ├── Writing a ticket for Jira? ────────→ write-a-ticket
45
+ ├── Creating a new skill? ─────────────→ write-a-skill
46
+ ├── Refactoring a skill? ──────────────→ refactor-skill
47
+ ├── Updating agent docs? ──────────────→ maintain-agent-docs
48
+ └── Setting up beads in a new project? → init-beads
49
+ ```
50
+
51
+ ## Core Operating Behaviors
52
+
53
+ These behaviors apply at all times, across all skills. They are non-negotiable.
54
+
55
+ ### 1. Surface Assumptions
56
+
57
+ Before implementing anything non-trivial, explicitly state your assumptions. Don't silently fill in ambiguous requirements — surface uncertainty early, it's cheaper than rework.
58
+
59
+ ### 2. Manage Confusion Actively
60
+
61
+ When you encounter inconsistencies, conflicting requirements, or unclear specifications: **STOP**. Name the specific confusion, present the tradeoff or ask the clarifying question, and wait for resolution before continuing.
62
+
63
+ ### 3. Push Back When Warranted
64
+
65
+ You are not a yes-machine. When an approach has clear problems, point out the issue directly, explain the concrete downside, propose an alternative, and accept the human's decision if they override with full information.
66
+
67
+ ### 4. Enforce Simplicity
68
+
69
+ Your natural tendency is to overcomplicate. Before finishing any implementation, ask: Can this be done in fewer lines? Are these abstractions earning their complexity? Prefer the boring, obvious solution.
70
+
71
+ ### 5. Maintain Scope Discipline
72
+
73
+ Touch only what you're asked to touch. Do not clean up orthogonal code, refactor adjacent systems, or add features not in the spec. Surgical precision, not unsolicited renovation.
74
+
75
+ ### 6. Verify, Don't Assume
76
+
77
+ A task is not complete until verification passes. "Seems right" is never sufficient — there must be evidence: passing tests, build output, or runtime data.
78
+
79
+ ## Lifecycle Sequence
80
+
81
+ For a complete feature, the typical skill sequence is:
82
+
83
+ 1. `grill-me` → Extract what the user actually wants
84
+ 2. `record-idea` → Refine vague ideas
85
+ 3. `write-a-prd` → Define what we're building
86
+ 4. `prd-to-tasks` → Break into verifiable chunks
87
+ 5. `plan` → Orchestrate the full flow end-to-end
88
+ 6. `ralph` → Execute all pending beads
89
+ 7. `tdd` → Prove each slice works
90
+ 8. `style-code` → Review before merge
91
+ 9. `review-security` → Check for secrets
92
+ 10. `git-workflow` → Clean commit history
93
+
94
+ Not every task needs every skill. A bug fix might only need: `tdd` → `style-code` → `review-security`.
95
+
96
+ ## Red Flags
97
+
98
+ - Starting work without checking which skill applies.
99
+ - Skipping verification because "it looks right."
100
+ - Making wrong assumptions without stating them.
101
+ - Overcomplicating code when a simple solution exists.
102
+ - Modifying code orthogonal to the task scope.
103
+
104
+ ## Verification checklist
105
+
106
+ - [ ] Correct skill identified before starting work.
107
+ - [ ] Core operating behaviors followed throughout.
108
+ - [ ] Verification completed with evidence (tests, build, runtime).
109
+ - [ ] Scope limited to the task at hand.
@@ -0,0 +1,73 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ const SKILL_PATH = new URL("../SKILL.md", import.meta.url);
5
+
6
+ function readSkill(): string {
7
+ return readFileSync(SKILL_PATH, "utf-8");
8
+ }
9
+
10
+ describe("using-agent-skills SKILL.md structure", () => {
11
+ const content = readSkill();
12
+
13
+ it("has required front-matter fields", () => {
14
+ expect(content).toMatch(/^---\n/);
15
+ expect(content).toMatch(/name:\s*using-agent-skills/);
16
+ expect(content).toMatch(/description:/);
17
+ });
18
+
19
+ it("description is ≤ 1024 characters", () => {
20
+ const descMatch = content.match(/description:\s*(.+)/);
21
+ expect(descMatch).toBeTruthy();
22
+ if (descMatch) {
23
+ expect(descMatch[1].length).toBeLessThanOrEqual(1024);
24
+ }
25
+ });
26
+
27
+ it("description includes 'Use when' trigger phrases", () => {
28
+ expect(content).toMatch(/Use when/i);
29
+ });
30
+
31
+ it("has required 'When to use' section", () => {
32
+ expect(content).toMatch(/## When to use/);
33
+ });
34
+
35
+ it("has required 'Workflow' section", () => {
36
+ expect(content).toMatch(/## Workflow/);
37
+ });
38
+
39
+ it("has required 'Verification checklist' section", () => {
40
+ expect(content).toMatch(/## Verification checklist/);
41
+ });
42
+
43
+ it("has 'Core Operating Behaviors' section", () => {
44
+ expect(content).toMatch(/## Core Operating Behaviors/);
45
+ });
46
+
47
+ it("has a skill routing decision tree", () => {
48
+ expect(content).toContain("Task arrives");
49
+ expect(content).toContain("→ ralph");
50
+ expect(content).toContain("→ tdd");
51
+ });
52
+
53
+ it("references existing agent-cortex skills", () => {
54
+ const expectedSkills = [
55
+ "ralph",
56
+ "plan",
57
+ "tdd",
58
+ "bd-tool",
59
+ "git-workflow",
60
+ "review-security",
61
+ "style-code",
62
+ "style-tests",
63
+ ];
64
+ for (const skill of expectedSkills) {
65
+ expect(content).toContain(skill);
66
+ }
67
+ });
68
+
69
+ it("is under 150 lines", () => {
70
+ const lines = content.split("\n");
71
+ expect(lines.length).toBeLessThanOrEqual(150);
72
+ });
73
+ });
@@ -0,0 +1,149 @@
1
+ import { describe, it } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { execFile } from "node:child_process";
4
+ import { fileURLToPath } from "node:url";
5
+ import { dirname, join } from "node:path";
6
+ import { parseArgs, buildHelpText, validateHarness } from "../lib/cli.mjs";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const CLI_PATH = join(__dirname, "..", "bin", "agent-cortex.mjs");
10
+
11
+ function runCli(args) {
12
+ return new Promise((resolve) => {
13
+ execFile(process.execPath, [CLI_PATH, ...args], (error, stdout, stderr) => {
14
+ resolve({
15
+ exitCode: error ? error.code ?? 1 : 0,
16
+ stdout: stdout,
17
+ stderr: stderr,
18
+ });
19
+ });
20
+ });
21
+ }
22
+
23
+ describe("parseArgs", () => {
24
+ it("returns { command: 'help' } when no arguments given", () => {
25
+ const result = parseArgs([]);
26
+ assert.deepStrictEqual(result, { command: "help" });
27
+ });
28
+
29
+ it("returns { command: 'help' } for --help flag", () => {
30
+ const result = parseArgs(["--help"]);
31
+ assert.deepStrictEqual(result, { command: "help" });
32
+ });
33
+
34
+ it("returns { command: 'help' } for -h flag", () => {
35
+ const result = parseArgs(["-h"]);
36
+ assert.deepStrictEqual(result, { command: "help" });
37
+ });
38
+
39
+ it("returns { command: 'install', harness: 'copilot' } for install copilot", () => {
40
+ const result = parseArgs(["install", "copilot"]);
41
+ assert.deepStrictEqual(result, { command: "install", harness: "copilot" });
42
+ });
43
+
44
+ it("returns { command: 'install', harness: 'claude' } for install claude", () => {
45
+ const result = parseArgs(["install", "claude"]);
46
+ assert.deepStrictEqual(result, { command: "install", harness: "claude" });
47
+ });
48
+
49
+ it("returns { command: 'install', harness: 'pi' } for install pi", () => {
50
+ const result = parseArgs(["install", "pi"]);
51
+ assert.deepStrictEqual(result, { command: "install", harness: "pi" });
52
+ });
53
+
54
+ it("returns { command: 'install', harness: null } when install has no harness", () => {
55
+ const result = parseArgs(["install"]);
56
+ assert.deepStrictEqual(result, { command: "install", harness: null });
57
+ });
58
+
59
+ it("returns { command: 'unknown', name: 'foo' } for unknown command", () => {
60
+ const result = parseArgs(["foo"]);
61
+ assert.deepStrictEqual(result, { command: "unknown", name: "foo" });
62
+ });
63
+ });
64
+
65
+ describe("buildHelpText", () => {
66
+ it("returns a string containing usage info", () => {
67
+ const text = buildHelpText();
68
+ assert.ok(typeof text === "string");
69
+ assert.ok(text.includes("agent-cortex"));
70
+ assert.ok(text.includes("install"));
71
+ });
72
+ });
73
+
74
+ describe("validateHarness", () => {
75
+ it("returns ok for supported harnesses", () => {
76
+ for (const h of ["copilot", "claude", "pi"]) {
77
+ assert.deepStrictEqual(validateHarness(h), { ok: true });
78
+ }
79
+ });
80
+
81
+ it("returns error when harness is null", () => {
82
+ const result = validateHarness(null);
83
+ assert.equal(result.ok, false);
84
+ assert.ok(result.error.includes("Missing harness"));
85
+ });
86
+
87
+ it("returns error for unknown harness", () => {
88
+ const result = validateHarness("docker");
89
+ assert.equal(result.ok, false);
90
+ assert.ok(result.error.includes("Unknown harness"));
91
+ });
92
+ });
93
+
94
+ describe("CLI integration", () => {
95
+ it("exits 0 and prints help when run with no arguments", async () => {
96
+ const { exitCode, stdout } = await runCli([]);
97
+ assert.equal(exitCode, 0);
98
+ assert.ok(stdout.includes("agent-cortex"));
99
+ assert.ok(stdout.includes("install"));
100
+ });
101
+
102
+ it("exits 0 and prints help for --help", async () => {
103
+ const { exitCode, stdout } = await runCli(["--help"]);
104
+ assert.equal(exitCode, 0);
105
+ assert.ok(stdout.includes("Usage:"));
106
+ });
107
+
108
+ it("exits 0 and prints help for -h", async () => {
109
+ const { exitCode, stdout } = await runCli(["-h"]);
110
+ assert.equal(exitCode, 0);
111
+ assert.ok(stdout.includes("Usage:"));
112
+ });
113
+
114
+ it("exits 0 for install copilot", async () => {
115
+ const { exitCode, stdout } = await runCli(["install", "copilot"]);
116
+ assert.equal(exitCode, 0);
117
+ assert.ok(stdout.includes("copilot"));
118
+ });
119
+
120
+ it("exits 0 for install claude", async () => {
121
+ const { exitCode, stdout } = await runCli(["install", "claude"]);
122
+ assert.equal(exitCode, 0);
123
+ assert.ok(stdout.includes("claude"));
124
+ });
125
+
126
+ it("exits 0 for install pi", async () => {
127
+ const { exitCode, stdout } = await runCli(["install", "pi"]);
128
+ assert.equal(exitCode, 0);
129
+ assert.ok(stdout.includes("pi"));
130
+ });
131
+
132
+ it("exits 1 and prints error for install with no harness", async () => {
133
+ const { exitCode, stderr } = await runCli(["install"]);
134
+ assert.equal(exitCode, 1);
135
+ assert.ok(stderr.includes("Missing harness"));
136
+ });
137
+
138
+ it("exits 1 and prints error for install with unknown harness", async () => {
139
+ const { exitCode, stderr } = await runCli(["install", "docker"]);
140
+ assert.equal(exitCode, 1);
141
+ assert.ok(stderr.includes("Unknown harness"));
142
+ });
143
+
144
+ it("exits 1 and prints error for unknown command", async () => {
145
+ const { exitCode, stderr } = await runCli(["bogus"]);
146
+ assert.equal(exitCode, 1);
147
+ assert.ok(stderr.includes("Unknown command"));
148
+ });
149
+ });