specweave 0.6.8 → 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.
- package/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +903 -99
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/cli/commands/abandon.d.ts +13 -0
- package/dist/cli/commands/abandon.d.ts.map +1 -0
- package/dist/cli/commands/abandon.js +15 -0
- package/dist/cli/commands/abandon.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +90 -18
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/pause.d.ts +13 -0
- package/dist/cli/commands/pause.d.ts.map +1 -0
- package/dist/cli/commands/pause.js +15 -0
- package/dist/cli/commands/pause.js.map +1 -0
- package/dist/cli/commands/qa.d.ts +54 -0
- package/dist/cli/commands/qa.d.ts.map +1 -0
- package/dist/cli/commands/qa.js +98 -0
- package/dist/cli/commands/qa.js.map +1 -0
- package/dist/cli/commands/resume.d.ts +12 -0
- package/dist/cli/commands/resume.d.ts.map +1 -0
- package/dist/cli/commands/resume.js +14 -0
- package/dist/cli/commands/resume.js.map +1 -0
- package/dist/cli/commands/status.d.ts +12 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +23 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
- package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/ado.js +223 -0
- package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
- package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/github.js +284 -0
- package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
- package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/index.js +270 -0
- package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
- package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/jira.js +265 -0
- package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
- package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/types.js +16 -0
- package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
- package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
- package/dist/cli/helpers/issue-tracker/utils.js +240 -0
- package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
- package/dist/core/increment/limits.d.ts +68 -0
- package/dist/core/increment/limits.d.ts.map +1 -0
- package/dist/core/increment/limits.js +224 -0
- package/dist/core/increment/limits.js.map +1 -0
- package/dist/core/increment/metadata-manager.d.ts +114 -0
- package/dist/core/increment/metadata-manager.d.ts.map +1 -0
- package/dist/core/increment/metadata-manager.js +320 -0
- package/dist/core/increment/metadata-manager.js.map +1 -0
- package/dist/core/increment/status-commands.d.ts +43 -0
- package/dist/core/increment/status-commands.d.ts.map +1 -0
- package/dist/core/increment/status-commands.js +277 -0
- package/dist/core/increment/status-commands.js.map +1 -0
- package/dist/core/plugin-detector.d.ts +1 -0
- package/dist/core/plugin-detector.d.ts.map +1 -1
- package/dist/core/plugin-detector.js +25 -0
- package/dist/core/plugin-detector.js.map +1 -1
- package/dist/core/qa/qa-runner.d.ts +16 -0
- package/dist/core/qa/qa-runner.d.ts.map +1 -0
- package/dist/core/qa/qa-runner.js +404 -0
- package/dist/core/qa/qa-runner.js.map +1 -0
- package/dist/core/qa/quality-gate-decider.d.ts +53 -0
- package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
- package/dist/core/qa/quality-gate-decider.js +268 -0
- package/dist/core/qa/quality-gate-decider.js.map +1 -0
- package/dist/core/qa/risk-calculator.d.ts +126 -0
- package/dist/core/qa/risk-calculator.d.ts.map +1 -0
- package/dist/core/qa/risk-calculator.js +247 -0
- package/dist/core/qa/risk-calculator.js.map +1 -0
- package/dist/core/qa/types.d.ts +315 -0
- package/dist/core/qa/types.d.ts.map +1 -0
- package/dist/core/qa/types.js +8 -0
- package/dist/core/qa/types.js.map +1 -0
- package/dist/core/types/config.d.ts +35 -0
- package/dist/core/types/config.d.ts.map +1 -1
- package/dist/core/types/config.js +16 -0
- package/dist/core/types/config.js.map +1 -1
- package/dist/core/types/increment-metadata.d.ts +120 -0
- package/dist/core/types/increment-metadata.d.ts.map +1 -0
- package/dist/core/types/increment-metadata.js +138 -0
- package/dist/core/types/increment-metadata.js.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
- package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
- package/dist/hooks/lib/invoke-translator-skill.js +201 -0
- package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
- package/dist/hooks/lib/translate-file.d.ts +59 -0
- package/dist/hooks/lib/translate-file.d.ts.map +1 -0
- package/dist/hooks/lib/translate-file.js +350 -0
- package/dist/hooks/lib/translate-file.js.map +1 -0
- package/dist/locales/en/cli.json +3 -1
- package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
- package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
- package/dist/metrics/calculators/change-failure-rate.js +70 -0
- package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
- package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
- package/dist/metrics/calculators/deployment-frequency.js +61 -0
- package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
- package/dist/metrics/calculators/lead-time.d.ts +22 -0
- package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
- package/dist/metrics/calculators/lead-time.js +82 -0
- package/dist/metrics/calculators/lead-time.js.map +1 -0
- package/dist/metrics/calculators/mttr.d.ts +21 -0
- package/dist/metrics/calculators/mttr.d.ts.map +1 -0
- package/dist/metrics/calculators/mttr.js +60 -0
- package/dist/metrics/calculators/mttr.js.map +1 -0
- package/dist/metrics/dora-calculator.d.ts +24 -0
- package/dist/metrics/dora-calculator.d.ts.map +1 -0
- package/dist/metrics/dora-calculator.js +104 -0
- package/dist/metrics/dora-calculator.js.map +1 -0
- package/dist/metrics/github-client.d.ts +51 -0
- package/dist/metrics/github-client.d.ts.map +1 -0
- package/dist/metrics/github-client.js +133 -0
- package/dist/metrics/github-client.js.map +1 -0
- package/dist/metrics/types.d.ts +112 -0
- package/dist/metrics/types.d.ts.map +1 -0
- package/dist/metrics/types.js +10 -0
- package/dist/metrics/types.js.map +1 -0
- package/dist/metrics/utils/percentile.d.ts +25 -0
- package/dist/metrics/utils/percentile.d.ts.map +1 -0
- package/dist/metrics/utils/percentile.js +46 -0
- package/dist/metrics/utils/percentile.js.map +1 -0
- package/dist/metrics/utils/tier-classifier.d.ts +61 -0
- package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
- package/dist/metrics/utils/tier-classifier.js +100 -0
- package/dist/metrics/utils/tier-classifier.js.map +1 -0
- package/dist/utils/auth-helpers.d.ts +58 -0
- package/dist/utils/auth-helpers.d.ts.map +1 -0
- package/dist/utils/auth-helpers.js +108 -0
- package/dist/utils/auth-helpers.js.map +1 -0
- package/dist/utils/env-file.d.ts +88 -0
- package/dist/utils/env-file.d.ts.map +1 -0
- package/dist/utils/env-file.js +180 -0
- package/dist/utils/env-file.js.map +1 -0
- package/dist/utils/plugin-detection.d.ts +50 -0
- package/dist/utils/plugin-detection.d.ts.map +1 -0
- package/dist/utils/plugin-detection.js +229 -0
- package/dist/utils/plugin-detection.js.map +1 -0
- package/dist/utils/secrets-loader.d.ts +88 -0
- package/dist/utils/secrets-loader.d.ts.map +1 -0
- package/dist/utils/secrets-loader.js +271 -0
- package/dist/utils/secrets-loader.js.map +1 -0
- package/dist/utils/translation.d.ts +187 -0
- package/dist/utils/translation.d.ts.map +1 -0
- package/dist/utils/translation.js +414 -0
- package/dist/utils/translation.js.map +1 -0
- package/package.json +28 -44
- package/plugins/specweave/.claude-plugin/plugin.json +3 -3
- package/plugins/specweave/agents/pm/AGENT.md +330 -54
- package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
- package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
- package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
- package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
- package/plugins/specweave/commands/README.md +88 -163
- package/plugins/specweave/commands/specweave-abandon.md +314 -0
- package/plugins/specweave/commands/specweave-check-tests.md +546 -0
- package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
- package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
- package/plugins/specweave/commands/specweave-pause.md +189 -0
- package/plugins/specweave/commands/specweave-qa.md +245 -0
- package/plugins/specweave/commands/specweave-resume.md +216 -0
- package/plugins/specweave/commands/specweave-status.md +397 -0
- package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
- package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
- package/plugins/specweave/commands/specweave-update-scope.md +351 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +141 -0
- package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
- package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
- package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
- package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
- package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
- package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
- package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
- package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
- package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
- package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
- package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
- package/plugins/specweave-ado/commands/close-workitem.md +52 -0
- package/plugins/specweave-ado/commands/create-workitem.md +53 -0
- package/plugins/specweave-ado/commands/status.md +53 -0
- package/plugins/specweave-ado/commands/sync.md +55 -0
- package/plugins/specweave-ado/lib/ado-client.ts +361 -0
- package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
- package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
- package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
- package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
- package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
- package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
- package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
- package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
- package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
- package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
- package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
- package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
- package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
- package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
- package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
- package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
- package/plugins/specweave-ml/commands/ml-explain.md +1 -1
- package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
- package/src/templates/AGENTS.md.template +331 -31
- package/src/templates/CLAUDE.md.template +36 -21
- package/src/templates/COMPLETION-REPORT.template.md +128 -0
- package/src/templates/README.md.template +17 -16
- package/src/templates/docs/README.md +11 -9
- package/src/templates/docs/spec-template.md +229 -0
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -275
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -256
- package/src/adapters/agents-md-generator.ts +0 -228
- package/src/adapters/claude/README.md +0 -233
- package/src/adapters/claude/adapter.ts +0 -468
- package/src/adapters/claude-md-generator.ts +0 -377
- package/src/adapters/codex/README.md +0 -105
- package/src/adapters/codex/adapter.ts +0 -333
- package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
- package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
- package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
- package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
- package/src/adapters/cursor/README.md +0 -283
- package/src/adapters/cursor/adapter.ts +0 -451
- package/src/adapters/doc-generator.ts +0 -331
- package/src/adapters/gemini/README.md +0 -97
- package/src/adapters/gemini/adapter.ts +0 -298
- package/src/adapters/generic/README.md +0 -277
- package/src/adapters/generic/adapter.ts +0 -378
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
- /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
- /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
- /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
- /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
- /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
- /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
- /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
- /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
- /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!)
|