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,331 +0,0 @@
1
- /**
2
- * Documentation Generator for Adapters
3
- *
4
- * Generates markdown documentation from actual skills/agents/commands
5
- * for use in adapter instruction files (.cursorrules, instructions.md, etc.)
6
- */
7
-
8
- import fs from 'fs-extra';
9
- import * as path from 'path';
10
- import * as YAML from 'yaml';
11
- import { getDirname } from '../utils/esm-helpers.js';
12
-
13
- const __dirname = getDirname(import.meta.url);
14
-
15
- interface SkillMetadata {
16
- name: string;
17
- description: string;
18
- location: string;
19
- }
20
-
21
- interface AgentMetadata {
22
- name: string;
23
- role: string;
24
- description: string;
25
- location: string;
26
- }
27
-
28
- interface CommandMetadata {
29
- name: string;
30
- description: string;
31
- location: string;
32
- }
33
-
34
- /**
35
- * Documentation Generator
36
- */
37
- export class DocGenerator {
38
- private skillsDir: string;
39
- private agentsDir: string;
40
- private commandsDir: string;
41
-
42
- constructor(
43
- skillsDir: string = path.join(__dirname, '../skills'),
44
- agentsDir: string = path.join(__dirname, '../agents'),
45
- commandsDir: string = path.join(__dirname, '../commands')
46
- ) {
47
- this.skillsDir = skillsDir;
48
- this.agentsDir = agentsDir;
49
- this.commandsDir = commandsDir;
50
- }
51
-
52
- /**
53
- * Extract skills metadata from SKILL.md files
54
- */
55
- async extractSkills(): Promise<SkillMetadata[]> {
56
- const skills: SkillMetadata[] = [];
57
-
58
- if (!await fs.pathExists(this.skillsDir)) {
59
- return skills;
60
- }
61
-
62
- const skillFolders = await fs.readdir(this.skillsDir);
63
-
64
- for (const folder of skillFolders) {
65
- const skillPath = path.join(this.skillsDir, folder);
66
- const skillFile = path.join(skillPath, 'SKILL.md');
67
-
68
- if (await fs.pathExists(skillFile)) {
69
- const content = await fs.readFile(skillFile, 'utf-8');
70
- const metadata = this.extractYAMLFrontmatter(content);
71
-
72
- if (metadata && metadata.name && metadata.description) {
73
- skills.push({
74
- name: metadata.name,
75
- description: metadata.description,
76
- location: `.claude/skills/${folder}/SKILL.md`
77
- });
78
- }
79
- }
80
- }
81
-
82
- return skills.sort((a, b) => a.name.localeCompare(b.name));
83
- }
84
-
85
- /**
86
- * Extract agents metadata from AGENT.md files
87
- */
88
- async extractAgents(): Promise<AgentMetadata[]> {
89
- const agents: AgentMetadata[] = [];
90
-
91
- if (!await fs.pathExists(this.agentsDir)) {
92
- return agents;
93
- }
94
-
95
- const agentFolders = await fs.readdir(this.agentsDir);
96
-
97
- for (const folder of agentFolders) {
98
- const agentPath = path.join(this.agentsDir, folder);
99
- const agentFile = path.join(agentPath, 'AGENT.md');
100
-
101
- if (await fs.pathExists(agentFile)) {
102
- const content = await fs.readFile(agentFile, 'utf-8');
103
-
104
- // Extract role from content (look for "# [Role]" heading)
105
- const roleMatch = content.match(/^#\s+(.+?)$/m);
106
- const role = roleMatch ? roleMatch[1].trim() : folder;
107
-
108
- // Extract description (first paragraph after frontmatter)
109
- const descriptionMatch = content.match(/---\n[\s\S]*?---\n\n(.+?)(?:\n\n|$)/);
110
- const description = descriptionMatch ? descriptionMatch[1].trim() : `${role} agent`;
111
-
112
- agents.push({
113
- name: folder,
114
- role: role,
115
- description: description,
116
- location: `.claude/agents/${folder}/AGENT.md`
117
- });
118
- }
119
- }
120
-
121
- return agents.sort((a, b) => a.name.localeCompare(b.name));
122
- }
123
-
124
- /**
125
- * Extract commands metadata from .md files
126
- */
127
- async extractCommands(): Promise<CommandMetadata[]> {
128
- const commands: CommandMetadata[] = [];
129
-
130
- if (!await fs.pathExists(this.commandsDir)) {
131
- return commands;
132
- }
133
-
134
- const commandFiles = await fs.readdir(this.commandsDir);
135
-
136
- for (const file of commandFiles) {
137
- if (file.endsWith('.md') && file !== 'README.md') {
138
- const commandPath = path.join(this.commandsDir, file);
139
- const content = await fs.readFile(commandPath, 'utf-8');
140
-
141
- // Extract description from first paragraph
142
- const descriptionMatch = content.match(/^(.+?)(?:\n\n|$)/);
143
- const description = descriptionMatch ? descriptionMatch[1].trim() : '';
144
-
145
- const commandName = file.replace('.md', '');
146
-
147
- commands.push({
148
- name: commandName,
149
- description: description,
150
- location: `.claude/commands/${file}`
151
- });
152
- }
153
- }
154
-
155
- return commands.sort((a, b) => a.name.localeCompare(b.name));
156
- }
157
-
158
- /**
159
- * Generate skills documentation for Cursor .cursorrules
160
- */
161
- async generateSkillsDocForCursor(): Promise<string> {
162
- const skills = await this.extractSkills();
163
-
164
- let doc = '## Available Skills (Read SKILL.md when task matches)\n\n';
165
- doc += 'SpecWeave skills are specialized capabilities. In Claude Code, they auto-activate.\n';
166
- doc += 'In Cursor, you simulate by reading the skill file and following its workflow.\n\n';
167
-
168
- for (const skill of skills) {
169
- doc += `### ${skill.name}\n`;
170
- doc += `**File**: \`${skill.location}\`\n`;
171
- doc += `**Description**: ${skill.description}\n`;
172
- doc += `**How to use**: Read the SKILL.md file and follow the workflow described\n\n`;
173
- }
174
-
175
- return doc;
176
- }
177
-
178
- /**
179
- * Generate agents documentation for Cursor .cursorrules
180
- */
181
- async generateAgentsDocForCursor(): Promise<string> {
182
- const agents = await this.extractAgents();
183
-
184
- let doc = '## Agent Roles (Adopt role when specialized expertise needed)\n\n';
185
- doc += 'SpecWeave agents are specialized roles. In Claude Code, they have separate contexts.\n';
186
- doc += 'In Cursor, you adopt the role\'s perspective and responsibilities.\n\n';
187
-
188
- for (const agent of agents) {
189
- doc += `### ${agent.role}\n`;
190
- doc += `**File**: \`${agent.location}\`\n`;
191
- doc += `**Description**: ${agent.description}\n`;
192
- doc += `**When to adopt**: Say "Adopting ${agent.role} role..." and follow AGENT.md guidance\n\n`;
193
- }
194
-
195
- return doc;
196
- }
197
-
198
- /**
199
- * Generate skills documentation for Copilot instructions.md
200
- */
201
- async generateSkillsDocForCopilot(): Promise<string> {
202
- const skills = await this.extractSkills();
203
-
204
- let doc = '## Available Capabilities (SpecWeave Skills)\n\n';
205
- doc += 'The project uses these specialized capabilities:\n\n';
206
-
207
- for (const skill of skills) {
208
- doc += `- **${skill.name}**: ${skill.description}\n`;
209
- }
210
-
211
- doc += '\n_Note: These are defined in `.claude/skills/` but work as documentation for code suggestions._\n\n';
212
-
213
- return doc;
214
- }
215
-
216
- /**
217
- * Generate agents documentation for Copilot instructions.md
218
- */
219
- async generateAgentsDocForCopilot(): Promise<string> {
220
- const agents = await this.extractAgents();
221
-
222
- let doc = '## Project Roles (SpecWeave Agents)\n\n';
223
- doc += 'Code in this project follows these role-based patterns:\n\n';
224
-
225
- for (const agent of agents) {
226
- doc += `- **${agent.role}**: ${agent.description}\n`;
227
- }
228
-
229
- doc += '\n_Note: These are defined in `.claude/agents/` but inform code patterns and suggestions._\n\n';
230
-
231
- return doc;
232
- }
233
-
234
- /**
235
- * Generate complete manual workflow for generic adapter
236
- */
237
- async generateManualWorkflow(): Promise<string> {
238
- const skills = await this.extractSkills();
239
- const agents = await this.extractAgents();
240
- const commands = await this.extractCommands();
241
-
242
- let doc = '# SpecWeave Manual Workflow Guide\n\n';
243
- doc += '_For use with ANY AI tool (ChatGPT, Claude web, Gemini, etc.)_\n\n';
244
- doc += '---\n\n';
245
-
246
- doc += '## What is SpecWeave?\n\n';
247
- doc += 'SpecWeave is a spec-driven development framework where specifications are the source of truth.\n';
248
- doc += 'This manual shows you how to use SpecWeave WITHOUT specialized tools (works with ANY AI).\n\n';
249
-
250
- doc += '## Available Capabilities\n\n';
251
- doc += 'While you can\'t auto-activate these like Claude Code, you can reference them:\n\n';
252
-
253
- doc += '### Skills\n\n';
254
- for (const skill of skills.slice(0, 10)) { // Top 10 skills
255
- doc += `- **${skill.name}**: ${skill.description}\n`;
256
- }
257
- doc += `\n_...and ${skills.length - 10} more in \`.claude/skills/\`_\n\n`;
258
-
259
- doc += '### Roles\n\n';
260
- for (const agent of agents) {
261
- doc += `- **${agent.role}**: ${agent.description}\n`;
262
- }
263
- doc += '\n';
264
-
265
- doc += '## Step-by-Step: Creating a Feature\n\n';
266
- doc += '### Step 1: Create Increment Folder\n\n';
267
- doc += '```bash\n';
268
- doc += 'mkdir -p .specweave/increments/0001-feature-name\n';
269
- doc += '```\n\n';
270
-
271
- doc += '### Step 2: Create spec.md (Act as Product Manager)\n\n';
272
- doc += '_Copy this template to your AI and ask it to fill it out:_\n\n';
273
- doc += '```markdown\n';
274
- doc += '---\n';
275
- doc += 'increment: 0001-feature-name\n';
276
- doc += 'title: "Feature Title"\n';
277
- doc += 'priority: P1\n';
278
- doc += 'status: planned\n';
279
- doc += '---\n\n';
280
- doc += '# Increment 0001: Feature Name\n\n';
281
- doc += '## Overview\n';
282
- doc += '[Problem and solution]\n\n';
283
- doc += '## User Stories\n';
284
- doc += '[User stories with acceptance criteria]\n';
285
- doc += '```\n\n';
286
-
287
- doc += '### Step 3: Create plan.md (Act as Architect)\n\n';
288
- doc += '_Copy this template to your AI:_\n\n';
289
- doc += '```markdown\n';
290
- doc += '# Technical Plan: Feature Name\n\n';
291
- doc += '## Architecture\n';
292
- doc += '[Component design]\n\n';
293
- doc += '## Data Model\n';
294
- doc += '[Database schema]\n';
295
- doc += '```\n\n';
296
-
297
- doc += '### Step 4: Create tasks.md\n\n';
298
- doc += '```markdown\n';
299
- doc += '# Implementation Tasks\n\n';
300
- doc += '- [ ] T001: Task 1\n';
301
- doc += '- [ ] T002: Task 2\n';
302
- doc += '```\n\n';
303
-
304
- doc += '### Step 5: Create context-manifest.yaml\n\n';
305
- doc += '```yaml\n';
306
- doc += 'spec_sections:\n';
307
- doc += ' - .specweave/docs/internal/strategy/relevant-spec.md\n';
308
- doc += 'documentation:\n';
309
- doc += ' - .specweave/docs/internal/architecture/relevant-design.md\n';
310
- doc += '```\n\n';
311
-
312
- doc += '## Complete Workflow Reference\n\n';
313
- doc += 'For detailed guidance, see SPECWEAVE.md in the project root.\n\n';
314
-
315
- return doc;
316
- }
317
-
318
- /**
319
- * Extract YAML frontmatter from markdown content
320
- */
321
- private extractYAMLFrontmatter(content: string): any {
322
- const match = content.match(/^---\n([\s\S]*?)\n---/);
323
- if (!match) return null;
324
-
325
- try {
326
- return YAML.parse(match[1]);
327
- } catch (error) {
328
- return null;
329
- }
330
- }
331
- }
@@ -1,97 +0,0 @@
1
- # Gemini CLI Adapter
2
-
3
- **Automation Level**: Semi (Good experience with 1M context window and agent mode)
4
-
5
- ## Overview
6
-
7
- The Gemini CLI adapter provides **semi-automation** for SpecWeave using Google's open-source Gemini CLI tool with **AGENTS.md** as the universal instruction file.
8
-
9
- ## Key Features
10
-
11
- - **1M Token Context Window**: Handle massive specifications
12
- - **Agent Mode**: Multi-file task completion with approval workflow
13
- - **MCP Support**: Model Context Protocol for extensibility
14
- - **Built-in Tools**: File operations, shell commands, Google Search, web fetching
15
- - **Free Tier**: Gemini 2.5 Pro included (60 req/min, 1K req/day)
16
- - **Open Source**: Apache 2.0 license
17
-
18
- ## Installation
19
-
20
- ```bash
21
- # Install Gemini CLI
22
- npm install -g @google-cloud/gemini-cli
23
-
24
- # Authenticate
25
- gemini auth
26
-
27
- # Initialize SpecWeave project with Gemini adapter
28
- npx specweave init my-project --adapter gemini
29
- ```
30
-
31
- ## How It Works
32
-
33
- Gemini CLI reads **AGENTS.md** (universal instruction file) for SpecWeave context:
34
-
35
- ```bash
36
- gemini "Read AGENTS.md and create increment for user authentication"
37
- ```
38
-
39
- Gemini will:
40
- 1. Read AGENTS.md for project structure and roles
41
- 2. Adopt PM role: Create spec.md (WHAT/WHY)
42
- 3. Adopt Architect role: Create plan.md (HOW)
43
- 4. Create tasks.md (implementation checklist)
44
- 5. Use agent mode for multi-file operations
45
-
46
- ## Universal AGENTS.md
47
-
48
- Instead of tool-specific files (.cursorrules, copilot instructions), SpecWeave uses **AGENTS.md** that works with ALL tools:
49
-
50
- - ✅ Gemini CLI
51
- - ✅ Codex (OpenAI)
52
- - ✅ Cursor
53
- - ✅ GitHub Copilot
54
- - ✅ ANY AI tool
55
-
56
- **Single source of truth** = easier maintenance!
57
-
58
- ## Example Workflows
59
-
60
- ### Create Feature
61
- ```bash
62
- gemini "Read AGENTS.md. Create increment 0002 for payment processing with Stripe."
63
- ```
64
-
65
- ### Implement Task
66
- ```bash
67
- gemini "Read increment 0002, implement task T001"
68
- ```
69
-
70
- ### Context Loading (70%+ Token Savings)
71
- ```bash
72
- gemini "Read context-manifest.yaml from increment 0001, load only those files, then implement T001"
73
- ```
74
-
75
- ## Comparison with Claude Code
76
-
77
- | Feature | Claude Code | Gemini CLI |
78
- |---------|-------------|------------|
79
- | **Automation** | Full | Semi |
80
- | **Context** | 200k tokens | 1M tokens (5x!) |
81
- | **Skills** | Native | Via AGENTS.md |
82
- | **Agents** | Native (separate contexts) | Via AGENTS.md (manual adoption) |
83
- | **Hooks** | Yes (auto-update) | No (manual) |
84
- | **Cost** | Paid | Free tier available |
85
- | **Open Source** | No | Yes (Apache 2.0) |
86
-
87
- ## Links
88
-
89
- - [Gemini CLI Documentation](https://developers.google.com/gemini-code-assist/docs/gemini-cli)
90
- - [GitHub Repository](https://github.com/google-gemini/gemini-cli)
91
- - [SpecWeave Website](https://spec-weave.com)
92
-
93
- ---
94
-
95
- **Status**: Active (v0.2.0+)
96
- **Market Share**: Growing (Google's AI coding tool)
97
- **Priority**: P1 (high impact - 1M context window!)