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