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.
- package/.claude-plugin/README.md +1 -1
- package/CLAUDE.md +920 -107
- package/README.md +143 -207
- package/bin/specweave.js +67 -0
- package/dist/adapters/adapter-interface.d.ts +11 -11
- package/dist/adapters/adapter-interface.d.ts.map +1 -1
- package/dist/adapters/adapter-interface.js +1 -1
- package/dist/adapters/adapter-loader.d.ts +1 -2
- package/dist/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/adapters/adapter-loader.js +3 -6
- package/dist/adapters/adapter-loader.js.map +1 -1
- package/dist/adapters/agents-md-generator.d.ts +3 -3
- package/dist/adapters/agents-md-generator.js +3 -3
- package/dist/adapters/generic/adapter.d.ts +2 -2
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +28 -9
- package/dist/adapters/generic/adapter.js.map +1 -1
- 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 +141 -40
- 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 +37 -2
- 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 -5
- package/plugins/specweave/commands/{done.md → specweave-done.md} +2 -0
- 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/{validate.md → specweave-validate.md} +2 -0
- package/plugins/specweave/commands/specweave.md +21 -21
- package/plugins/specweave/hooks/docs-changed.sh +23 -3
- package/plugins/specweave/hooks/human-input-required.sh +23 -3
- package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
- package/plugins/specweave/hooks/post-task-completion.sh +161 -1
- package/plugins/specweave/hooks/pre-implementation.sh +23 -3
- 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 +652 -1
- 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/dist/adapters/copilot/adapter.d.ts +0 -86
- package/dist/adapters/copilot/adapter.d.ts.map +0 -1
- package/dist/adapters/copilot/adapter.js +0 -396
- package/dist/adapters/copilot/adapter.js.map +0 -1
- package/plugins/.specweave/logs/hooks-debug.log +0 -24
- package/plugins/.specweave/logs/last-hook-fire +0 -1
- package/plugins/.specweave/logs/last-todowrite-time +0 -1
- package/plugins/.specweave/logs/tasks.log +0 -6
- package/plugins/specweave/commands/inc.md +0 -85
- package/plugins/specweave/commands/list-increments.md +0 -180
- package/src/adapters/README.md +0 -311
- package/src/adapters/adapter-base.ts +0 -182
- package/src/adapters/adapter-interface.ts +0 -166
- package/src/adapters/adapter-loader.ts +0 -259
- 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/copilot/README.md +0 -240
- package/src/adapters/copilot/adapter.ts +0 -444
- 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 -359
- package/src/adapters/registry.yaml +0 -187
- /package/plugins/specweave/commands/{costs.md → specweave-costs.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
|
@@ -1,444 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GitHub Copilot Adapter
|
|
3
|
-
*
|
|
4
|
-
* Basic automation adapter for GitHub Copilot.
|
|
5
|
-
* Compiles SpecWeave plugins to AGENTS.md (universal standard) for context and suggestions.
|
|
6
|
-
*
|
|
7
|
-
* This adapter compiles skills, agents, and commands into AGENTS.md format.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import * as path from 'path';
|
|
11
|
-
import fs from 'fs-extra';
|
|
12
|
-
import { AdapterBase } from '../adapter-base.js';
|
|
13
|
-
import { AdapterOptions, AdapterFile } from '../adapter-interface.js';
|
|
14
|
-
import type { Plugin } from '../../core/types/plugin.js';
|
|
15
|
-
import { compileToAgentsMd, getSpecweaveInstallPath } from '../../utils/agents-md-compiler.js';
|
|
16
|
-
import { LanguageManager, getSystemPromptForLanguage } from '../../core/i18n/language-manager.js';
|
|
17
|
-
import type { SupportedLanguage } from '../../core/i18n/types.js';
|
|
18
|
-
|
|
19
|
-
export class CopilotAdapter extends AdapterBase {
|
|
20
|
-
name = 'copilot';
|
|
21
|
-
description = 'GitHub Copilot adapter - Basic automation with AGENTS.md';
|
|
22
|
-
automationLevel = 'basic' as const;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Detect if GitHub Copilot is available
|
|
26
|
-
*
|
|
27
|
-
* Note: Detection is best-effort since Copilot might be installed
|
|
28
|
-
* but we can't detect it reliably. This adapter is safe to use
|
|
29
|
-
* as a fallback since Copilot reads AGENTS.md (universal standard).
|
|
30
|
-
*/
|
|
31
|
-
async detect(): Promise<boolean> {
|
|
32
|
-
// Always return false to make this a manual selection
|
|
33
|
-
// Users can explicitly choose Copilot adapter if they want
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Get files to install for Copilot adapter
|
|
39
|
-
*
|
|
40
|
-
* Note: Copilot automatically reads AGENTS.md (universal standard).
|
|
41
|
-
* No additional files needed.
|
|
42
|
-
*/
|
|
43
|
-
getFiles(): AdapterFile[] {
|
|
44
|
-
return [];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Install Copilot adapter
|
|
49
|
-
*/
|
|
50
|
-
async install(options: AdapterOptions): Promise<void> {
|
|
51
|
-
console.log('\n📦 Configuring GitHub Copilot (Basic Automation)\n');
|
|
52
|
-
|
|
53
|
-
// 1. Create .specweave/ structure
|
|
54
|
-
const specweaveDir = path.join(options.projectPath, '.specweave');
|
|
55
|
-
await fs.ensureDir(specweaveDir);
|
|
56
|
-
await fs.ensureDir(path.join(specweaveDir, 'increments'));
|
|
57
|
-
await fs.ensureDir(path.join(specweaveDir, 'increments', '_backlog'));
|
|
58
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'strategy'));
|
|
59
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'adr'));
|
|
60
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'rfc'));
|
|
61
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'architecture', 'diagrams'));
|
|
62
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'internal', 'delivery'));
|
|
63
|
-
await fs.ensureDir(path.join(specweaveDir, 'docs', 'public', 'guides'));
|
|
64
|
-
await fs.ensureDir(path.join(specweaveDir, 'logs'));
|
|
65
|
-
|
|
66
|
-
console.log('✅ Created .specweave/ structure');
|
|
67
|
-
|
|
68
|
-
// 2. Find SpecWeave installation
|
|
69
|
-
let specweavePath: string;
|
|
70
|
-
try {
|
|
71
|
-
specweavePath = getSpecweaveInstallPath();
|
|
72
|
-
console.log(`✅ Found SpecWeave installation at: ${specweavePath}`);
|
|
73
|
-
} catch (error) {
|
|
74
|
-
console.error('❌ Could not find SpecWeave installation');
|
|
75
|
-
console.error(' Make sure SpecWeave is installed: npm install -g specweave');
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// 3. Compile plugins to AGENTS.md
|
|
80
|
-
console.log('📝 Compiling plugins to AGENTS.md...');
|
|
81
|
-
const result = await compileToAgentsMd(specweavePath);
|
|
82
|
-
|
|
83
|
-
// 4. Write AGENTS.md
|
|
84
|
-
const agentsMdPath = path.join(options.projectPath, 'AGENTS.md');
|
|
85
|
-
await fs.writeFile(agentsMdPath, result.agentsMd, 'utf-8');
|
|
86
|
-
|
|
87
|
-
console.log('✅ Created AGENTS.md with:');
|
|
88
|
-
console.log(` - ${result.skills.length} skills`);
|
|
89
|
-
console.log(` - ${result.agents.length} agents`);
|
|
90
|
-
console.log(` - ${result.commands.length} commands`);
|
|
91
|
-
|
|
92
|
-
// 5. Create .github/copilot/instructions.md (optional)
|
|
93
|
-
const copilotDir = path.join(options.projectPath, '.github', 'copilot');
|
|
94
|
-
await fs.ensureDir(copilotDir);
|
|
95
|
-
|
|
96
|
-
const instructionsContent = `# GitHub Copilot Instructions
|
|
97
|
-
|
|
98
|
-
This project uses SpecWeave for spec-driven development.
|
|
99
|
-
|
|
100
|
-
## Important Context
|
|
101
|
-
|
|
102
|
-
- **AGENTS.md**: Complete workflow guide (read this first!)
|
|
103
|
-
- **Structure**: All work happens in \`.specweave/increments/\`
|
|
104
|
-
- **Workflow**: spec.md → plan.md → tasks.md → tests.md
|
|
105
|
-
|
|
106
|
-
## When Suggesting Code
|
|
107
|
-
|
|
108
|
-
- Follow patterns in AGENTS.md
|
|
109
|
-
- Create files in increment folders, not project root
|
|
110
|
-
- Reference existing specs and plans
|
|
111
|
-
- Follow naming conventions (kebab-case for increments)
|
|
112
|
-
|
|
113
|
-
See AGENTS.md for complete details.
|
|
114
|
-
`;
|
|
115
|
-
|
|
116
|
-
await fs.writeFile(path.join(copilotDir, 'instructions.md'), instructionsContent, 'utf-8');
|
|
117
|
-
console.log('✅ Created .github/copilot/instructions.md');
|
|
118
|
-
|
|
119
|
-
console.log('\n✅ Copilot will automatically read AGENTS.md');
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Post-installation instructions
|
|
124
|
-
*/
|
|
125
|
-
async postInstall(options: AdapterOptions): Promise<void> {
|
|
126
|
-
console.log(this.getInstructions());
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Get usage instructions for Copilot adapter
|
|
131
|
-
*/
|
|
132
|
-
getInstructions(): string {
|
|
133
|
-
return `
|
|
134
|
-
================================================================
|
|
135
|
-
GitHub Copilot Adapter - Basic Automation
|
|
136
|
-
================================================================
|
|
137
|
-
|
|
138
|
-
Your project is now configured for GitHub Copilot!
|
|
139
|
-
|
|
140
|
-
WHAT THIS PROVIDES:
|
|
141
|
-
|
|
142
|
-
- AGENTS.md (Universal Standard)
|
|
143
|
-
- Copilot automatically reads this file
|
|
144
|
-
- Contains all workflow instructions
|
|
145
|
-
- Project structure and templates
|
|
146
|
-
- Following agents.md standard (https://agents.md/)
|
|
147
|
-
|
|
148
|
-
- Better Code Suggestions
|
|
149
|
-
- Copilot reads AGENTS.md for context
|
|
150
|
-
- Suggests code following SpecWeave patterns
|
|
151
|
-
- Understands project structure
|
|
152
|
-
|
|
153
|
-
UNDERSTANDING THE DIFFERENCE:
|
|
154
|
-
|
|
155
|
-
Claude Code (Full Automation):
|
|
156
|
-
- Native skills (auto-activate)
|
|
157
|
-
- Native agents (separate context windows)
|
|
158
|
-
- Native hooks (auto-update docs)
|
|
159
|
-
- Slash commands (/inc, /do, /done)
|
|
160
|
-
|
|
161
|
-
Cursor (Semi-Automation):
|
|
162
|
-
- Reads AGENTS.md for workflow
|
|
163
|
-
- @ context shortcuts
|
|
164
|
-
- Composer multi-file editing
|
|
165
|
-
|
|
166
|
-
Copilot (Basic Automation - This Adapter):
|
|
167
|
-
- Reads AGENTS.md automatically
|
|
168
|
-
- Better code suggestions
|
|
169
|
-
- No skills, agents, hooks, or commands
|
|
170
|
-
- Manual workflow with AI assistance
|
|
171
|
-
|
|
172
|
-
HOW COPILOT USES AGENTS.MD:
|
|
173
|
-
|
|
174
|
-
GitHub Copilot automatically reads AGENTS.md to understand:
|
|
175
|
-
- SpecWeave structure (.specweave/ folders)
|
|
176
|
-
- File naming conventions (spec.md, plan.md, tasks.md)
|
|
177
|
-
- Context manifests (what files to reference)
|
|
178
|
-
- Best practices (technology-agnostic specs, etc.)
|
|
179
|
-
|
|
180
|
-
Result: Copilot suggests code that fits SpecWeave patterns!
|
|
181
|
-
|
|
182
|
-
HOW TO USE SPECWEAVE WITH COPILOT:
|
|
183
|
-
|
|
184
|
-
1. Copilot reads AGENTS.md automatically
|
|
185
|
-
- No action needed - just open project in VS Code
|
|
186
|
-
- Copilot will suggest code following SpecWeave patterns
|
|
187
|
-
|
|
188
|
-
2. Create increments manually:
|
|
189
|
-
mkdir -p .specweave/increments/0001-user-auth
|
|
190
|
-
|
|
191
|
-
3. Reference context manifests:
|
|
192
|
-
Open context-manifest.yaml
|
|
193
|
-
→ Copilot sees which files are relevant
|
|
194
|
-
→ Provides better suggestions
|
|
195
|
-
|
|
196
|
-
4. Ask Copilot Chat for guidance:
|
|
197
|
-
"How do I create a spec.md following SpecWeave?"
|
|
198
|
-
"Generate plan.md for user authentication"
|
|
199
|
-
"What should go in context-manifest.yaml?"
|
|
200
|
-
|
|
201
|
-
5. Use Copilot inline suggestions:
|
|
202
|
-
Start typing in spec.md → Copilot suggests content
|
|
203
|
-
Following SpecWeave patterns from AGENTS.md
|
|
204
|
-
|
|
205
|
-
WORKFLOW EXAMPLE:
|
|
206
|
-
|
|
207
|
-
Creating a Feature:
|
|
208
|
-
|
|
209
|
-
1. Create increment folder:
|
|
210
|
-
mkdir -p .specweave/increments/0002-payments
|
|
211
|
-
cd .specweave/increments/0002-payments
|
|
212
|
-
|
|
213
|
-
2. Create spec.md:
|
|
214
|
-
- Open file, start typing frontmatter
|
|
215
|
-
- Copilot suggests SpecWeave structure (from AGENTS.md)
|
|
216
|
-
- Fill in user stories, acceptance criteria
|
|
217
|
-
|
|
218
|
-
3. Create plan.md:
|
|
219
|
-
- Reference spec.md (Copilot reads it)
|
|
220
|
-
- Start typing "# Technical Plan"
|
|
221
|
-
- Copilot suggests architecture sections
|
|
222
|
-
|
|
223
|
-
4. Create context-manifest.yaml:
|
|
224
|
-
- Copilot suggests relevant files to include
|
|
225
|
-
- Lists spec sections and architecture docs
|
|
226
|
-
|
|
227
|
-
LIMITATIONS (vs Claude Code & Cursor):
|
|
228
|
-
|
|
229
|
-
- No auto-activation or workflows
|
|
230
|
-
- No skills, agents, hooks
|
|
231
|
-
- No slash commands or @ shortcuts
|
|
232
|
-
- No role-based assistance (PM, Architect, etc.)
|
|
233
|
-
- Completely manual workflow
|
|
234
|
-
|
|
235
|
-
But Copilot still provides helpful suggestions!
|
|
236
|
-
- Understands SpecWeave structure from AGENTS.md
|
|
237
|
-
- Suggests code following project patterns
|
|
238
|
-
|
|
239
|
-
DOCUMENTATION:
|
|
240
|
-
|
|
241
|
-
- AGENTS.md: Universal workflow instructions (Copilot reads this!)
|
|
242
|
-
- .specweave/docs/: Project documentation
|
|
243
|
-
|
|
244
|
-
You're ready to build with SpecWeave on GitHub Copilot!
|
|
245
|
-
|
|
246
|
-
Note: For better automation, consider Claude Code (full) or Cursor (semi).
|
|
247
|
-
Copilot is best for simple projects or when already using VS Code + Copilot.
|
|
248
|
-
`;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* Check if Copilot adapter supports plugins
|
|
253
|
-
*
|
|
254
|
-
* Copilot has plugin support via AGENTS.md compilation (same as Cursor)
|
|
255
|
-
*
|
|
256
|
-
* @returns boolean True for Copilot
|
|
257
|
-
*/
|
|
258
|
-
supportsPlugins(): boolean {
|
|
259
|
-
return true;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* Read language configuration from project config
|
|
264
|
-
*
|
|
265
|
-
* @returns Language setting from config, defaults to 'en'
|
|
266
|
-
*/
|
|
267
|
-
private async getLanguageConfig(): Promise<SupportedLanguage> {
|
|
268
|
-
const projectPath = process.cwd();
|
|
269
|
-
const configPath = path.join(projectPath, '.specweave', 'config.json');
|
|
270
|
-
|
|
271
|
-
if (!(await fs.pathExists(configPath))) {
|
|
272
|
-
return 'en'; // Default to English if no config
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
try {
|
|
276
|
-
const config = await fs.readJson(configPath);
|
|
277
|
-
return (config.language as SupportedLanguage) || 'en';
|
|
278
|
-
} catch (error) {
|
|
279
|
-
console.warn('⚠️ Could not read language from config, defaulting to English');
|
|
280
|
-
return 'en';
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Inject system prompt for non-English languages
|
|
286
|
-
*
|
|
287
|
-
* Prepends language instruction to markdown content if language !== 'en'
|
|
288
|
-
*
|
|
289
|
-
* @param content Original markdown content
|
|
290
|
-
* @param language Target language
|
|
291
|
-
* @returns Modified content with system prompt (or unchanged if English)
|
|
292
|
-
*/
|
|
293
|
-
private injectSystemPrompt(content: string, language: SupportedLanguage): string {
|
|
294
|
-
if (language === 'en') {
|
|
295
|
-
return content; // No changes for English - preserve default behavior
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// Get system prompt for target language
|
|
299
|
-
const systemPrompt = getSystemPromptForLanguage(language);
|
|
300
|
-
|
|
301
|
-
// For AGENTS.md compilation, inject at the beginning of the content
|
|
302
|
-
return `${systemPrompt}\n\n${content}`;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* Compile and install a plugin for Copilot
|
|
307
|
-
*
|
|
308
|
-
* Copilot uses AGENTS.md compilation (same as Cursor)
|
|
309
|
-
*
|
|
310
|
-
* NEW: Injects system prompts for non-English languages
|
|
311
|
-
*
|
|
312
|
-
* @param plugin Plugin to install
|
|
313
|
-
*/
|
|
314
|
-
async compilePlugin(plugin: Plugin): Promise<void> {
|
|
315
|
-
const projectPath = process.cwd();
|
|
316
|
-
const agentsMdPath = path.join(projectPath, 'AGENTS.md');
|
|
317
|
-
|
|
318
|
-
console.log(`\n📦 Compiling plugin for Copilot: ${plugin.manifest.name}`);
|
|
319
|
-
|
|
320
|
-
// Get language configuration for system prompt injection
|
|
321
|
-
const language = await this.getLanguageConfig();
|
|
322
|
-
if (language !== 'en') {
|
|
323
|
-
console.log(` 🌐 Language: ${language} (system prompts will be injected)`);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
if (!(await fs.pathExists(agentsMdPath))) {
|
|
327
|
-
throw new Error('AGENTS.md not found. Run specweave init first.');
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
let agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
331
|
-
|
|
332
|
-
const pluginMarker = `<!-- Plugin: ${plugin.manifest.name} -->`;
|
|
333
|
-
if (agentsMd.includes(pluginMarker)) {
|
|
334
|
-
console.log(` ℹ️ Plugin ${plugin.manifest.name} already compiled to AGENTS.md`);
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
let pluginSection = `\n\n${pluginMarker}\n\n`;
|
|
339
|
-
pluginSection += `# Plugin: ${plugin.manifest.name}\n\n`;
|
|
340
|
-
pluginSection += `${plugin.manifest.description}\n\n`;
|
|
341
|
-
|
|
342
|
-
if (plugin.skills.length > 0) {
|
|
343
|
-
pluginSection += `## Skills\n\n`;
|
|
344
|
-
for (const skill of plugin.skills) {
|
|
345
|
-
const skillContent = await fs.readFile(path.join(skill.path, 'SKILL.md'), 'utf-8');
|
|
346
|
-
const contentWithoutFrontmatter = skillContent.replace(/^---\n[\s\S]+?\n---\n/, '');
|
|
347
|
-
// Inject system prompt if needed
|
|
348
|
-
const modifiedContent = this.injectSystemPrompt(contentWithoutFrontmatter, language);
|
|
349
|
-
pluginSection += `### ${skill.name}\n\n${modifiedContent}\n\n`;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
if (plugin.agents.length > 0) {
|
|
354
|
-
pluginSection += `## Agents\n\n`;
|
|
355
|
-
for (const agent of plugin.agents) {
|
|
356
|
-
const agentContent = await fs.readFile(path.join(agent.path, 'AGENT.md'), 'utf-8');
|
|
357
|
-
// Inject system prompt if needed
|
|
358
|
-
const modifiedContent = this.injectSystemPrompt(agentContent, language);
|
|
359
|
-
pluginSection += `### ${agent.name}\n\n${modifiedContent}\n\n`;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
if (plugin.commands.length > 0) {
|
|
364
|
-
pluginSection += `## Commands\n\n`;
|
|
365
|
-
for (const command of plugin.commands) {
|
|
366
|
-
const commandContent = await fs.readFile(command.path, 'utf-8');
|
|
367
|
-
const contentWithoutFrontmatter = commandContent.replace(/^---\n[\s\S]+?\n---\n/, '');
|
|
368
|
-
// Inject system prompt if needed
|
|
369
|
-
const modifiedContent = this.injectSystemPrompt(contentWithoutFrontmatter, language);
|
|
370
|
-
pluginSection += `### /${command.name}\n\n${modifiedContent}\n\n`;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
pluginSection += `<!-- End Plugin: ${plugin.manifest.name} -->\n`;
|
|
375
|
-
|
|
376
|
-
agentsMd += pluginSection;
|
|
377
|
-
await fs.writeFile(agentsMdPath, agentsMd, 'utf-8');
|
|
378
|
-
|
|
379
|
-
console.log(` ✓ Compiled to AGENTS.md`);
|
|
380
|
-
console.log(` ✓ ${plugin.skills.length} skills, ${plugin.agents.length} agents, ${plugin.commands.length} commands`);
|
|
381
|
-
console.log(`\n✅ Plugin ${plugin.manifest.name} compiled for Copilot!`);
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Unload a plugin from Copilot
|
|
386
|
-
*/
|
|
387
|
-
async unloadPlugin(pluginName: string): Promise<void> {
|
|
388
|
-
const projectPath = process.cwd();
|
|
389
|
-
const agentsMdPath = path.join(projectPath, 'AGENTS.md');
|
|
390
|
-
|
|
391
|
-
console.log(`\n🗑️ Unloading plugin from Copilot: ${pluginName}`);
|
|
392
|
-
|
|
393
|
-
if (!(await fs.pathExists(agentsMdPath))) {
|
|
394
|
-
console.warn(`⚠️ AGENTS.md not found`);
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
let agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
399
|
-
|
|
400
|
-
const startMarker = `<!-- Plugin: ${pluginName} -->`;
|
|
401
|
-
const endMarker = `<!-- End Plugin: ${pluginName} -->`;
|
|
402
|
-
|
|
403
|
-
const startIndex = agentsMd.indexOf(startMarker);
|
|
404
|
-
if (startIndex === -1) {
|
|
405
|
-
console.warn(`⚠️ Plugin ${pluginName} not found in AGENTS.md`);
|
|
406
|
-
return;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
const endIndex = agentsMd.indexOf(endMarker, startIndex);
|
|
410
|
-
if (endIndex === -1) {
|
|
411
|
-
console.warn(`⚠️ Plugin ${pluginName} section malformed`);
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
agentsMd = agentsMd.slice(0, startIndex) + agentsMd.slice(endIndex + endMarker.length);
|
|
416
|
-
await fs.writeFile(agentsMdPath, agentsMd, 'utf-8');
|
|
417
|
-
|
|
418
|
-
console.log(` ✓ Removed from AGENTS.md`);
|
|
419
|
-
console.log(`\n✅ Plugin ${pluginName} unloaded!`);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Get list of installed plugins for Copilot
|
|
424
|
-
*/
|
|
425
|
-
async getInstalledPlugins(): Promise<string[]> {
|
|
426
|
-
const projectPath = process.cwd();
|
|
427
|
-
const agentsMdPath = path.join(projectPath, 'AGENTS.md');
|
|
428
|
-
|
|
429
|
-
if (!(await fs.pathExists(agentsMdPath))) {
|
|
430
|
-
return [];
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
const agentsMd = await fs.readFile(agentsMdPath, 'utf-8');
|
|
434
|
-
const pluginMarkerRegex = /<!-- Plugin: (specweave-[a-z0-9-]+) -->/g;
|
|
435
|
-
const matches = agentsMd.matchAll(pluginMarkerRegex);
|
|
436
|
-
|
|
437
|
-
const plugins: string[] = [];
|
|
438
|
-
for (const match of matches) {
|
|
439
|
-
plugins.push(match[1]);
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
return plugins;
|
|
443
|
-
}
|
|
444
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# @docs - Architecture Documentation Context
|
|
2
|
-
|
|
3
|
-
This file is loaded when you type `@docs` in Cursor.
|
|
4
|
-
|
|
5
|
-
## What This Provides
|
|
6
|
-
|
|
7
|
-
Quick access to architecture documentation:
|
|
8
|
-
- System design (HLD)
|
|
9
|
-
- ADRs (Architecture Decision Records)
|
|
10
|
-
- Component diagrams (C4 Model)
|
|
11
|
-
- Data models (ER diagrams)
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
@docs show me the system architecture
|
|
17
|
-
@docs what ADRs exist for authentication?
|
|
18
|
-
@docs explain the data model
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Files Loaded
|
|
22
|
-
|
|
23
|
-
When `@docs` is used, Cursor should load:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
.specweave/docs/internal/architecture/
|
|
27
|
-
├── system-design.md # HLD
|
|
28
|
-
├── adr/ # Architecture Decision Records
|
|
29
|
-
│ ├── 0001-tech-stack.md
|
|
30
|
-
│ ├── 0002-database-choice.md
|
|
31
|
-
│ └── ...
|
|
32
|
-
├── diagrams/ # C4 diagrams
|
|
33
|
-
│ ├── system-context.mmd # C4 Level 1
|
|
34
|
-
│ ├── system-container.mmd # C4 Level 2
|
|
35
|
-
│ └── {module}/ # C4 Level 3 (component)
|
|
36
|
-
└── data-models/ # ER diagrams
|
|
37
|
-
└── schema.sql
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Context Precision
|
|
41
|
-
|
|
42
|
-
**Don't load everything!**
|
|
43
|
-
|
|
44
|
-
If working on specific module (e.g., authentication):
|
|
45
|
-
1. Check context-manifest.yaml
|
|
46
|
-
2. Load ONLY auth-related docs:
|
|
47
|
-
```
|
|
48
|
-
.specweave/docs/internal/architecture/auth/
|
|
49
|
-
├── design.md
|
|
50
|
-
├── adr/0005-auth-method.md
|
|
51
|
-
└── diagrams/auth-flow.mmd
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Example Workflow
|
|
55
|
-
|
|
56
|
-
User: `@docs show authentication architecture`
|
|
57
|
-
|
|
58
|
-
You:
|
|
59
|
-
1. Load .specweave/docs/internal/architecture/auth/
|
|
60
|
-
2. Load ADRs related to auth (ADR-0005, ADR-0012)
|
|
61
|
-
3. Load auth diagrams
|
|
62
|
-
4. Summarize: "Authentication uses OAuth2 (ADR-0005), JWT tokens stored in httpOnly cookies (ADR-0012). See auth-flow.mmd for sequence diagram."
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# @increments - Current Increment Context
|
|
2
|
-
|
|
3
|
-
This file is loaded when you type `@increments` in Cursor.
|
|
4
|
-
|
|
5
|
-
## What This Provides
|
|
6
|
-
|
|
7
|
-
Quick access to the current increment's:
|
|
8
|
-
- spec.md (WHAT and WHY)
|
|
9
|
-
- plan.md (HOW)
|
|
10
|
-
- tasks.md (implementation steps)
|
|
11
|
-
- context-manifest.yaml (what context to load)
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
@increments show me what we're working on
|
|
17
|
-
@increments what's the current task?
|
|
18
|
-
@increments load the spec for this feature
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Files Loaded
|
|
22
|
-
|
|
23
|
-
When `@increments` is used, Cursor should load:
|
|
24
|
-
|
|
25
|
-
1. **Current increment folder** (most recent in-progress):
|
|
26
|
-
```
|
|
27
|
-
.specweave/increments/####-feature-name/
|
|
28
|
-
├── spec.md
|
|
29
|
-
├── plan.md
|
|
30
|
-
├── tasks.md
|
|
31
|
-
└── context-manifest.yaml
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
2. **How to find current increment**:
|
|
35
|
-
```bash
|
|
36
|
-
# List all increments
|
|
37
|
-
ls -la .specweave/increments/
|
|
38
|
-
|
|
39
|
-
# Find in-progress increments
|
|
40
|
-
grep -r "status: in-progress" .specweave/increments/*/spec.md
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
3. **Load order**:
|
|
44
|
-
- context-manifest.yaml (to know what else to load)
|
|
45
|
-
- spec.md (business requirements)
|
|
46
|
-
- plan.md (technical design)
|
|
47
|
-
- tasks.md (current task status)
|
|
48
|
-
|
|
49
|
-
## Context Manifest Critical
|
|
50
|
-
|
|
51
|
-
**ALWAYS read context-manifest.yaml first!**
|
|
52
|
-
|
|
53
|
-
It tells you which additional files to load:
|
|
54
|
-
```yaml
|
|
55
|
-
spec_sections:
|
|
56
|
-
- .specweave/docs/internal/strategy/auth/spec.md
|
|
57
|
-
documentation:
|
|
58
|
-
- .specweave/docs/internal/architecture/auth-design.md
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Then load ONLY those files (70%+ token savings).
|
|
62
|
-
|
|
63
|
-
## Example Workflow
|
|
64
|
-
|
|
65
|
-
User: `@increments what's the current feature?`
|
|
66
|
-
|
|
67
|
-
You:
|
|
68
|
-
1. Find most recent in-progress increment
|
|
69
|
-
2. Read spec.md → See it's user authentication
|
|
70
|
-
3. Read tasks.md → See we're on T003 (OAuth2 implementation)
|
|
71
|
-
4. Respond: "Working on user authentication (increment 0002). Currently on task T003: Implement OAuth2 flow."
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# @strategy - Business Strategy Context
|
|
2
|
-
|
|
3
|
-
This file is loaded when you type `@strategy` in Cursor.
|
|
4
|
-
|
|
5
|
-
## What This Provides
|
|
6
|
-
|
|
7
|
-
Quick access to business strategy documentation:
|
|
8
|
-
- Product vision and goals
|
|
9
|
-
- Business requirements (technology-agnostic)
|
|
10
|
-
- User stories and acceptance criteria
|
|
11
|
-
- PRDs (Product Requirements Documents)
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
@strategy what's the product vision?
|
|
17
|
-
@strategy show me authentication requirements
|
|
18
|
-
@strategy what are the success criteria?
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Files Loaded
|
|
22
|
-
|
|
23
|
-
When `@strategy` is used, Cursor should load:
|
|
24
|
-
|
|
25
|
-
```
|
|
26
|
-
.specweave/docs/internal/strategy/
|
|
27
|
-
├── {module}/ # Module-specific strategy
|
|
28
|
-
│ ├── overview.md # Product vision
|
|
29
|
-
│ ├── requirements.md # FR/NFR (tech-agnostic)
|
|
30
|
-
│ ├── user-stories.md # All user stories
|
|
31
|
-
│ └── success-criteria.md # KPIs, metrics
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Context Precision
|
|
35
|
-
|
|
36
|
-
**Don't load everything!**
|
|
37
|
-
|
|
38
|
-
If working on authentication module:
|
|
39
|
-
1. Load ONLY auth strategy:
|
|
40
|
-
```
|
|
41
|
-
.specweave/docs/internal/strategy/auth/
|
|
42
|
-
├── overview.md
|
|
43
|
-
├── requirements.md
|
|
44
|
-
├── user-stories.md
|
|
45
|
-
└── success-criteria.md
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Technology-Agnostic Requirements
|
|
49
|
-
|
|
50
|
-
**Critical**: Strategy docs are technology-agnostic (WHAT/WHY, not HOW).
|
|
51
|
-
|
|
52
|
-
**Good (technology-agnostic)**:
|
|
53
|
-
```markdown
|
|
54
|
-
## FR-001: User Authentication
|
|
55
|
-
Users must be able to securely authenticate with their email and password.
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**Bad (too technical)**:
|
|
59
|
-
```markdown
|
|
60
|
-
## FR-001: User Authentication
|
|
61
|
-
Users authenticate via JWT tokens stored in httpOnly cookies with bcrypt password hashing.
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
The technical details go in architecture docs (@docs), not strategy.
|
|
65
|
-
|
|
66
|
-
## Example Workflow
|
|
67
|
-
|
|
68
|
-
User: `@strategy what are the authentication requirements?`
|
|
69
|
-
|
|
70
|
-
You:
|
|
71
|
-
1. Load .specweave/docs/internal/strategy/auth/requirements.md
|
|
72
|
-
2. Read functional and non-functional requirements
|
|
73
|
-
3. Summarize: "FR-001: Email/password auth. FR-002: Social login (Google, GitHub). NFR-001: < 2s login response time. NFR-002: 99.9% uptime."
|