specweave 0.28.3 → 0.28.5
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/README.md +31 -88
- package/dist/src/core/living-docs/feature-consistency-validator.d.ts +129 -0
- package/dist/src/core/living-docs/feature-consistency-validator.d.ts.map +1 -0
- package/dist/src/core/living-docs/feature-consistency-validator.js +445 -0
- package/dist/src/core/living-docs/feature-consistency-validator.js.map +1 -0
- package/dist/src/core/living-docs/index.d.ts +1 -0
- package/dist/src/core/living-docs/index.d.ts.map +1 -1
- package/dist/src/core/living-docs/index.js +1 -0
- package/dist/src/core/living-docs/index.js.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.d.ts +13 -0
- package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
- package/dist/src/core/living-docs/living-docs-sync.js +50 -0
- package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/commands/specweave-validate-features.md +203 -0
- package/plugins/specweave/hooks/docs-changed.sh.backup +79 -0
- package/plugins/specweave/hooks/human-input-required.sh.backup +75 -0
- package/plugins/specweave/hooks/post-first-increment.sh.backup +61 -0
- package/plugins/specweave/hooks/post-increment-change.sh.backup +98 -0
- package/plugins/specweave/hooks/post-increment-completion.sh.backup +231 -0
- package/plugins/specweave/hooks/post-increment-planning.sh.backup +1048 -0
- package/plugins/specweave/hooks/post-increment-status-change.sh.backup +147 -0
- package/plugins/specweave/hooks/post-spec-update.sh.backup +158 -0
- package/plugins/specweave/hooks/post-user-story-complete.sh.backup +179 -0
- package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +83 -0
- package/plugins/specweave/hooks/pre-implementation.sh.backup +67 -0
- package/plugins/specweave/hooks/pre-task-completion.sh.backup +194 -0
- package/plugins/specweave/hooks/pre-tool-use.sh.backup +133 -0
- package/plugins/specweave/hooks/user-prompt-submit.sh.backup +386 -0
- package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +353 -0
- package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-ado/lib/ado-multi-project-sync.js +1 -0
- package/plugins/specweave-ado/lib/enhanced-ado-sync.js +170 -0
- package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +1104 -0
- package/plugins/specweave-github/hooks/post-task-completion.sh.backup +258 -0
- package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +172 -0
- package/plugins/specweave-jira/lib/enhanced-jira-sync.js +3 -3
- package/plugins/specweave-kafka/skills/kafka-mcp-integration/SKILL.md +17 -0
- package/plugins/specweave-plugin-dev/skills/claude-sdk/SKILL.md +3 -1
- package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +1017 -0
- package/plugins/specweave-release/hooks/post-task-completion.sh.backup +110 -0
- package/plugins/specweave-ui/commands/ui-automate.md +5 -28
- package/src/templates/AGENTS.md.template +92 -9
package/README.md
CHANGED
|
@@ -47,50 +47,9 @@ Every AI coding tool promises productivity. But after the chat ends:
|
|
|
47
47
|
|
|
48
48
|
## The Workflow
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
A["/specweave:increment<br/>'Add dark mode'"]
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
subgraph AGENTS["2. AI AGENTS CREATE"]
|
|
57
|
-
direction TB
|
|
58
|
-
PM["PM Agent<br/>User stories + ACs"]
|
|
59
|
-
ARCH["Architect Agent<br/>Design + ADRs"]
|
|
60
|
-
PLAN["Planner Agent<br/>Tasks + Tests"]
|
|
61
|
-
PM --> ARCH --> PLAN
|
|
62
|
-
end
|
|
63
|
-
|
|
64
|
-
subgraph OUTPUT["3. PERMANENT FILES"]
|
|
65
|
-
direction LR
|
|
66
|
-
SPEC["spec.md<br/>WHAT"]
|
|
67
|
-
PLANF["plan.md<br/>HOW"]
|
|
68
|
-
TASKS["tasks.md<br/>DO"]
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
subgraph EXECUTE["4. BUILD"]
|
|
72
|
-
B["/specweave:do<br/>Autonomous execution"]
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
subgraph SYNC["5. AUTO-SYNC"]
|
|
76
|
-
direction LR
|
|
77
|
-
GH["GitHub"]
|
|
78
|
-
JIRA["JIRA"]
|
|
79
|
-
ADO["ADO"]
|
|
80
|
-
DOCS["Docs"]
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
INPUT --> AGENTS
|
|
84
|
-
AGENTS --> OUTPUT
|
|
85
|
-
OUTPUT --> EXECUTE
|
|
86
|
-
EXECUTE --> SYNC
|
|
87
|
-
|
|
88
|
-
style INPUT fill:#e8f5e9,stroke:#4caf50,stroke-width:2px
|
|
89
|
-
style AGENTS fill:#e3f2fd,stroke:#2196f3,stroke-width:2px
|
|
90
|
-
style OUTPUT fill:#fff3e0,stroke:#ff9800,stroke-width:2px
|
|
91
|
-
style EXECUTE fill:#fce4ec,stroke:#e91e63,stroke-width:2px
|
|
92
|
-
style SYNC fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px
|
|
93
|
-
```
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img src="https://raw.githubusercontent.com/anton-abyzov/specweave/develop/docs-site/static/img/workflow-diagram.svg" alt="SpecWeave Workflow: Command → AI Agents → Permanent Files → Build → Auto-Sync" width="700"/>
|
|
52
|
+
</p>
|
|
94
53
|
|
|
95
54
|
---
|
|
96
55
|
|
|
@@ -131,31 +90,9 @@ Then in Claude Code:
|
|
|
131
90
|
|
|
132
91
|
SpecWeave keeps your project management tools in sync **automatically**:
|
|
133
92
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
TASK["Task Completed"]
|
|
138
|
-
US["User Story Updated"]
|
|
139
|
-
INC["Increment Progress"]
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
subgraph EXTERNAL["Your Tools (Bidirectional)"]
|
|
143
|
-
GH["<b>GitHub Issues</b><br/>Checkboxes, comments,<br/>labels auto-update"]
|
|
144
|
-
JIRA["<b>JIRA</b><br/>Epic/Story hierarchy,<br/>status transitions"]
|
|
145
|
-
ADO["<b>Azure DevOps</b><br/>Work items,<br/>area paths"]
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
TASK -->|"hooks auto-fire"| GH
|
|
149
|
-
TASK -->|"hooks auto-fire"| JIRA
|
|
150
|
-
TASK -->|"hooks auto-fire"| ADO
|
|
151
|
-
|
|
152
|
-
GH -->|"import existing"| INC
|
|
153
|
-
JIRA -->|"import existing"| INC
|
|
154
|
-
ADO -->|"import existing"| INC
|
|
155
|
-
|
|
156
|
-
style SPECWEAVE fill:#e3f2fd,stroke:#2196f3,stroke-width:2px
|
|
157
|
-
style EXTERNAL fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px
|
|
158
|
-
```
|
|
93
|
+
<p align="center">
|
|
94
|
+
<img src="https://raw.githubusercontent.com/anton-abyzov/specweave/develop/docs-site/static/img/external-sync-diagram.svg" alt="SpecWeave External Tool Integration: Bidirectional sync with GitHub, JIRA, Azure DevOps" width="800"/>
|
|
95
|
+
</p>
|
|
159
96
|
|
|
160
97
|
| Platform | Capabilities |
|
|
161
98
|
|----------|--------------|
|
|
@@ -222,25 +159,9 @@ As a user, I want to toggle dark mode so that I can reduce eye strain at night.
|
|
|
222
159
|
|
|
223
160
|
### Autonomous Multi-Agent Orchestration
|
|
224
161
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
PM["PM Agent"]
|
|
229
|
-
ARCH["Architect"]
|
|
230
|
-
TECH["Tech Lead"]
|
|
231
|
-
QA["QA Lead"]
|
|
232
|
-
SEC["Security"]
|
|
233
|
-
DEVOPS["DevOps"]
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
PM -->|"spec.md"| ARCH
|
|
237
|
-
ARCH -->|"plan.md"| TECH
|
|
238
|
-
TECH -->|"code"| QA
|
|
239
|
-
QA -->|"tests"| SEC
|
|
240
|
-
SEC -->|"security review"| DEVOPS
|
|
241
|
-
|
|
242
|
-
style AGENTS fill:#e8f5e9,stroke:#4caf50,stroke-width:2px
|
|
243
|
-
```
|
|
162
|
+
<p align="center">
|
|
163
|
+
<img src="https://raw.githubusercontent.com/anton-abyzov/specweave/develop/docs-site/static/img/agents-diagram.svg" alt="SpecWeave Multi-Agent Orchestration: PM → Architect → Tech Lead → QA → Security → DevOps" width="850"/>
|
|
164
|
+
</p>
|
|
244
165
|
|
|
245
166
|
- **PM Agent**: User stories, acceptance criteria, market analysis
|
|
246
167
|
- **Architect Agent**: System design, ADRs, tech stack decisions
|
|
@@ -272,6 +193,28 @@ Three gates before any increment closes:
|
|
|
272
193
|
- Context optimizer removes irrelevant specs
|
|
273
194
|
- Sub-agent parallelization isolates context
|
|
274
195
|
|
|
196
|
+
### Why Skills, Not MCP?
|
|
197
|
+
|
|
198
|
+
**Community insight**: Anthropic's engineering team discovered that [code execution beats direct tool calls](https://www.anthropic.com/engineering/code-execution-with-mcp) for AI agent efficiency.
|
|
199
|
+
|
|
200
|
+
**The MCP Problem**:
|
|
201
|
+
| Issue | Impact |
|
|
202
|
+
|-------|--------|
|
|
203
|
+
| Tool definition bloat | All tools loaded upfront → context waste |
|
|
204
|
+
| Data duplication | Same data flows through model 2-3× |
|
|
205
|
+
| Token explosion | 150,000 tokens vs 2,000 with code-first |
|
|
206
|
+
|
|
207
|
+
**SpecWeave's Approach**:
|
|
208
|
+
```
|
|
209
|
+
❌ MCP: Load 50 tools → model picks → fetch → model processes → call another
|
|
210
|
+
✅ Skills: Load 1 skill on-demand → Claude writes code → process locally
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
> "LLMs are adept at writing code and developers should take advantage of this strength."
|
|
214
|
+
> — [Anthropic Engineering](https://www.anthropic.com/engineering/code-execution-with-mcp)
|
|
215
|
+
|
|
216
|
+
**Result**: 98%+ token reduction, deterministic execution, reusable skill library.
|
|
217
|
+
|
|
275
218
|
---
|
|
276
219
|
|
|
277
220
|
## Commands Reference
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature Consistency Validator
|
|
3
|
+
*
|
|
4
|
+
* Validates and repairs consistency between:
|
|
5
|
+
* - .specweave/docs/internal/specs/_features/FS-XXX/
|
|
6
|
+
* - .specweave/docs/internal/specs/{project}/FS-XXX/
|
|
7
|
+
*
|
|
8
|
+
* PROBLEM SOLVED:
|
|
9
|
+
* Living docs sync creates _features/ and {project}/ folders sequentially.
|
|
10
|
+
* If sync fails midway or increment is deleted, folders can get out of sync.
|
|
11
|
+
*
|
|
12
|
+
* SOLUTION:
|
|
13
|
+
* 1. Detect discrepancies (orphaned _features without project folders)
|
|
14
|
+
* 2. Auto-repair by creating missing project folders
|
|
15
|
+
* 3. Report issues for manual intervention when auto-repair not possible
|
|
16
|
+
*
|
|
17
|
+
* @see ADR-0142 (if created) for architectural decision
|
|
18
|
+
*/
|
|
19
|
+
import { Logger } from '../../utils/logger.js';
|
|
20
|
+
export interface DiscrepancyReport {
|
|
21
|
+
/** Feature ID (e.g., "FS-062") */
|
|
22
|
+
featureId: string;
|
|
23
|
+
/** Type of discrepancy */
|
|
24
|
+
type: 'missing_project_folder' | 'missing_features_folder' | 'orphaned_feature';
|
|
25
|
+
/** Description of the issue */
|
|
26
|
+
description: string;
|
|
27
|
+
/** Can this be auto-repaired? */
|
|
28
|
+
autoRepairable: boolean;
|
|
29
|
+
/** Path to _features folder (if exists) */
|
|
30
|
+
featuresPath?: string;
|
|
31
|
+
/** Path to project folder (if exists) */
|
|
32
|
+
projectPath?: string;
|
|
33
|
+
/** Linked increment ID (if found in FEATURE.md) */
|
|
34
|
+
linkedIncrementId?: string;
|
|
35
|
+
/** Whether linked increment exists */
|
|
36
|
+
incrementExists?: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface ValidationResult {
|
|
39
|
+
/** Total features scanned */
|
|
40
|
+
totalFeatures: number;
|
|
41
|
+
/** Number of consistent features */
|
|
42
|
+
consistentCount: number;
|
|
43
|
+
/** List of discrepancies found */
|
|
44
|
+
discrepancies: DiscrepancyReport[];
|
|
45
|
+
/** Auto-repair results (if repair was attempted) */
|
|
46
|
+
repairs?: RepairResult[];
|
|
47
|
+
}
|
|
48
|
+
export interface RepairResult {
|
|
49
|
+
featureId: string;
|
|
50
|
+
success: boolean;
|
|
51
|
+
action: string;
|
|
52
|
+
error?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ValidatorOptions {
|
|
55
|
+
/** Logger instance */
|
|
56
|
+
logger?: Logger;
|
|
57
|
+
/** Default project name (for creating missing project folders) */
|
|
58
|
+
defaultProject?: string;
|
|
59
|
+
/** Whether to include archived features in validation */
|
|
60
|
+
includeArchived?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export declare class FeatureConsistencyValidator {
|
|
63
|
+
private projectRoot;
|
|
64
|
+
private specsPath;
|
|
65
|
+
private incrementsPath;
|
|
66
|
+
private logger;
|
|
67
|
+
private defaultProject;
|
|
68
|
+
private includeArchived;
|
|
69
|
+
constructor(projectRoot: string, options?: ValidatorOptions);
|
|
70
|
+
/**
|
|
71
|
+
* Validate consistency between _features and project folders
|
|
72
|
+
*
|
|
73
|
+
* @param autoRepair - If true, attempt to auto-repair discrepancies
|
|
74
|
+
* @returns Validation result with discrepancies and repair results
|
|
75
|
+
*/
|
|
76
|
+
validate(autoRepair?: boolean): Promise<ValidationResult>;
|
|
77
|
+
/**
|
|
78
|
+
* Get all feature folder IDs from _features directory
|
|
79
|
+
*/
|
|
80
|
+
private getFeatureFolders;
|
|
81
|
+
/**
|
|
82
|
+
* Get all project folder names (excluding _features, _epics, _archive)
|
|
83
|
+
*/
|
|
84
|
+
private getProjectFolders;
|
|
85
|
+
/**
|
|
86
|
+
* Check if a feature has consistent folders across _features and projects
|
|
87
|
+
*/
|
|
88
|
+
private checkFeatureConsistency;
|
|
89
|
+
/**
|
|
90
|
+
* Check if a feature is from an external source (GitHub, JIRA, ADO)
|
|
91
|
+
* External features should NOT be considered orphaned even if local increment is missing
|
|
92
|
+
*/
|
|
93
|
+
private isExternalFeature;
|
|
94
|
+
/**
|
|
95
|
+
* Extract linked increment ID from FEATURE.md
|
|
96
|
+
*/
|
|
97
|
+
private extractLinkedIncrement;
|
|
98
|
+
/**
|
|
99
|
+
* Check if an increment exists (in active or archive folder)
|
|
100
|
+
*/
|
|
101
|
+
private checkIncrementExists;
|
|
102
|
+
/**
|
|
103
|
+
* Attempt to repair a discrepancy
|
|
104
|
+
*/
|
|
105
|
+
private repairDiscrepancy;
|
|
106
|
+
/**
|
|
107
|
+
* Archive an orphaned feature (increment was deleted)
|
|
108
|
+
* Delegates to FeatureArchiver for consistent archiving behavior
|
|
109
|
+
*/
|
|
110
|
+
private archiveOrphanedFeature;
|
|
111
|
+
/**
|
|
112
|
+
* Create missing project folder for a feature
|
|
113
|
+
*/
|
|
114
|
+
private repairMissingProjectFolder;
|
|
115
|
+
/**
|
|
116
|
+
* Log validation summary
|
|
117
|
+
*/
|
|
118
|
+
private logValidationSummary;
|
|
119
|
+
/**
|
|
120
|
+
* Quick check: Are there any discrepancies?
|
|
121
|
+
* Use this for fast validation without full report
|
|
122
|
+
*/
|
|
123
|
+
hasDiscrepancies(): Promise<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Get list of orphaned features (features in _features without corresponding project folder)
|
|
126
|
+
*/
|
|
127
|
+
getOrphanedFeatures(): Promise<string[]>;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=feature-consistency-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-consistency-validator.d.ts","sourceRoot":"","sources":["../../../../src/core/living-docs/feature-consistency-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,MAAM,EAAiB,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,iBAAiB;IAChC,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,IAAI,EAAE,wBAA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