specweave 0.6.8 → 0.7.1

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 (255) hide show
  1. package/.claude-plugin/README.md +1 -1
  2. package/CLAUDE.md +903 -99
  3. package/README.md +143 -207
  4. package/bin/specweave.js +67 -0
  5. package/dist/cli/commands/abandon.d.ts +13 -0
  6. package/dist/cli/commands/abandon.d.ts.map +1 -0
  7. package/dist/cli/commands/abandon.js +15 -0
  8. package/dist/cli/commands/abandon.js.map +1 -0
  9. package/dist/cli/commands/init.d.ts.map +1 -1
  10. package/dist/cli/commands/init.js +94 -18
  11. package/dist/cli/commands/init.js.map +1 -1
  12. package/dist/cli/commands/pause.d.ts +13 -0
  13. package/dist/cli/commands/pause.d.ts.map +1 -0
  14. package/dist/cli/commands/pause.js +15 -0
  15. package/dist/cli/commands/pause.js.map +1 -0
  16. package/dist/cli/commands/qa.d.ts +54 -0
  17. package/dist/cli/commands/qa.d.ts.map +1 -0
  18. package/dist/cli/commands/qa.js +98 -0
  19. package/dist/cli/commands/qa.js.map +1 -0
  20. package/dist/cli/commands/resume.d.ts +12 -0
  21. package/dist/cli/commands/resume.d.ts.map +1 -0
  22. package/dist/cli/commands/resume.js +14 -0
  23. package/dist/cli/commands/resume.js.map +1 -0
  24. package/dist/cli/commands/status.d.ts +12 -0
  25. package/dist/cli/commands/status.d.ts.map +1 -0
  26. package/dist/cli/commands/status.js +23 -0
  27. package/dist/cli/commands/status.js.map +1 -0
  28. package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
  29. package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  30. package/dist/cli/helpers/issue-tracker/ado.js +223 -0
  31. package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
  32. package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
  33. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  34. package/dist/cli/helpers/issue-tracker/github.js +284 -0
  35. package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
  36. package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
  37. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  38. package/dist/cli/helpers/issue-tracker/index.js +270 -0
  39. package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
  40. package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
  41. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  42. package/dist/cli/helpers/issue-tracker/jira.js +265 -0
  43. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
  44. package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
  45. package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  46. package/dist/cli/helpers/issue-tracker/types.js +16 -0
  47. package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
  48. package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
  49. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  50. package/dist/cli/helpers/issue-tracker/utils.js +240 -0
  51. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
  52. package/dist/core/increment/limits.d.ts +68 -0
  53. package/dist/core/increment/limits.d.ts.map +1 -0
  54. package/dist/core/increment/limits.js +224 -0
  55. package/dist/core/increment/limits.js.map +1 -0
  56. package/dist/core/increment/metadata-manager.d.ts +114 -0
  57. package/dist/core/increment/metadata-manager.d.ts.map +1 -0
  58. package/dist/core/increment/metadata-manager.js +320 -0
  59. package/dist/core/increment/metadata-manager.js.map +1 -0
  60. package/dist/core/increment/status-commands.d.ts +43 -0
  61. package/dist/core/increment/status-commands.d.ts.map +1 -0
  62. package/dist/core/increment/status-commands.js +277 -0
  63. package/dist/core/increment/status-commands.js.map +1 -0
  64. package/dist/core/plugin-detector.d.ts +1 -0
  65. package/dist/core/plugin-detector.d.ts.map +1 -1
  66. package/dist/core/plugin-detector.js +25 -0
  67. package/dist/core/plugin-detector.js.map +1 -1
  68. package/dist/core/qa/qa-runner.d.ts +16 -0
  69. package/dist/core/qa/qa-runner.d.ts.map +1 -0
  70. package/dist/core/qa/qa-runner.js +404 -0
  71. package/dist/core/qa/qa-runner.js.map +1 -0
  72. package/dist/core/qa/quality-gate-decider.d.ts +53 -0
  73. package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
  74. package/dist/core/qa/quality-gate-decider.js +268 -0
  75. package/dist/core/qa/quality-gate-decider.js.map +1 -0
  76. package/dist/core/qa/risk-calculator.d.ts +126 -0
  77. package/dist/core/qa/risk-calculator.d.ts.map +1 -0
  78. package/dist/core/qa/risk-calculator.js +247 -0
  79. package/dist/core/qa/risk-calculator.js.map +1 -0
  80. package/dist/core/qa/types.d.ts +315 -0
  81. package/dist/core/qa/types.d.ts.map +1 -0
  82. package/dist/core/qa/types.js +8 -0
  83. package/dist/core/qa/types.js.map +1 -0
  84. package/dist/core/types/config.d.ts +35 -0
  85. package/dist/core/types/config.d.ts.map +1 -1
  86. package/dist/core/types/config.js +16 -0
  87. package/dist/core/types/config.js.map +1 -1
  88. package/dist/core/types/increment-metadata.d.ts +120 -0
  89. package/dist/core/types/increment-metadata.d.ts.map +1 -0
  90. package/dist/core/types/increment-metadata.js +138 -0
  91. package/dist/core/types/increment-metadata.js.map +1 -0
  92. package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
  93. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  94. package/dist/hooks/lib/invoke-translator-skill.js +201 -0
  95. package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
  96. package/dist/hooks/lib/translate-file.d.ts +59 -0
  97. package/dist/hooks/lib/translate-file.d.ts.map +1 -0
  98. package/dist/hooks/lib/translate-file.js +350 -0
  99. package/dist/hooks/lib/translate-file.js.map +1 -0
  100. package/dist/locales/en/cli.json +3 -1
  101. package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
  102. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  103. package/dist/metrics/calculators/change-failure-rate.js +70 -0
  104. package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
  105. package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
  106. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  107. package/dist/metrics/calculators/deployment-frequency.js +61 -0
  108. package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
  109. package/dist/metrics/calculators/lead-time.d.ts +22 -0
  110. package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
  111. package/dist/metrics/calculators/lead-time.js +82 -0
  112. package/dist/metrics/calculators/lead-time.js.map +1 -0
  113. package/dist/metrics/calculators/mttr.d.ts +21 -0
  114. package/dist/metrics/calculators/mttr.d.ts.map +1 -0
  115. package/dist/metrics/calculators/mttr.js +60 -0
  116. package/dist/metrics/calculators/mttr.js.map +1 -0
  117. package/dist/metrics/dora-calculator.d.ts +24 -0
  118. package/dist/metrics/dora-calculator.d.ts.map +1 -0
  119. package/dist/metrics/dora-calculator.js +104 -0
  120. package/dist/metrics/dora-calculator.js.map +1 -0
  121. package/dist/metrics/github-client.d.ts +51 -0
  122. package/dist/metrics/github-client.d.ts.map +1 -0
  123. package/dist/metrics/github-client.js +133 -0
  124. package/dist/metrics/github-client.js.map +1 -0
  125. package/dist/metrics/types.d.ts +112 -0
  126. package/dist/metrics/types.d.ts.map +1 -0
  127. package/dist/metrics/types.js +10 -0
  128. package/dist/metrics/types.js.map +1 -0
  129. package/dist/metrics/utils/percentile.d.ts +25 -0
  130. package/dist/metrics/utils/percentile.d.ts.map +1 -0
  131. package/dist/metrics/utils/percentile.js +46 -0
  132. package/dist/metrics/utils/percentile.js.map +1 -0
  133. package/dist/metrics/utils/tier-classifier.d.ts +61 -0
  134. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
  135. package/dist/metrics/utils/tier-classifier.js +100 -0
  136. package/dist/metrics/utils/tier-classifier.js.map +1 -0
  137. package/dist/utils/auth-helpers.d.ts +58 -0
  138. package/dist/utils/auth-helpers.d.ts.map +1 -0
  139. package/dist/utils/auth-helpers.js +108 -0
  140. package/dist/utils/auth-helpers.js.map +1 -0
  141. package/dist/utils/env-file.d.ts +88 -0
  142. package/dist/utils/env-file.d.ts.map +1 -0
  143. package/dist/utils/env-file.js +180 -0
  144. package/dist/utils/env-file.js.map +1 -0
  145. package/dist/utils/plugin-detection.d.ts +50 -0
  146. package/dist/utils/plugin-detection.d.ts.map +1 -0
  147. package/dist/utils/plugin-detection.js +229 -0
  148. package/dist/utils/plugin-detection.js.map +1 -0
  149. package/dist/utils/secrets-loader.d.ts +88 -0
  150. package/dist/utils/secrets-loader.d.ts.map +1 -0
  151. package/dist/utils/secrets-loader.js +271 -0
  152. package/dist/utils/secrets-loader.js.map +1 -0
  153. package/dist/utils/translation.d.ts +187 -0
  154. package/dist/utils/translation.d.ts.map +1 -0
  155. package/dist/utils/translation.js +414 -0
  156. package/dist/utils/translation.js.map +1 -0
  157. package/package.json +28 -44
  158. package/plugins/specweave/.claude-plugin/plugin.json +3 -3
  159. package/plugins/specweave/agents/pm/AGENT.md +330 -54
  160. package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
  161. package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
  162. package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
  163. package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
  164. package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
  165. package/plugins/specweave/commands/README.md +88 -163
  166. package/plugins/specweave/commands/specweave-abandon.md +314 -0
  167. package/plugins/specweave/commands/specweave-check-tests.md +546 -0
  168. package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
  169. package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
  170. package/plugins/specweave/commands/specweave-pause.md +189 -0
  171. package/plugins/specweave/commands/specweave-qa.md +245 -0
  172. package/plugins/specweave/commands/specweave-resume.md +216 -0
  173. package/plugins/specweave/commands/specweave-status.md +397 -0
  174. package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
  175. package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
  176. package/plugins/specweave/commands/specweave-update-scope.md +351 -0
  177. package/plugins/specweave/commands/specweave.md +21 -21
  178. package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
  179. package/plugins/specweave/hooks/post-task-completion.sh +141 -0
  180. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  181. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
  182. package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
  183. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
  184. package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
  185. package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
  186. package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
  187. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  188. package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
  189. package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
  190. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
  191. package/plugins/specweave-ado/commands/close-workitem.md +52 -0
  192. package/plugins/specweave-ado/commands/create-workitem.md +53 -0
  193. package/plugins/specweave-ado/commands/status.md +53 -0
  194. package/plugins/specweave-ado/commands/sync.md +55 -0
  195. package/plugins/specweave-ado/lib/ado-client.ts +361 -0
  196. package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
  197. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
  198. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
  199. package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
  200. package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
  201. package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
  202. package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
  203. package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
  204. package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
  205. package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
  206. package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
  207. package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
  208. package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
  209. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
  210. package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
  211. package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
  212. package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
  213. package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
  214. package/plugins/specweave-ml/commands/ml-explain.md +1 -1
  215. package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
  216. package/src/templates/AGENTS.md.template +331 -31
  217. package/src/templates/CLAUDE.md.template +36 -21
  218. package/src/templates/COMPLETION-REPORT.template.md +128 -0
  219. package/src/templates/README.md.template +17 -16
  220. package/src/templates/docs/README.md +11 -9
  221. package/src/templates/docs/spec-template.md +229 -0
  222. package/plugins/specweave/commands/inc.md +0 -85
  223. package/plugins/specweave/commands/list-increments.md +0 -180
  224. package/src/adapters/README.md +0 -275
  225. package/src/adapters/adapter-base.ts +0 -182
  226. package/src/adapters/adapter-interface.ts +0 -166
  227. package/src/adapters/adapter-loader.ts +0 -256
  228. package/src/adapters/agents-md-generator.ts +0 -228
  229. package/src/adapters/claude/README.md +0 -233
  230. package/src/adapters/claude/adapter.ts +0 -468
  231. package/src/adapters/claude-md-generator.ts +0 -377
  232. package/src/adapters/codex/README.md +0 -105
  233. package/src/adapters/codex/adapter.ts +0 -333
  234. package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
  235. package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
  236. package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
  237. package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
  238. package/src/adapters/cursor/README.md +0 -283
  239. package/src/adapters/cursor/adapter.ts +0 -451
  240. package/src/adapters/doc-generator.ts +0 -331
  241. package/src/adapters/gemini/README.md +0 -97
  242. package/src/adapters/gemini/adapter.ts +0 -298
  243. package/src/adapters/generic/README.md +0 -277
  244. package/src/adapters/generic/adapter.ts +0 -378
  245. package/src/adapters/registry.yaml +0 -187
  246. /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
  247. /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
  248. /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
  249. /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
  250. /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
  251. /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
  252. /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
  253. /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
  254. /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
  255. /package/plugins/specweave/commands/{validate.md → specweave-validate.md} +0 -0
@@ -1,377 +0,0 @@
1
- /**
2
- * CLAUDE.md Generator
3
- *
4
- * Generates CLAUDE.md - the PRIMARY instruction file for Claude Code.
5
- *
6
- * CRITICAL:
7
- * - Claude Code ONLY reads CLAUDE.md (NOT AGENTS.md)
8
- * - This is the native/baseline implementation (skills, agents, hooks, slash commands)
9
- * - Claude Code is NOT an adapter - it's the gold standard that others try to approximate
10
- *
11
- * This generator creates a quick reference that lists what's actually installed,
12
- * so when we add new agents/skills, CLAUDE.md stays in sync automatically.
13
- */
14
-
15
- import { DocGenerator } from './doc-generator.js';
16
- import * as path from 'path';
17
- import fs from 'fs-extra';
18
- import { getDirname } from '../utils/esm-helpers.js';
19
-
20
- const __dirname = getDirname(import.meta.url);
21
-
22
- /**
23
- * Find the package root by walking up the directory tree looking for package.json
24
- * This works reliably on all platforms including Windows with UNC paths
25
- */
26
- function findPackageRoot(startDir: string): string | null {
27
- let currentDir = startDir;
28
- const root = path.parse(currentDir).root;
29
-
30
- while (currentDir !== root) {
31
- const packageJsonPath = path.join(currentDir, 'package.json');
32
- if (fs.existsSync(packageJsonPath)) {
33
- try {
34
- const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
35
- // Verify this is the specweave package
36
- if (packageJson.name === 'specweave') {
37
- return currentDir;
38
- }
39
- } catch (error) {
40
- // Not a valid package.json, continue searching
41
- }
42
- }
43
- const parentDir = path.dirname(currentDir);
44
- if (parentDir === currentDir) break; // Reached root
45
- currentDir = parentDir;
46
- }
47
-
48
- return null;
49
- }
50
-
51
- /**
52
- * Find template file using package root detection
53
- */
54
- function findTemplateFile(filename: string): string | null {
55
- const packageRoot = findPackageRoot(__dirname);
56
-
57
- if (packageRoot) {
58
- // Try src/templates/ first (for npm installs)
59
- const srcPath = path.normalize(path.join(packageRoot, 'src', 'templates', filename));
60
- if (fs.existsSync(srcPath)) {
61
- return srcPath;
62
- }
63
-
64
- // Try dist/templates/ (shouldn't exist but try anyway)
65
- const distPath = path.normalize(path.join(packageRoot, 'dist', 'templates', filename));
66
- if (fs.existsSync(distPath)) {
67
- return distPath;
68
- }
69
-
70
- // Try templates/ directly in package root
71
- const rootPath = path.normalize(path.join(packageRoot, 'templates', filename));
72
- if (fs.existsSync(rootPath)) {
73
- return rootPath;
74
- }
75
- }
76
-
77
- return null;
78
- }
79
-
80
- export interface ClaudeMdOptions {
81
- projectName: string;
82
- projectPath: string;
83
- templatePath?: string;
84
- }
85
-
86
- /**
87
- * Generate CLAUDE.md with dynamic agent/skill sections
88
- */
89
- export class ClaudeMdGenerator {
90
- private docGen: DocGenerator;
91
-
92
- constructor(
93
- skillsDir?: string,
94
- agentsDir?: string,
95
- commandsDir?: string
96
- ) {
97
- this.docGen = new DocGenerator(skillsDir, agentsDir, commandsDir);
98
- }
99
-
100
- /**
101
- * Generate complete CLAUDE.md content
102
- */
103
- async generate(options: ClaudeMdOptions): Promise<string> {
104
- // Read template - use provided path or find it via package root
105
- let templatePath = options.templatePath;
106
-
107
- if (!templatePath || !await fs.pathExists(templatePath)) {
108
- // Fallback: try to find template using package root detection
109
- const foundPath = findTemplateFile('CLAUDE.md.template');
110
- if (foundPath) {
111
- templatePath = foundPath;
112
- } else {
113
- const errorMsg = options.templatePath
114
- ? `CLAUDE.md template not found at: ${options.templatePath}\nAlso tried package root detection but failed.`
115
- : `CLAUDE.md template not found. Tried:\n - Package root detection\n - __dirname: ${__dirname}\n - Default: ${path.join(__dirname, '../templates/CLAUDE.md.template')}`;
116
- throw new Error(errorMsg);
117
- }
118
- }
119
-
120
- let content = await fs.readFile(templatePath, 'utf-8');
121
-
122
- // Replace placeholders
123
- content = content.replace(/\{PROJECT_NAME\}/g, options.projectName);
124
-
125
- // Replace dynamic sections
126
- content = await this.replaceDynamicSections(content);
127
-
128
- return content;
129
- }
130
-
131
- /**
132
- * Replace dynamic sections in template
133
- */
134
- private async replaceDynamicSections(content: string): Promise<string> {
135
- // Extract actual skills and agents
136
- const skills = await this.docGen.extractSkills();
137
- const agents = await this.docGen.extractAgents();
138
- const commands = await this.docGen.extractCommands();
139
-
140
- // Replace agents section (lines 226-243 in template)
141
- content = this.replaceAgentsSection(content, agents);
142
-
143
- // Replace skills section (lines 248-278 in template)
144
- content = this.replaceSkillsSection(content, skills);
145
-
146
- // Replace commands section if needed
147
- content = this.replaceCommandsSection(content, commands);
148
-
149
- return content;
150
- }
151
-
152
- /**
153
- * Generate dynamic agents section
154
- */
155
- private replaceAgentsSection(content: string, agents: any[]): string {
156
- const agentsTable = this.generateAgentsTable(agents);
157
-
158
- // Find the agents section and replace it
159
- // Look for "## Agents (Activate Automatically)" section
160
- const agentsSectionRegex = /## Agents \(Activate Automatically\)[\s\S]*?(?=\n## |$)/;
161
-
162
- const agentsSection = `## Agents (Activate Automatically)
163
-
164
- **Strategic Agents** (pre-installed & ready to use):
165
-
166
- ${agentsTable}
167
-
168
- **All ${agents.length} agents are pre-installed** - Claude uses the right one based on your request!
169
-
170
- **See**: \`.claude/agents/\` for complete list
171
-
172
- ---
173
- `;
174
-
175
- if (agentsSectionRegex.test(content)) {
176
- return content.replace(agentsSectionRegex, agentsSection);
177
- }
178
-
179
- return content;
180
- }
181
-
182
- /**
183
- * Generate agents table
184
- */
185
- private generateAgentsTable(agents: any[]): string {
186
- let table = '| Agent | Purpose | Activates When |\n';
187
- table += '|-------|---------|----------------|\n';
188
-
189
- for (const agent of agents) {
190
- const activation = this.getAgentActivation(agent.name);
191
- table += `| \`${agent.name}\` | ${agent.description} | ${activation} |\n`;
192
- }
193
-
194
- return table;
195
- }
196
-
197
- /**
198
- * Get agent activation guidance
199
- */
200
- private getAgentActivation(agentName: string): string {
201
- const activations: Record<string, string> = {
202
- 'pm': 'Planning features',
203
- 'architect': 'Technical design',
204
- 'security': 'Security review',
205
- 'qa-lead': 'Testing',
206
- 'devops': 'Deployment needed',
207
- 'tech-lead': 'Code review',
208
- 'sre': 'Troubleshooting',
209
- 'docs-writer': 'Writing docs',
210
- 'performance': 'Optimization needed',
211
- 'frontend': 'Frontend development',
212
- 'nodejs-backend': 'Node.js backend',
213
- 'python-backend': 'Python backend',
214
- 'nextjs': 'Next.js development',
215
- 'dotnet-backend': '.NET development'
216
- };
217
-
218
- return activations[agentName] || 'Specialized tasks';
219
- }
220
-
221
- /**
222
- * Generate dynamic skills section
223
- */
224
- private replaceSkillsSection(content: string, skills: any[]): string {
225
- const skillsTable = this.generateSkillsTable(skills);
226
-
227
- // Find the skills section and replace it
228
- const skillsSectionRegex = /## Skills \(Activate Automatically\)[\s\S]*?(?=\n## |$)/;
229
-
230
- const skillsSection = `## Skills (Activate Automatically)
231
-
232
- **Framework Skills** (always available):
233
-
234
- ${this.generateFrameworkSkillsTable(skills)}
235
-
236
- **Technology Skills** (all pre-installed):
237
-
238
- ${this.generateTechSkillsTable(skills)}
239
-
240
- **Integration Skills** (all pre-installed):
241
-
242
- ${this.generateIntegrationSkillsTable(skills)}
243
-
244
- **See**: \`.claude/skills/\` for complete list of ${skills.length}+ skills!
245
-
246
- ---
247
- `;
248
-
249
- if (skillsSectionRegex.test(content)) {
250
- return content.replace(skillsSectionRegex, skillsSection);
251
- }
252
-
253
- return content;
254
- }
255
-
256
- /**
257
- * Generate framework skills table
258
- */
259
- private generateFrameworkSkillsTable(skills: any[]): string {
260
- const frameworkSkills = skills.filter(s =>
261
- ['specweave-detector', 'increment-planner', 'context-loader', 'skill-router',
262
- 'spec-driven-debugging', 'spec-driven-brainstorming', 'brownfield-analyzer'].includes(s.name)
263
- );
264
-
265
- let table = '| Skill | Purpose | Activates When |\n';
266
- table += '|-------|---------|----------------|\n';
267
-
268
- for (const skill of frameworkSkills) {
269
- const activation = this.getSkillActivation(skill.name);
270
- table += `| \`${skill.name}\` | ${this.truncate(skill.description, 60)} | ${activation} |\n`;
271
- }
272
-
273
- return table;
274
- }
275
-
276
- /**
277
- * Generate tech skills table
278
- */
279
- private generateTechSkillsTable(skills: any[]): string {
280
- const techSkills = skills.filter(s =>
281
- ['nodejs-backend', 'python-backend', 'nextjs', 'frontend', 'dotnet-backend',
282
- 'e2e-playwright'].includes(s.name)
283
- );
284
-
285
- let table = '| Skill | Purpose | Activates When |\n';
286
- table += '|-------|---------|----------------|\n';
287
-
288
- for (const skill of techSkills) {
289
- const activation = this.getSkillActivation(skill.name);
290
- table += `| \`${skill.name}\` | ${this.truncate(skill.description, 60)} | ${activation} |\n`;
291
- }
292
-
293
- return table;
294
- }
295
-
296
- /**
297
- * Generate integration skills table
298
- */
299
- private generateIntegrationSkillsTable(skills: any[]): string {
300
- const integrationSkills = skills.filter(s =>
301
- ['jira-sync', 'github-sync', 'ado-sync', 'hetzner-provisioner',
302
- 'cost-optimizer', 'figma-mcp-connector'].includes(s.name)
303
- );
304
-
305
- let table = '| Skill | Purpose | Activates When |\n';
306
- table += '|-------|---------|----------------|\n';
307
-
308
- for (const skill of integrationSkills) {
309
- const activation = this.getSkillActivation(skill.name);
310
- table += `| \`${skill.name}\` | ${this.truncate(skill.description, 60)} | ${activation} |\n`;
311
- }
312
-
313
- return table;
314
- }
315
-
316
- /**
317
- * Get skill activation guidance
318
- */
319
- private getSkillActivation(skillName: string): string {
320
- const activations: Record<string, string> = {
321
- 'specweave-detector': 'User asks about SpecWeave',
322
- 'increment-planner': '/pi or feature planning',
323
- 'context-loader': 'Working on increments',
324
- 'skill-router': 'Ambiguous requests',
325
- 'spec-driven-debugging': 'Bug or test failure',
326
- 'spec-driven-brainstorming': 'Brainstorm or refine idea',
327
- 'nodejs-backend': 'Node.js backend',
328
- 'python-backend': 'Python backend',
329
- 'nextjs': 'Next.js',
330
- 'frontend': 'Frontend',
331
- 'dotnet-backend': '.NET',
332
- 'jira-sync': 'JIRA integration',
333
- 'github-sync': 'GitHub integration',
334
- 'ado-sync': 'Azure DevOps sync',
335
- 'hetzner-provisioner': 'Hetzner deployment',
336
- 'cost-optimizer': 'Cost optimization',
337
- 'e2e-playwright': 'E2E testing'
338
- };
339
-
340
- return activations[skillName] || 'Specialized tasks';
341
- }
342
-
343
- /**
344
- * Generate skills table
345
- */
346
- private generateSkillsTable(skills: any[]): string {
347
- let table = '| Skill | Description |\n';
348
- table += '|-------|-------------|\n';
349
-
350
- for (const skill of skills.slice(0, 20)) { // Top 20 skills
351
- table += `| \`${skill.name}\` | ${this.truncate(skill.description, 80)} |\n`;
352
- }
353
-
354
- if (skills.length > 20) {
355
- table += `| _...and ${skills.length - 20} more_ | See \`.claude/skills/\` |\n`;
356
- }
357
-
358
- return table;
359
- }
360
-
361
- /**
362
- * Replace commands section
363
- */
364
- private replaceCommandsSection(content: string, commands: any[]): string {
365
- // Commands are already listed in the template, but we could make them dynamic too
366
- // For now, we'll skip this since commands are explicitly documented
367
- return content;
368
- }
369
-
370
- /**
371
- * Truncate text to max length
372
- */
373
- private truncate(text: string, maxLength: number): string {
374
- if (text.length <= maxLength) return text;
375
- return text.substring(0, maxLength - 3) + '...';
376
- }
377
- }
@@ -1,105 +0,0 @@
1
- # OpenAI Codex Adapter
2
-
3
- **Automation Level**: Semi (Good experience with GPT-5-Codex and multiple access points)
4
-
5
- ## Overview
6
-
7
- The Codex adapter provides **semi-automation** for SpecWeave using OpenAI's Codex (ChatGPT Code Interpreter/Codex CLI) with **AGENTS.md** as the universal instruction file.
8
-
9
- ## Key Features
10
-
11
- - **GPT-5-Codex Model**: Optimized for engineering tasks
12
- - **Multiple Access Points**: CLI, Web, IDE, GitHub, iOS app
13
- - **Task-Based Execution**: Isolated environments per task
14
- - **File Operations**: Read, write, execute commands
15
- - **Test Execution**: Run tests and validate implementations
16
- - **Real-Time Progress**: Monitor task execution (1-30 min/task)
17
-
18
- ## Installation
19
-
20
- ```bash
21
- # Install Codex CLI (requires ChatGPT Plus/Pro/Business/Enterprise)
22
- npm install -g openai-codex-cli
23
-
24
- # Initialize SpecWeave project with Codex adapter
25
- npx specweave init my-project --adapter codex
26
- ```
27
-
28
- ## How It Works
29
-
30
- ### Option 1: Codex CLI (Fastest)
31
- ```bash
32
- codex "Read AGENTS.md and create increment for user authentication"
33
- ```
34
-
35
- ### Option 2: ChatGPT Web (Most Accessible)
36
- 1. Upload AGENTS.md file
37
- 2. Say: "Create increment for user authentication following SpecWeave"
38
- 3. Copy generated content to files
39
-
40
- ### Option 3: IDE Integration
41
- Use Codex in your IDE (VS Code, JetBrains) with AGENTS.md reference
42
-
43
- ## Universal AGENTS.md
44
-
45
- Instead of tool-specific files, SpecWeave uses **AGENTS.md** that works with ALL tools:
46
-
47
- - ✅ Codex (OpenAI)
48
- - ✅ Gemini CLI
49
- - ✅ Cursor
50
- - ✅ GitHub Copilot
51
- - ✅ ANY AI tool
52
-
53
- **Single source of truth** = easier maintenance!
54
-
55
- ## Example Workflows
56
-
57
- ### Create Feature (CLI)
58
- ```bash
59
- codex "Read AGENTS.md. Create increment 0002 for payment processing with Stripe."
60
- ```
61
-
62
- ### Create Feature (Web)
63
- 1. Upload AGENTS.md to ChatGPT
64
- 2. Say: "Create increment for payment processing"
65
- 3. Download generated files
66
-
67
- ### Implement Task
68
- ```bash
69
- codex "Read increment 0002, implement task T001"
70
- ```
71
-
72
- ### Fix Bug with Tests
73
- ```bash
74
- codex "Read AGENTS.md and increment 0001. Fix auth bug. Run tests."
75
- ```
76
-
77
- ## Comparison with Claude Code
78
-
79
- | Feature | Claude Code | Codex |
80
- |---------|-------------|-------|
81
- | **Automation** | Full | Semi |
82
- | **Skills** | Native | Via AGENTS.md |
83
- | **Agents** | Native | Via AGENTS.md |
84
- | **Access Points** | CLI only | CLI + Web + IDE + GitHub + iOS |
85
- | **Model** | Sonnet 4.5 | GPT-5-Codex |
86
- | **Task Isolation** | No | Yes (isolated per task) |
87
- | **Hooks** | Yes | No |
88
-
89
- ## Plans & Pricing
90
-
91
- - **ChatGPT Plus**: $20/month (Codex included)
92
- - **ChatGPT Pro**: $200/month (unlimited, faster)
93
- - **Business/Enterprise**: Custom pricing
94
-
95
- ## Links
96
-
97
- - [OpenAI Codex](https://openai.com/codex/)
98
- - [ChatGPT Features](https://chatgpt.com/features/codex)
99
- - [SpecWeave Website](https://spec-weave.com)
100
-
101
- ---
102
-
103
- **Status**: Active (v0.2.0+)
104
- **Market Share**: ~20% (OpenAI users)
105
- **Priority**: P1 (high impact - most accessible AI tool)