specweave 0.6.7 → 0.7.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 (281) hide show
  1. package/.claude-plugin/README.md +1 -1
  2. package/CLAUDE.md +920 -107
  3. package/README.md +143 -207
  4. package/bin/specweave.js +67 -0
  5. package/dist/adapters/adapter-interface.d.ts +11 -11
  6. package/dist/adapters/adapter-interface.d.ts.map +1 -1
  7. package/dist/adapters/adapter-interface.js +1 -1
  8. package/dist/adapters/adapter-loader.d.ts +1 -2
  9. package/dist/adapters/adapter-loader.d.ts.map +1 -1
  10. package/dist/adapters/adapter-loader.js +3 -6
  11. package/dist/adapters/adapter-loader.js.map +1 -1
  12. package/dist/adapters/agents-md-generator.d.ts +3 -3
  13. package/dist/adapters/agents-md-generator.js +3 -3
  14. package/dist/adapters/generic/adapter.d.ts +2 -2
  15. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  16. package/dist/adapters/generic/adapter.js +28 -9
  17. package/dist/adapters/generic/adapter.js.map +1 -1
  18. package/dist/cli/commands/abandon.d.ts +13 -0
  19. package/dist/cli/commands/abandon.d.ts.map +1 -0
  20. package/dist/cli/commands/abandon.js +15 -0
  21. package/dist/cli/commands/abandon.js.map +1 -0
  22. package/dist/cli/commands/init.d.ts.map +1 -1
  23. package/dist/cli/commands/init.js +141 -40
  24. package/dist/cli/commands/init.js.map +1 -1
  25. package/dist/cli/commands/pause.d.ts +13 -0
  26. package/dist/cli/commands/pause.d.ts.map +1 -0
  27. package/dist/cli/commands/pause.js +15 -0
  28. package/dist/cli/commands/pause.js.map +1 -0
  29. package/dist/cli/commands/qa.d.ts +54 -0
  30. package/dist/cli/commands/qa.d.ts.map +1 -0
  31. package/dist/cli/commands/qa.js +98 -0
  32. package/dist/cli/commands/qa.js.map +1 -0
  33. package/dist/cli/commands/resume.d.ts +12 -0
  34. package/dist/cli/commands/resume.d.ts.map +1 -0
  35. package/dist/cli/commands/resume.js +14 -0
  36. package/dist/cli/commands/resume.js.map +1 -0
  37. package/dist/cli/commands/status.d.ts +12 -0
  38. package/dist/cli/commands/status.d.ts.map +1 -0
  39. package/dist/cli/commands/status.js +23 -0
  40. package/dist/cli/commands/status.js.map +1 -0
  41. package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
  42. package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  43. package/dist/cli/helpers/issue-tracker/ado.js +223 -0
  44. package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
  45. package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
  46. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  47. package/dist/cli/helpers/issue-tracker/github.js +284 -0
  48. package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
  49. package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
  50. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  51. package/dist/cli/helpers/issue-tracker/index.js +270 -0
  52. package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
  53. package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
  54. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  55. package/dist/cli/helpers/issue-tracker/jira.js +265 -0
  56. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
  57. package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
  58. package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  59. package/dist/cli/helpers/issue-tracker/types.js +16 -0
  60. package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
  61. package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
  62. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  63. package/dist/cli/helpers/issue-tracker/utils.js +240 -0
  64. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
  65. package/dist/core/increment/limits.d.ts +68 -0
  66. package/dist/core/increment/limits.d.ts.map +1 -0
  67. package/dist/core/increment/limits.js +224 -0
  68. package/dist/core/increment/limits.js.map +1 -0
  69. package/dist/core/increment/metadata-manager.d.ts +114 -0
  70. package/dist/core/increment/metadata-manager.d.ts.map +1 -0
  71. package/dist/core/increment/metadata-manager.js +320 -0
  72. package/dist/core/increment/metadata-manager.js.map +1 -0
  73. package/dist/core/increment/status-commands.d.ts +43 -0
  74. package/dist/core/increment/status-commands.d.ts.map +1 -0
  75. package/dist/core/increment/status-commands.js +277 -0
  76. package/dist/core/increment/status-commands.js.map +1 -0
  77. package/dist/core/plugin-detector.d.ts +1 -0
  78. package/dist/core/plugin-detector.d.ts.map +1 -1
  79. package/dist/core/plugin-detector.js +25 -0
  80. package/dist/core/plugin-detector.js.map +1 -1
  81. package/dist/core/qa/qa-runner.d.ts +16 -0
  82. package/dist/core/qa/qa-runner.d.ts.map +1 -0
  83. package/dist/core/qa/qa-runner.js +404 -0
  84. package/dist/core/qa/qa-runner.js.map +1 -0
  85. package/dist/core/qa/quality-gate-decider.d.ts +53 -0
  86. package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
  87. package/dist/core/qa/quality-gate-decider.js +268 -0
  88. package/dist/core/qa/quality-gate-decider.js.map +1 -0
  89. package/dist/core/qa/risk-calculator.d.ts +126 -0
  90. package/dist/core/qa/risk-calculator.d.ts.map +1 -0
  91. package/dist/core/qa/risk-calculator.js +247 -0
  92. package/dist/core/qa/risk-calculator.js.map +1 -0
  93. package/dist/core/qa/types.d.ts +315 -0
  94. package/dist/core/qa/types.d.ts.map +1 -0
  95. package/dist/core/qa/types.js +8 -0
  96. package/dist/core/qa/types.js.map +1 -0
  97. package/dist/core/types/config.d.ts +37 -2
  98. package/dist/core/types/config.d.ts.map +1 -1
  99. package/dist/core/types/config.js +16 -0
  100. package/dist/core/types/config.js.map +1 -1
  101. package/dist/core/types/increment-metadata.d.ts +120 -0
  102. package/dist/core/types/increment-metadata.d.ts.map +1 -0
  103. package/dist/core/types/increment-metadata.js +138 -0
  104. package/dist/core/types/increment-metadata.js.map +1 -0
  105. package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
  106. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  107. package/dist/hooks/lib/invoke-translator-skill.js +201 -0
  108. package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
  109. package/dist/hooks/lib/translate-file.d.ts +59 -0
  110. package/dist/hooks/lib/translate-file.d.ts.map +1 -0
  111. package/dist/hooks/lib/translate-file.js +350 -0
  112. package/dist/hooks/lib/translate-file.js.map +1 -0
  113. package/dist/locales/en/cli.json +3 -1
  114. package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
  115. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  116. package/dist/metrics/calculators/change-failure-rate.js +70 -0
  117. package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
  118. package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
  119. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  120. package/dist/metrics/calculators/deployment-frequency.js +61 -0
  121. package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
  122. package/dist/metrics/calculators/lead-time.d.ts +22 -0
  123. package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
  124. package/dist/metrics/calculators/lead-time.js +82 -0
  125. package/dist/metrics/calculators/lead-time.js.map +1 -0
  126. package/dist/metrics/calculators/mttr.d.ts +21 -0
  127. package/dist/metrics/calculators/mttr.d.ts.map +1 -0
  128. package/dist/metrics/calculators/mttr.js +60 -0
  129. package/dist/metrics/calculators/mttr.js.map +1 -0
  130. package/dist/metrics/dora-calculator.d.ts +24 -0
  131. package/dist/metrics/dora-calculator.d.ts.map +1 -0
  132. package/dist/metrics/dora-calculator.js +104 -0
  133. package/dist/metrics/dora-calculator.js.map +1 -0
  134. package/dist/metrics/github-client.d.ts +51 -0
  135. package/dist/metrics/github-client.d.ts.map +1 -0
  136. package/dist/metrics/github-client.js +133 -0
  137. package/dist/metrics/github-client.js.map +1 -0
  138. package/dist/metrics/types.d.ts +112 -0
  139. package/dist/metrics/types.d.ts.map +1 -0
  140. package/dist/metrics/types.js +10 -0
  141. package/dist/metrics/types.js.map +1 -0
  142. package/dist/metrics/utils/percentile.d.ts +25 -0
  143. package/dist/metrics/utils/percentile.d.ts.map +1 -0
  144. package/dist/metrics/utils/percentile.js +46 -0
  145. package/dist/metrics/utils/percentile.js.map +1 -0
  146. package/dist/metrics/utils/tier-classifier.d.ts +61 -0
  147. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
  148. package/dist/metrics/utils/tier-classifier.js +100 -0
  149. package/dist/metrics/utils/tier-classifier.js.map +1 -0
  150. package/dist/utils/auth-helpers.d.ts +58 -0
  151. package/dist/utils/auth-helpers.d.ts.map +1 -0
  152. package/dist/utils/auth-helpers.js +108 -0
  153. package/dist/utils/auth-helpers.js.map +1 -0
  154. package/dist/utils/env-file.d.ts +88 -0
  155. package/dist/utils/env-file.d.ts.map +1 -0
  156. package/dist/utils/env-file.js +180 -0
  157. package/dist/utils/env-file.js.map +1 -0
  158. package/dist/utils/plugin-detection.d.ts +50 -0
  159. package/dist/utils/plugin-detection.d.ts.map +1 -0
  160. package/dist/utils/plugin-detection.js +229 -0
  161. package/dist/utils/plugin-detection.js.map +1 -0
  162. package/dist/utils/secrets-loader.d.ts +88 -0
  163. package/dist/utils/secrets-loader.d.ts.map +1 -0
  164. package/dist/utils/secrets-loader.js +271 -0
  165. package/dist/utils/secrets-loader.js.map +1 -0
  166. package/dist/utils/translation.d.ts +187 -0
  167. package/dist/utils/translation.d.ts.map +1 -0
  168. package/dist/utils/translation.js +414 -0
  169. package/dist/utils/translation.js.map +1 -0
  170. package/package.json +28 -44
  171. package/plugins/specweave/.claude-plugin/plugin.json +3 -3
  172. package/plugins/specweave/agents/pm/AGENT.md +330 -54
  173. package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
  174. package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
  175. package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
  176. package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
  177. package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
  178. package/plugins/specweave/commands/README.md +88 -163
  179. package/plugins/specweave/commands/specweave-abandon.md +314 -0
  180. package/plugins/specweave/commands/specweave-check-tests.md +546 -0
  181. package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -5
  182. package/plugins/specweave/commands/{done.md → specweave-done.md} +2 -0
  183. package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
  184. package/plugins/specweave/commands/specweave-pause.md +189 -0
  185. package/plugins/specweave/commands/specweave-qa.md +245 -0
  186. package/plugins/specweave/commands/specweave-resume.md +216 -0
  187. package/plugins/specweave/commands/specweave-status.md +397 -0
  188. package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
  189. package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
  190. package/plugins/specweave/commands/specweave-update-scope.md +351 -0
  191. package/plugins/specweave/commands/{validate.md → specweave-validate.md} +2 -0
  192. package/plugins/specweave/commands/specweave.md +21 -21
  193. package/plugins/specweave/hooks/docs-changed.sh +23 -3
  194. package/plugins/specweave/hooks/human-input-required.sh +23 -3
  195. package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
  196. package/plugins/specweave/hooks/post-task-completion.sh +161 -1
  197. package/plugins/specweave/hooks/pre-implementation.sh +23 -3
  198. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  199. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
  200. package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
  201. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
  202. package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
  203. package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
  204. package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
  205. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  206. package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
  207. package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
  208. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
  209. package/plugins/specweave-ado/commands/close-workitem.md +52 -0
  210. package/plugins/specweave-ado/commands/create-workitem.md +53 -0
  211. package/plugins/specweave-ado/commands/status.md +53 -0
  212. package/plugins/specweave-ado/commands/sync.md +55 -0
  213. package/plugins/specweave-ado/lib/ado-client.ts +361 -0
  214. package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
  215. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
  216. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
  217. package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
  218. package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
  219. package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
  220. package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
  221. package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
  222. package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
  223. package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
  224. package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
  225. package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
  226. package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
  227. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
  228. package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
  229. package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
  230. package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
  231. package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
  232. package/plugins/specweave-ml/commands/ml-explain.md +1 -1
  233. package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
  234. package/src/templates/AGENTS.md.template +652 -1
  235. package/src/templates/CLAUDE.md.template +36 -21
  236. package/src/templates/COMPLETION-REPORT.template.md +128 -0
  237. package/src/templates/README.md.template +17 -16
  238. package/src/templates/docs/README.md +11 -9
  239. package/src/templates/docs/spec-template.md +229 -0
  240. package/dist/adapters/copilot/adapter.d.ts +0 -86
  241. package/dist/adapters/copilot/adapter.d.ts.map +0 -1
  242. package/dist/adapters/copilot/adapter.js +0 -396
  243. package/dist/adapters/copilot/adapter.js.map +0 -1
  244. package/plugins/.specweave/logs/hooks-debug.log +0 -24
  245. package/plugins/.specweave/logs/last-hook-fire +0 -1
  246. package/plugins/.specweave/logs/last-todowrite-time +0 -1
  247. package/plugins/.specweave/logs/tasks.log +0 -6
  248. package/plugins/specweave/commands/inc.md +0 -85
  249. package/plugins/specweave/commands/list-increments.md +0 -180
  250. package/src/adapters/README.md +0 -311
  251. package/src/adapters/adapter-base.ts +0 -182
  252. package/src/adapters/adapter-interface.ts +0 -166
  253. package/src/adapters/adapter-loader.ts +0 -259
  254. package/src/adapters/agents-md-generator.ts +0 -228
  255. package/src/adapters/claude/README.md +0 -233
  256. package/src/adapters/claude/adapter.ts +0 -468
  257. package/src/adapters/claude-md-generator.ts +0 -377
  258. package/src/adapters/codex/README.md +0 -105
  259. package/src/adapters/codex/adapter.ts +0 -333
  260. package/src/adapters/copilot/README.md +0 -240
  261. package/src/adapters/copilot/adapter.ts +0 -444
  262. package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
  263. package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
  264. package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
  265. package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
  266. package/src/adapters/cursor/README.md +0 -283
  267. package/src/adapters/cursor/adapter.ts +0 -451
  268. package/src/adapters/doc-generator.ts +0 -331
  269. package/src/adapters/gemini/README.md +0 -97
  270. package/src/adapters/gemini/adapter.ts +0 -298
  271. package/src/adapters/generic/README.md +0 -277
  272. package/src/adapters/generic/adapter.ts +0 -359
  273. package/src/adapters/registry.yaml +0 -187
  274. /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
  275. /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
  276. /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
  277. /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
  278. /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
  279. /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
  280. /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
  281. /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
@@ -1,298 +0,0 @@
1
- /**
2
- * Gemini CLI Adapter
3
- *
4
- * Semi-automation adapter for Google Gemini CLI.
5
- * Uses universal AGENTS.md file for instructions.
6
- *
7
- * Gemini CLI features:
8
- * - Open-source AI agent (Apache 2.0)
9
- * - 1M token context window
10
- * - ReAct loop with built-in tools
11
- * - MCP (Model Context Protocol) support
12
- * - Agent mode for multi-file tasks
13
- */
14
-
15
- import * as path from 'path';
16
- import fs from 'fs-extra';
17
- import { AdapterBase } from '../adapter-base.js';
18
- import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
19
- import { AgentsMdGenerator } from '../agents-md-generator.js';
20
- import { getDirname } from '../../utils/esm-helpers.js';
21
-
22
- const __dirname = getDirname(import.meta.url);
23
-
24
- export class GeminiAdapter extends AdapterBase {
25
- name = 'gemini';
26
- description = 'Gemini CLI adapter - Semi-automation with AGENTS.md and agent mode';
27
- automationLevel = 'semi' as const;
28
-
29
- /**
30
- * Detect if Gemini CLI is available
31
- *
32
- * Checks for:
33
- * - gemini command in PATH
34
- * - .gemini/ directory exists
35
- * - AGENTS.md file exists (previously configured)
36
- */
37
- async detect(): Promise<boolean> {
38
- const hasGeminiCLI = await this.commandExists('gemini');
39
- const hasGeminiDir = await this.fileExists('.gemini');
40
- const hasAgentsMd = await this.fileExists('AGENTS.md');
41
-
42
- return hasGeminiCLI || hasGeminiDir || hasAgentsMd;
43
- }
44
-
45
- /**
46
- * Get files to install for Gemini adapter
47
- */
48
- getFiles(): AdapterFile[] {
49
- return [
50
- {
51
- sourcePath: 'AGENTS.md',
52
- targetPath: 'AGENTS.md',
53
- description: 'Universal SpecWeave instructions (works with all AI tools)'
54
- },
55
- {
56
- sourcePath: 'README.md',
57
- targetPath: '.gemini/README.md',
58
- description: 'Gemini adapter documentation'
59
- }
60
- ];
61
- }
62
-
63
- /**
64
- * Install Gemini adapter
65
- */
66
- async install(options: AdapterOptions): Promise<void> {
67
- console.log('\n📦 Installing Gemini CLI Adapter (Semi-Automation)\n');
68
-
69
- // Ensure .gemini directory exists
70
- const geminiDir = path.join(options.projectPath, '.gemini');
71
- await fs.ensureDir(geminiDir);
72
-
73
- // Generate AGENTS.md
74
- const agentsMdPath = path.join(options.projectPath, 'AGENTS.md');
75
- await this.generateAgentsMd(agentsMdPath, options);
76
-
77
- // Copy README
78
- const readmePath = path.join(__dirname, 'README.md');
79
- if (await fs.pathExists(readmePath)) {
80
- await fs.copy(readmePath, path.join(geminiDir, 'README.md'));
81
- }
82
-
83
- console.log('\n✨ Gemini adapter installed!');
84
- console.log('\n📋 Files created:');
85
- console.log(' - AGENTS.md (universal instructions)');
86
- console.log(' - .gemini/README.md (adapter documentation)');
87
- }
88
-
89
- /**
90
- * Generate AGENTS.md file
91
- */
92
- private async generateAgentsMd(targetPath: string, options: AdapterOptions): Promise<void> {
93
- const generator = new AgentsMdGenerator(
94
- path.join(__dirname, '../../skills'),
95
- path.join(__dirname, '../../agents'),
96
- path.join(__dirname, '../../commands')
97
- );
98
-
99
- const content = await generator.generate({
100
- projectName: options.projectName,
101
- projectPath: options.projectPath
102
- });
103
-
104
- await fs.writeFile(targetPath, content);
105
- console.log(' ✅ AGENTS.md - Universal SpecWeave instructions');
106
- }
107
-
108
- /**
109
- * Post-installation instructions
110
- */
111
- async postInstall(options: AdapterOptions): Promise<void> {
112
- console.log(this.getInstructions());
113
- }
114
-
115
- /**
116
- * Get usage instructions for Gemini adapter
117
- */
118
- getInstructions(): string {
119
- return `
120
- ================================================================
121
- Gemini CLI Adapter - Semi-Automation
122
- ================================================================
123
-
124
- Your project is now configured for Gemini CLI with SEMI-automation!
125
-
126
- WHAT THIS PROVIDES:
127
-
128
- - AGENTS.md (Universal Instructions)
129
- - Works with Gemini CLI AND other tools
130
- - Auto-generated from actual skills/agents
131
- - SpecWeave structure and workflows
132
- - 1M token context window support
133
-
134
- - Agent Mode Integration
135
- - Multi-file task handling
136
- - ReAct loop with built-in tools
137
- - MCP support for extensibility
138
-
139
- QUICK START:
140
-
141
- 1. Install Gemini CLI (if not already installed):
142
-
143
- npm install -g @google-cloud/gemini-cli
144
-
145
- 2. Authenticate:
146
-
147
- gemini auth
148
-
149
- 3. Create your first feature:
150
-
151
- gemini "Read AGENTS.md and create increment for user authentication"
152
-
153
- Gemini will:
154
- - Read AGENTS.md for SpecWeave context
155
- - Adopt PM role: Create spec.md (WHAT/WHY)
156
- - Adopt Architect role: Create plan.md (HOW)
157
- - Create tasks.md
158
- - Use agent mode for multi-file operations
159
-
160
- 4. Continue development:
161
-
162
- gemini "Implement task T001 from increment 0001"
163
- gemini "Run tests for increment 0001"
164
- gemini "Review and fix any issues"
165
-
166
- HOW TO USE:
167
-
168
- Gemini CLI reads AGENTS.md automatically when you reference it:
169
-
170
- \`\`\`bash
171
- # Explicit reference (recommended):
172
- gemini "Read AGENTS.md and [your request]"
173
-
174
- # Natural language:
175
- gemini "Create a new feature following SpecWeave structure"
176
-
177
- # With context:
178
- gemini "Following the PM role in AGENTS.md, create requirements for payments"
179
- \`\`\`
180
-
181
- CONTEXT LOADING (70%+ Token Savings):
182
-
183
- CRITICAL: Tell Gemini to read context-manifest.yaml first!
184
-
185
- \`\`\`bash
186
- gemini "Read context-manifest.yaml from increment 0001, load only those files, then implement task T001"
187
- \`\`\`
188
-
189
- **Why this matters**:
190
- - Gemini has 1M token context window
191
- - But loading everything wastes tokens
192
- - Context manifests = precise, efficient loading
193
-
194
- FEATURES:
195
-
196
- ✅ 1M Token Context Window
197
- - Can handle large specifications
198
- - Read entire codebase if needed
199
-
200
- ✅ Agent Mode
201
- - Multi-file task completion
202
- - Automatic planning and execution
203
- - Interactive approval before changes
204
-
205
- ✅ Built-in Tools
206
- - File operations
207
- - Shell commands
208
- - Google Search grounding
209
- - Web fetching
210
-
211
- ✅ MCP Support
212
- - Extend with custom integrations
213
- - Local or remote MCP servers
214
-
215
- ✅ Free Tier
216
- - Gemini 2.5 Pro included
217
- - 60 requests/minute
218
- - 1,000 requests/day
219
-
220
- EXAMPLE WORKFLOWS:
221
-
222
- 1. **Create Feature**:
223
- \`\`\`bash
224
- gemini "Read AGENTS.md. Create increment 0002 for payment processing with Stripe. Follow SpecWeave structure: spec.md (PM role), plan.md (Architect role), tasks.md"
225
- \`\`\`
226
-
227
- 2. **Implement Task**:
228
- \`\`\`bash
229
- gemini "Read increment 0002, implement task T001 (Setup Stripe SDK)"
230
- \`\`\`
231
-
232
- 3. **Fix Bug**:
233
- \`\`\`bash
234
- gemini "Read AGENTS.md and increment 0001. Fix authentication bug in login endpoint. Update tests."
235
- \`\`\`
236
-
237
- 4. **Review Code**:
238
- \`\`\`bash
239
- gemini "Adopt Tech Lead role from AGENTS.md. Review code in src/auth/ and provide feedback"
240
- \`\`\`
241
-
242
- TIPS & TRICKS:
243
-
244
- 1. **Always Reference AGENTS.md**
245
- - Ensures Gemini understands SpecWeave structure
246
- - Provides role definitions (PM, Architect, etc.)
247
-
248
- 2. **Use Agent Mode**
249
- - For complex, multi-file tasks
250
- - Gemini proposes plan before execution
251
- - You approve changes
252
-
253
- 3. **Leverage 1M Context Window**
254
- - Can load large specs
255
- - But still use context manifests for efficiency
256
-
257
- 4. **MCP Integration**
258
- - Connect to your tools (JIRA, GitHub, etc.)
259
- - See: https://modelcontextprotocol.io/
260
-
261
- 5. **Check Gemini Documentation**
262
- - \`gemini --help\`
263
- - https://developers.google.com/gemini-code-assist/docs/gemini-cli
264
-
265
- COMPARISON:
266
-
267
- | Feature | Claude Code | Gemini CLI |
268
- |---------|-------------|------------|
269
- | **Automation** | Full | Semi |
270
- | **Skills** | Native | Via AGENTS.md |
271
- | **Agents** | Native | Via AGENTS.md |
272
- | **Context Window** | 200k | 1M (5x larger!) |
273
- | **Cost** | Paid | Free tier available |
274
- | **Open Source** | No | Yes (Apache 2.0) |
275
-
276
- LIMITATIONS:
277
-
278
- - No native skills/agents (manual role adoption via AGENTS.md)
279
- - No hooks (can't auto-update docs on events)
280
- - Requires explicit instruction referencing
281
- - CLI-only (no IDE integration yet)
282
-
283
- But still VERY powerful with 1M context and agent mode!
284
-
285
- DOCUMENTATION:
286
-
287
- - AGENTS.md: Universal SpecWeave instructions (READ THIS!)
288
- - SPECWEAVE.md: Complete framework documentation
289
- - .gemini/README.md: Gemini adapter guide
290
- - https://developers.google.com/gemini-code-assist/docs/gemini-cli
291
-
292
- You're ready to build with SpecWeave on Gemini CLI!
293
-
294
- Pro tip: Leverage the 1M token context window for large specifications,
295
- but always use context manifests for efficiency!
296
- `;
297
- }
298
- }
@@ -1,277 +0,0 @@
1
- # Generic Adapter
2
-
3
- **Automation Level**: Manual (Works with literally ANY AI tool)
4
-
5
- ## Overview
6
-
7
- The Generic adapter provides a **manual workflow** for SpecWeave that works with **100% of AI tools** - ChatGPT web, Claude web, Gemini, Perplexity, You.com, or any AI that can read text and follow instructions.
8
-
9
- ## Key Value: Universal Compatibility
10
-
11
- **The Problem**:
12
- - Claude Code adapter: Only works with Claude Code (~10% market)
13
- - Cursor adapter: Only works with Cursor (~30% market)
14
- - Copilot adapter: Only works with VS Code + Copilot (~40% market)
15
- - **Combined: Still missing ~20% of developers!**
16
-
17
- **The Solution**:
18
- - Generic adapter: Works with **EVERYTHING** (100% market coverage)
19
- - ChatGPT web? ✅
20
- - Claude web? ✅
21
- - Gemini? ✅
22
- - Any other AI? ✅
23
-
24
- ## What This Adapter Provides
25
-
26
- ### SPECWEAVE-MANUAL.md (Complete Step-by-Step Guide)
27
- - **Step 1**: Create increment folder (terminal command)
28
- - **Step 2**: Create spec.md (copy template → paste to AI → save response)
29
- - **Step 3**: Create plan.md (copy template → paste to AI → save response)
30
- - **Step 4**: Create tasks.md (copy template → paste to AI → save response)
31
- - **Step 5**: Create context-manifest.yaml (fill manually)
32
-
33
- **Total time**: 30-60 minutes per feature (vs 30 seconds with Claude Code)
34
-
35
- ### Trade-Off: Speed vs Compatibility
36
-
37
- | Adapter | Speed | Compatibility | Automation |
38
- |---------|-------|---------------|------------|
39
- | **Claude Code** | ⚡⚡⚡⚡⚡ (30s) | Claude only (~10%) | Full |
40
- | **Cursor** | ⚡⚡⚡⚡ (5min) | Cursor only (~30%) | Semi |
41
- | **Copilot** | ⚡⚡⚡ (15min) | VS Code+Copilot (~40%) | Basic |
42
- | **Generic** | ⚡ (30-60min) | **100% (ANY AI!)** | Manual |
43
-
44
- **Generic = Slowest, but works with EVERYTHING!**
45
-
46
- ## Understanding "Manual" Workflow
47
-
48
- **Manual ≠ Hard, Manual = YOU Orchestrate Each Step**
49
-
50
- **Example workflow**:
51
- 1. **You**: Open SPECWEAVE-MANUAL.md, read Step 2 (Create spec.md)
52
- 2. **You**: Copy template prompt from manual
53
- 3. **You**: Paste to ChatGPT (or any AI)
54
- 4. **AI**: Generates spec.md content following SpecWeave patterns
55
- 5. **You**: Copy AI's response
56
- 6. **You**: Save to `spec.md` file manually
57
- 7. **Repeat for plan.md, tasks.md, etc.**
58
-
59
- **Result**: Same quality as automated adapters, just more manual steps!
60
-
61
- ## Installation
62
-
63
- ```bash
64
- # Install SpecWeave with Generic adapter
65
- npx specweave init my-project --adapter generic
66
-
67
- # Files created:
68
- # SPECWEAVE-MANUAL.md (complete step-by-step guide)
69
- ```
70
-
71
- ## Directory Structure
72
-
73
- ```
74
- SPECWEAVE-MANUAL.md # Main manual workflow guide (read this!)
75
- .specweave/
76
- └── adapters/
77
- └── generic/
78
- └── README.md # This file
79
- ```
80
-
81
- ## Usage Example (Creating Authentication Feature)
82
-
83
- ### Complete Workflow (30-60 minutes)
84
-
85
- **Step 1** (Terminal - 1 minute):
86
- ```bash
87
- mkdir -p .specweave/increments/0001-user-authentication
88
- cd .specweave/increments/0001-user-authentication
89
- ```
90
-
91
- **Step 2** (Create spec.md - 10 minutes):
92
- 1. Open SPECWEAVE-MANUAL.md
93
- 2. Find "Step 2: Create spec.md"
94
- 3. Copy entire prompt template
95
- 4. Paste to ChatGPT/Claude/Gemini
96
- 5. Fill in your requirements: "Email/password auth, Google OAuth, JWT tokens..."
97
- 6. AI generates complete spec.md
98
- 7. Copy response → Save to `spec.md`
99
-
100
- **Step 3** (Create plan.md - 15 minutes):
101
- 1. Copy plan.md template from manual
102
- 2. Paste to AI along with spec.md content
103
- 3. AI generates technical plan
104
- 4. Copy response → Save to `plan.md`
105
-
106
- **Step 4** (Create tasks.md - 10 minutes):
107
- 1. Copy tasks.md template from manual
108
- 2. Paste to AI along with plan.md content
109
- 3. AI generates implementation checklist
110
- 4. Copy response → Save to `tasks.md`
111
-
112
- **Step 5** (Create context-manifest.yaml - 5 minutes):
113
- 1. Manually create file
114
- 2. List only relevant docs (auth specs, auth architecture)
115
- 3. Save
116
-
117
- **Total**: 41 minutes (vs 30 seconds with Claude Code automation!)
118
-
119
- ## Simulating Skills Manually
120
-
121
- ### What are Skills?
122
-
123
- **In Claude Code**: Auto-activating capabilities
124
- **In Generic**: YOU follow skill workflows manually
125
-
126
- ### Example: increment-planner Skill
127
-
128
- **Claude Code (automatic)**:
129
- ```
130
- User: "create increment for auth"
131
- → increment-planner skill auto-activates
132
- → Creates spec, plan, tasks in 30 seconds
133
- ```
134
-
135
- **Generic (manual)**:
136
- ```
137
- You: Read SPECWEAVE-MANUAL.md
138
- You: Follow Step 1 (create folder - 1 min)
139
- You: Follow Step 2 (create spec.md with AI - 10 min)
140
- You: Follow Step 3 (create plan.md with AI - 15 min)
141
- You: Follow Step 4 (create tasks.md with AI - 10 min)
142
- You: Follow Step 5 (create manifest - 5 min)
143
- Total: 41 minutes
144
- ```
145
-
146
- You manually execute the entire workflow!
147
-
148
- ## Simulating Agents Manually
149
-
150
- ### What are Agents?
151
-
152
- **In Claude Code**: Specialized roles with separate context windows
153
- **In Generic**: YOU tell AI which role to adopt
154
-
155
- ### Example: PM Agent
156
-
157
- **Claude Code (automatic)**:
158
- ```typescript
159
- Task({ subagent_type: "pm", prompt: "create spec" })
160
- → PM agent creates spec.md
161
- ```
162
-
163
- **Generic (manual)**:
164
- ```
165
- You paste to ChatGPT:
166
- "Act as Product Manager and create spec.md.
167
-
168
- As PM, focus on:
169
- - WHAT and WHY (not HOW)
170
- - Technology-agnostic requirements
171
- - User stories with acceptance criteria
172
-
173
- Requirements: [your requirements]"
174
- ```
175
-
176
- The AI adopts PM perspective and creates spec.md!
177
-
178
- ### All Roles You Can Simulate
179
-
180
- | Role | Prompt Template | Focus |
181
- |------|----------------|-------|
182
- | **PM** | "Act as PM and create spec" | WHAT/WHY, user stories |
183
- | **Architect** | "Act as Architect and create plan" | HOW, technical design |
184
- | **DevOps** | "Act as DevOps and create infrastructure" | Deployment, monitoring |
185
- | **QA Lead** | "Act as QA and create test strategy" | Test coverage, cases |
186
- | **Security** | "Act as Security and review" | Threats, vulnerabilities |
187
-
188
- ## Comparison with Other Adapters
189
-
190
- | Feature | Claude Code | Cursor | Copilot | Generic |
191
- |---------|-------------|--------|---------|---------|
192
- | **Automation** | Full | Semi | Basic | Manual |
193
- | **Skills** | Native | Simulated | N/A | Manual (follow guide) |
194
- | **Agents** | Native | Manual roles | N/A | Manual (tell AI role) |
195
- | **Context** | Auto-load | @ shortcuts | Instructions | Manual (copy files) |
196
- | **Speed** | ⚡⚡⚡⚡⚡ | ⚡⚡⚡⚡ | ⚡⚡⚡ | ⚡ |
197
- | **Compatibility** | 10% | 30% | 40% | **100%** |
198
-
199
- **Generic = Slowest but most compatible!**
200
-
201
- ## When to Use This Adapter
202
-
203
- ✅ **Use Generic adapter if**:
204
- - You use ChatGPT web, Claude web, Gemini, or other non-IDE AI
205
- - You don't have Claude Code, Cursor, or VS Code
206
- - You want maximum tool flexibility
207
- - Simple projects (1-5 increments)
208
- - Learning SpecWeave methodology
209
-
210
- ⚠️ **Consider alternatives if**:
211
- - You have Claude Code → Use Claude adapter (10-20x faster)
212
- - You have Cursor → Use Cursor adapter (5-10x faster)
213
- - You have VS Code+Copilot → Use Copilot adapter (2-3x faster)
214
- - Large projects (10+ increments) → Manual becomes tedious
215
-
216
- ## Context Manifests (70%+ Token Savings)
217
-
218
- **Same benefit as automated adapters!**
219
-
220
- ### The Problem
221
- - Your specs might be 500+ pages
222
- - Loading all = 50k tokens
223
- - ChatGPT/Claude have token limits
224
-
225
- ### The Solution
226
- - context-manifest.yaml lists ONLY relevant files
227
- - Load only 50 pages = 5k tokens
228
- - **Savings: 90%!**
229
-
230
- ### How to Use with Your AI
231
-
232
- When implementing auth feature:
233
- 1. Open `.specweave/increments/0001-auth/context-manifest.yaml`
234
- 2. See relevant files listed:
235
- ```yaml
236
- spec_sections:
237
- - .specweave/docs/internal/strategy/auth/spec.md
238
- documentation:
239
- - .specweave/docs/internal/architecture/auth/design.md
240
- ```
241
- 3. ONLY copy those 2 files to AI (not entire docs/ folder!)
242
- 4. AI has relevant context without token waste
243
-
244
- **Result**: Same 70%+ token savings as automated adapters!
245
-
246
- ## Tips for Success
247
-
248
- ### 1. Follow SPECWEAVE-MANUAL.md Exactly
249
- Templates are tested and proven → Use as-is
250
-
251
- ### 2. Use Context Manifests Always
252
- Don't paste 500 pages → Use manifests (list 50 pages only)
253
-
254
- ### 3. Tell AI Which Role to Adopt
255
- "Act as PM" or "Act as Architect" → Better results
256
-
257
- ### 4. Save AI Responses Immediately
258
- Don't lose generated content → Copy and save right away
259
-
260
- ### 5. Iterate if Needed
261
- First pass not perfect? Ask AI to refine/improve
262
-
263
- ## Related Documentation
264
-
265
- - [SPECWEAVE-MANUAL.md](SPECWEAVE-MANUAL.md) - **Read this first!** Complete step-by-step guide
266
- - [SPECWEAVE.md](../../SPECWEAVE.md) - Complete technical documentation
267
- - [Adapter Architecture](../README.md) - Multi-tool design philosophy
268
-
269
- ---
270
-
271
- **Status**: Active (v0.2.0-beta.1+)
272
- **Market Share**: ~20% (users without IDE-integrated AI)
273
- **Priority**: P1 (ensures 100% market coverage)
274
-
275
- ---
276
-
277
- **Remember**: Manual = Slower, but works with ANY AI tool! 🌍