specweave 0.1.9 → 0.3.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.md +600 -0
- package/README.md +245 -81
- package/bin/install-all.sh +1 -1
- package/bin/install-commands.sh +3 -3
- package/bin/specweave.js +39 -9
- package/dist/adapters/adapter-base.d.ts +1 -1
- package/dist/adapters/adapter-base.d.ts.map +1 -1
- package/dist/adapters/adapter-base.js +6 -41
- package/dist/adapters/adapter-base.js.map +1 -1
- package/dist/adapters/adapter-interface.js +1 -2
- package/dist/adapters/adapter-interface.js.map +1 -1
- package/dist/adapters/adapter-loader.d.ts +86 -0
- package/dist/adapters/adapter-loader.d.ts.map +1 -0
- package/dist/adapters/adapter-loader.js +216 -0
- package/dist/adapters/adapter-loader.js.map +1 -0
- package/dist/adapters/agents-md-generator.d.ts +48 -0
- package/dist/adapters/agents-md-generator.d.ts.map +1 -0
- package/dist/adapters/agents-md-generator.js +132 -0
- package/dist/adapters/agents-md-generator.js.map +1 -0
- package/dist/adapters/claude/adapter.d.ts +2 -2
- package/dist/adapters/claude/adapter.d.ts.map +1 -1
- package/dist/adapters/claude/adapter.js +5 -42
- package/dist/adapters/claude/adapter.js.map +1 -1
- package/dist/adapters/claude-md-generator.d.ts +78 -0
- package/dist/adapters/claude-md-generator.d.ts.map +1 -0
- package/dist/adapters/claude-md-generator.js +246 -0
- package/dist/adapters/claude-md-generator.js.map +1 -0
- package/dist/adapters/codex/adapter.d.ts +50 -0
- package/dist/adapters/codex/adapter.d.ts.map +1 -0
- package/dist/adapters/codex/adapter.js +316 -0
- package/dist/adapters/codex/adapter.js.map +1 -0
- package/dist/adapters/copilot/adapter.d.ts +10 -9
- package/dist/adapters/copilot/adapter.d.ts.map +1 -1
- package/dist/adapters/copilot/adapter.js +35 -100
- package/dist/adapters/copilot/adapter.js.map +1 -1
- package/dist/adapters/cursor/adapter.d.ts +8 -6
- package/dist/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/adapters/cursor/adapter.js +47 -130
- package/dist/adapters/cursor/adapter.js.map +1 -1
- package/dist/adapters/doc-generator.d.ts +69 -0
- package/dist/adapters/doc-generator.d.ts.map +1 -0
- package/dist/adapters/doc-generator.js +247 -0
- package/dist/adapters/doc-generator.js.map +1 -0
- package/dist/adapters/gemini/adapter.d.ts +50 -0
- package/dist/adapters/gemini/adapter.d.ts.map +1 -0
- package/dist/adapters/gemini/adapter.js +281 -0
- package/dist/adapters/gemini/adapter.js.map +1 -0
- package/dist/adapters/generic/adapter.d.ts +7 -4
- package/dist/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/adapters/generic/adapter.js +60 -59
- package/dist/adapters/generic/adapter.js.map +1 -1
- package/dist/cli/commands/init.d.ts +3 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +272 -170
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +22 -58
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.d.ts.map +1 -1
- package/dist/cli/commands/list.js +27 -64
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/core/credentials-manager.d.ts +90 -0
- package/dist/core/credentials-manager.d.ts.map +1 -0
- package/dist/core/credentials-manager.js +271 -0
- package/dist/core/credentials-manager.js.map +1 -0
- package/dist/core/project-structure-detector.d.ts +92 -0
- package/dist/core/project-structure-detector.d.ts.map +1 -0
- package/dist/core/project-structure-detector.js +289 -0
- package/dist/core/project-structure-detector.js.map +1 -0
- package/dist/core/rfc-generator-v2.d.ts +149 -0
- package/dist/core/rfc-generator-v2.d.ts.map +1 -0
- package/dist/core/rfc-generator-v2.js +399 -0
- package/dist/core/rfc-generator-v2.js.map +1 -0
- package/dist/core/rfc-generator.d.ts +147 -0
- package/dist/core/rfc-generator.d.ts.map +1 -0
- package/dist/core/rfc-generator.js +434 -0
- package/dist/core/rfc-generator.js.map +1 -0
- package/dist/integrations/ado/ado-client.d.ts +123 -0
- package/dist/integrations/ado/ado-client.d.ts.map +1 -0
- package/dist/integrations/ado/ado-client.js +398 -0
- package/dist/integrations/ado/ado-client.js.map +1 -0
- package/dist/integrations/jira/jira-client.d.ts +139 -0
- package/dist/integrations/jira/jira-client.d.ts.map +1 -0
- package/dist/integrations/jira/jira-client.js +386 -0
- package/dist/integrations/jira/jira-client.js.map +1 -0
- package/dist/integrations/jira/jira-incremental-mapper.d.ts +75 -0
- package/dist/integrations/jira/jira-incremental-mapper.d.ts.map +1 -0
- package/dist/integrations/jira/jira-incremental-mapper.js +474 -0
- package/dist/integrations/jira/jira-incremental-mapper.js.map +1 -0
- package/dist/integrations/jira/jira-mapper.d.ts +105 -0
- package/dist/integrations/jira/jira-mapper.d.ts.map +1 -0
- package/dist/integrations/jira/jira-mapper.js +494 -0
- package/dist/integrations/jira/jira-mapper.js.map +1 -0
- package/dist/testing/test-generator.d.ts +117 -0
- package/dist/testing/test-generator.d.ts.map +1 -0
- package/dist/testing/test-generator.js +370 -0
- package/dist/testing/test-generator.js.map +1 -0
- package/dist/utils/auto-install.d.ts +3 -0
- package/dist/utils/auto-install.d.ts.map +1 -1
- package/dist/utils/auto-install.js +16 -82
- package/dist/utils/auto-install.js.map +1 -1
- package/dist/utils/esm-helpers.d.ts +50 -0
- package/dist/utils/esm-helpers.d.ts.map +1 -0
- package/dist/utils/esm-helpers.js +57 -0
- package/dist/utils/esm-helpers.js.map +1 -0
- package/package.json +16 -7
- package/src/adapters/README.md +1 -2
- package/src/adapters/adapter-base.ts +6 -3
- package/src/adapters/adapter-loader.ts +261 -0
- package/src/adapters/agents-md-generator.ts +162 -0
- package/src/adapters/claude/README.md +6 -14
- package/src/adapters/claude/adapter.ts +4 -4
- package/src/adapters/claude-md-generator.ts +311 -0
- package/src/adapters/codex/README.md +105 -0
- package/src/adapters/codex/adapter.ts +333 -0
- package/src/adapters/copilot/adapter.ts +36 -65
- package/src/adapters/cursor/README.md +0 -2
- package/src/adapters/cursor/adapter.ts +46 -92
- package/src/adapters/doc-generator.ts +331 -0
- package/src/adapters/gemini/README.md +97 -0
- package/src/adapters/gemini/adapter.ts +298 -0
- package/src/adapters/generic/adapter.ts +61 -57
- package/src/adapters/registry.yaml +86 -25
- package/src/agents/devops/AGENT.md +16 -18
- package/src/agents/docs-writer/AGENT.md +2 -2
- package/src/agents/pm/AGENT.md +1 -50
- package/src/commands/README.md +134 -111
- package/src/commands/{build.md → specweave.do.md} +141 -69
- package/src/commands/{done.md → specweave.done.md} +3 -3
- package/src/commands/{inc.md → specweave.inc.md} +4 -4
- package/src/commands/{increment.md → specweave.increment.md} +143 -76
- package/src/commands/specweave.md +430 -0
- package/src/commands/specweave.next.md +495 -0
- package/src/commands/{progress.md → specweave.progress.md} +12 -12
- package/src/commands/specweave.sync-docs.md +665 -0
- package/src/commands/specweave.sync-github.md +269 -0
- package/src/commands/specweave.sync-jira.md +197 -0
- package/src/commands/{validate.md → specweave.validate.md} +4 -4
- package/src/hooks/README.md +19 -29
- package/src/hooks/post-task-completion.sh +25 -30
- package/src/skills/ado-sync/README.md +1 -36
- package/src/skills/bmad-method-expert/SKILL.md +1 -3
- package/src/skills/brownfield-analyzer/SKILL.md +429 -23
- package/src/skills/brownfield-onboarder/SKILL.md +221 -8
- package/src/skills/context-loader/SKILL.md +239 -617
- package/src/skills/context-optimizer/SKILL.md +0 -30
- package/src/skills/github-sync/SKILL.md +1 -19
- package/src/skills/increment-planner/SKILL.md +64 -18
- package/src/skills/increment-quality-judge/SKILL.md +1 -36
- package/src/skills/jira-sync/README.md +1 -38
- package/src/skills/role-orchestrator/README.md +1 -22
- package/src/skills/role-orchestrator/SKILL.md +1 -59
- package/src/skills/skill-router/SKILL.md +0 -18
- package/src/skills/spec-kit-expert/SKILL.md +1 -3
- package/src/skills/specweave-detector/SKILL.md +225 -275
- package/src/skills/task-builder/README.md +1 -7
- package/src/templates/AGENTS.md.template +334 -0
- package/src/templates/CLAUDE.md.template +131 -298
- package/src/templates/README.md.template +115 -23
- package/src/templates/environments/minimal/README.md +0 -1
- package/INSTALL.md +0 -848
- package/SPECWEAVE.md +0 -743
- package/src/adapters/copilot/.github/copilot/instructions.md +0 -376
- package/src/adapters/cursor/.cursorrules +0 -325
- package/src/adapters/generic/SPECWEAVE-MANUAL.md +0 -676
- package/src/commands/create-project.md +0 -528
- package/src/commands/generate-docs.md +0 -623
- package/src/commands/review-docs.md +0 -331
- package/src/commands/sync-github.md +0 -115
- package/src/skills/ado-sync/test-cases/test-1.yaml +0 -9
- package/src/skills/ado-sync/test-cases/test-2.yaml +0 -8
- package/src/skills/ado-sync/test-cases/test-3.yaml +0 -9
- package/src/skills/bmad-method-expert/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/bmad-method-expert/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/bmad-method-expert/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/brownfield-analyzer/test-cases/test-1-basic-analysis.yaml +0 -48
- package/src/skills/brownfield-analyzer/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/brownfield-analyzer/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/brownfield-onboarder/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/brownfield-onboarder/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/brownfield-onboarder/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/calendar-system/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/calendar-system/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/calendar-system/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/context-loader/test-cases/test-1-basic-loading.yaml +0 -39
- package/src/skills/context-loader/test-cases/test-2-token-budget-exceeded.yaml +0 -44
- package/src/skills/context-loader/test-cases/test-3-section-anchors.yaml +0 -45
- package/src/skills/context-optimizer/test-cases/test-1-bug-fix-narrow.yaml +0 -97
- package/src/skills/context-optimizer/test-cases/test-2-feature-focused.yaml +0 -109
- package/src/skills/context-optimizer/test-cases/test-3-architecture-broad.yaml +0 -98
- package/src/skills/cost-optimizer/test-cases/test-1-basic-comparison.yaml +0 -75
- package/src/skills/cost-optimizer/test-cases/test-2-budget-constraint.yaml +0 -52
- package/src/skills/cost-optimizer/test-cases/test-3-scale-requirement.yaml +0 -63
- package/src/skills/cost-optimizer/test-results/README.md +0 -46
- package/src/skills/design-system-architect/test-cases/test-1-token-structure.yaml +0 -23
- package/src/skills/design-system-architect/test-cases/test-2-component-hierarchy.yaml +0 -24
- package/src/skills/design-system-architect/test-cases/test-3-accessibility-checklist.yaml +0 -23
- package/src/skills/diagrams-architect/test-cases/test-1-c4-context.yaml +0 -13
- package/src/skills/diagrams-architect/test-cases/test-2-sequence-diagram.yaml +0 -13
- package/src/skills/diagrams-architect/test-cases/test-3-er-diagram.yaml +0 -13
- package/src/skills/diagrams-generator/test-cases/test-1.yaml +0 -9
- package/src/skills/diagrams-generator/test-cases/test-2.yaml +0 -9
- package/src/skills/diagrams-generator/test-cases/test-3.yaml +0 -8
- package/src/skills/docs-updater/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/docs-updater/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/docs-updater/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/dotnet-backend/test-cases/test-1-rest-api.yaml +0 -14
- package/src/skills/dotnet-backend/test-cases/test-2-authentication.yaml +0 -13
- package/src/skills/dotnet-backend/test-cases/test-3-minimal-api.yaml +0 -13
- package/src/skills/e2e-playwright/test-cases/TC-001-basic-navigation.yaml +0 -54
- package/src/skills/e2e-playwright/test-cases/TC-002-form-interaction.yaml +0 -64
- package/src/skills/e2e-playwright/test-cases/TC-003-specweave-integration.yaml +0 -74
- package/src/skills/e2e-playwright/test-cases/TC-004-accessibility-check.yaml +0 -98
- package/src/skills/figma-designer/test-cases/test-1-design-system.yaml +0 -13
- package/src/skills/figma-designer/test-cases/test-2-component-library.yaml +0 -13
- package/src/skills/figma-designer/test-cases/test-3-responsive-layout.yaml +0 -13
- package/src/skills/figma-implementer/test-cases/test-1-design-to-react.yaml +0 -13
- package/src/skills/figma-implementer/test-cases/test-2-storybook.yaml +0 -13
- package/src/skills/figma-implementer/test-cases/test-3-design-tokens.yaml +0 -13
- package/src/skills/figma-mcp-connector/test-cases/test-1-read-file-desktop.yaml +0 -22
- package/src/skills/figma-mcp-connector/test-cases/test-2-read-file-framelink.yaml +0 -21
- package/src/skills/figma-mcp-connector/test-cases/test-3-error-handling.yaml +0 -18
- package/src/skills/figma-to-code/test-cases/test-1-token-generation.yaml +0 -29
- package/src/skills/figma-to-code/test-cases/test-2-component-generation.yaml +0 -27
- package/src/skills/figma-to-code/test-cases/test-3-typescript-generation.yaml +0 -28
- package/src/skills/frontend/test-cases/test-1-react-component.yaml +0 -13
- package/src/skills/frontend/test-cases/test-2-form-validation.yaml +0 -13
- package/src/skills/frontend/test-cases/test-3-state-management.yaml +0 -13
- package/src/skills/github-sync/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/github-sync/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/github-sync/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/hetzner-provisioner/test-cases/test-1-basic-provision.yaml +0 -71
- package/src/skills/hetzner-provisioner/test-cases/test-2-postgres-provision.yaml +0 -85
- package/src/skills/hetzner-provisioner/test-cases/test-3-ssl-config.yaml +0 -126
- package/src/skills/hetzner-provisioner/test-results/README.md +0 -259
- package/src/skills/increment-planner/test-cases/test-1-basic-feature.yaml +0 -27
- package/src/skills/increment-planner/test-cases/test-2-complex-feature.yaml +0 -30
- package/src/skills/increment-planner/test-cases/test-3-auto-numbering.yaml +0 -24
- package/src/skills/increment-quality-judge/test-cases/test-1-good-spec.yaml +0 -95
- package/src/skills/increment-quality-judge/test-cases/test-2-poor-spec.yaml +0 -108
- package/src/skills/increment-quality-judge/test-cases/test-3-export-suggestions.yaml +0 -87
- package/src/skills/jira-sync/test-cases/test-1.yaml +0 -9
- package/src/skills/jira-sync/test-cases/test-2.yaml +0 -9
- package/src/skills/jira-sync/test-cases/test-3.yaml +0 -10
- package/src/skills/nextjs/test-cases/test-1-app-router.yaml +0 -13
- package/src/skills/nextjs/test-cases/test-2-server-actions.yaml +0 -13
- package/src/skills/nextjs/test-cases/test-3-api-routes.yaml +0 -13
- package/src/skills/nodejs-backend/test-cases/test-1-express-api.yaml +0 -13
- package/src/skills/nodejs-backend/test-cases/test-2-prisma-orm.yaml +0 -13
- package/src/skills/nodejs-backend/test-cases/test-3-authentication.yaml +0 -13
- package/src/skills/notification-system/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/notification-system/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/notification-system/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/python-backend/test-cases/test-1-fastapi-crud.yaml +0 -13
- package/src/skills/python-backend/test-cases/test-2-sqlalchemy.yaml +0 -13
- package/src/skills/python-backend/test-cases/test-3-authentication.yaml +0 -13
- package/src/skills/role-orchestrator/test-cases/test-1-simple-product.yaml +0 -98
- package/src/skills/role-orchestrator/test-cases/test-2-quality-gate-failure.yaml +0 -73
- package/src/skills/role-orchestrator/test-cases/test-3-security-workflow.yaml +0 -121
- package/src/skills/role-orchestrator/test-cases/test-4-parallel-execution.yaml +0 -145
- package/src/skills/role-orchestrator/test-cases/test-5-feedback-loops.yaml +0 -149
- package/src/skills/skill-creator/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/skill-creator/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/skill-creator/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/skill-router/test-cases/test-1-basic-routing.yaml +0 -33
- package/src/skills/skill-router/test-cases/test-2-ambiguous-request.yaml +0 -42
- package/src/skills/skill-router/test-cases/test-3-nested-orchestration.yaml +0 -50
- package/src/skills/spec-driven-brainstorming/test-cases/TC-001-simple-idea-to-design.yaml +0 -148
- package/src/skills/spec-driven-brainstorming/test-cases/TC-002-complex-ultrathink-design.yaml +0 -190
- package/src/skills/spec-driven-brainstorming/test-cases/TC-003-unclear-requirements-socratic.yaml +0 -233
- package/src/skills/spec-driven-debugging/test-cases/TC-001-simple-auth-bug.yaml +0 -212
- package/src/skills/spec-driven-debugging/test-cases/TC-002-race-condition-ultrathink.yaml +0 -461
- package/src/skills/spec-driven-debugging/test-cases/TC-003-brownfield-missing-spec.yaml +0 -366
- package/src/skills/spec-kit-expert/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/spec-kit-expert/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/spec-kit-expert/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/specweave-ado-mapper/test-cases/test-1-export-to-ado.yaml +0 -13
- package/src/skills/specweave-ado-mapper/test-cases/test-2-import-from-ado.yaml +0 -13
- package/src/skills/specweave-ado-mapper/test-cases/test-3-bidirectional-sync.yaml +0 -13
- package/src/skills/specweave-detector/test-cases/test-1-basic-detection.yaml +0 -37
- package/src/skills/specweave-detector/test-cases/test-2-missing-config.yaml +0 -37
- package/src/skills/specweave-detector/test-cases/test-3-non-specweave-project.yaml +0 -34
- package/src/skills/specweave-jira-mapper/test-cases/test-1-export-to-jira.yaml +0 -13
- package/src/skills/specweave-jira-mapper/test-cases/test-2-import-from-jira.yaml +0 -13
- package/src/skills/specweave-jira-mapper/test-cases/test-3-sync-status.yaml +0 -13
- package/src/skills/stripe-integrator/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/stripe-integrator/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/stripe-integrator/test-cases/test-3-placeholder.yaml +0 -12
- package/src/skills/task-builder/test-cases/test-1-placeholder.yaml +0 -12
- package/src/skills/task-builder/test-cases/test-2-placeholder.yaml +0 -12
- package/src/skills/task-builder/test-cases/test-3-placeholder.yaml +0 -12
- package/src/templates/config.yaml +0 -351
- /package/src/commands/{list-increments.md → specweave.list-increments.md} +0 -0
|
@@ -0,0 +1,665 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: specweave.sync-docs
|
|
3
|
+
description: Bidirectional documentation sync - review strategic docs before implementation OR update living docs from completed increments with conflict resolution
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Sync Documentation
|
|
7
|
+
|
|
8
|
+
You are executing the SpecWeave documentation sync command. This handles bidirectional documentation synchronization between increments and living docs.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## STEP 1: Parse Arguments and Detect Mode
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Arguments provided: [user's arguments]
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Parse the input**:
|
|
19
|
+
- Check for explicit mode: `review`, `update`, or none (auto-detect)
|
|
20
|
+
- Check for increment ID: `0001`, `0002`, etc., or none (find current)
|
|
21
|
+
|
|
22
|
+
**Auto-detect logic**:
|
|
23
|
+
|
|
24
|
+
1. **If increment ID provided**:
|
|
25
|
+
```bash
|
|
26
|
+
# Read the increment's spec.md to check status
|
|
27
|
+
INCREMENT_PATH=".specweave/increments/{increment_id}"
|
|
28
|
+
STATUS=$(grep "^status:" "$INCREMENT_PATH/spec.md" | cut -d: -f2 | tr -d ' ')
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
2. **If no increment ID provided**:
|
|
32
|
+
```bash
|
|
33
|
+
# Find the most recent increment
|
|
34
|
+
LATEST=$(ls -1 .specweave/increments/ | grep -E '^[0-9]{4}' | sort -r | head -1)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3. **Determine mode**:
|
|
38
|
+
```
|
|
39
|
+
If status = "planned" → REVIEW MODE
|
|
40
|
+
If status = "in-progress" → UPDATE MODE
|
|
41
|
+
If status = "completed" → UPDATE MODE
|
|
42
|
+
If status = "closed" → UPDATE MODE
|
|
43
|
+
|
|
44
|
+
If explicit mode provided → Use that mode
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Output**:
|
|
48
|
+
```
|
|
49
|
+
🔍 Detected increment: {increment_id}
|
|
50
|
+
📊 Status: {status}
|
|
51
|
+
🎯 Mode: {REVIEW or UPDATE}
|
|
52
|
+
|
|
53
|
+
Proceeding with {mode} mode...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## STEP 2A: REVIEW MODE (Pre-Implementation)
|
|
59
|
+
|
|
60
|
+
**Execute this if mode = REVIEW**
|
|
61
|
+
|
|
62
|
+
### Review Mode Purpose
|
|
63
|
+
Present strategic documentation to user for approval before implementation starts.
|
|
64
|
+
|
|
65
|
+
### Execution Steps:
|
|
66
|
+
|
|
67
|
+
1. **Locate increment folder**:
|
|
68
|
+
```bash
|
|
69
|
+
INCREMENT_DIR=".specweave/increments/{increment_id}"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
2. **Read all strategic documentation**:
|
|
73
|
+
```bash
|
|
74
|
+
# Required files
|
|
75
|
+
SPEC_MD="$INCREMENT_DIR/spec.md"
|
|
76
|
+
|
|
77
|
+
# Optional files
|
|
78
|
+
PM_ANALYSIS="$INCREMENT_DIR/pm-analysis.md"
|
|
79
|
+
ARCHITECTURE="$INCREMENT_DIR/architecture.md"
|
|
80
|
+
INFRASTRUCTURE="$INCREMENT_DIR/infrastructure.md"
|
|
81
|
+
SECURITY="$INCREMENT_DIR/security.md"
|
|
82
|
+
TEST_STRATEGY="$INCREMENT_DIR/test-strategy.md"
|
|
83
|
+
PLAN="$INCREMENT_DIR/plan.md"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
3. **Read related ADRs**:
|
|
87
|
+
```bash
|
|
88
|
+
# Check for ADRs referenced in plan.md or architecture.md
|
|
89
|
+
ADR_DIR=".specweave/docs/internal/architecture/adr"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
4. **Present comprehensive summary**:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
═══════════════════════════════════════════════════════
|
|
96
|
+
📋 STRATEGIC DOCUMENTATION REVIEW
|
|
97
|
+
═══════════════════════════════════════════════════════
|
|
98
|
+
|
|
99
|
+
Increment: {increment_id}
|
|
100
|
+
Title: {title from spec.md}
|
|
101
|
+
Priority: {priority from spec.md}
|
|
102
|
+
Status: {status from spec.md}
|
|
103
|
+
|
|
104
|
+
───────────────────────────────────────────────────────
|
|
105
|
+
✅ PRODUCT SPECIFICATION (spec.md)
|
|
106
|
+
───────────────────────────────────────────────────────
|
|
107
|
+
|
|
108
|
+
[Summarize spec.md content - user stories, requirements, acceptance criteria]
|
|
109
|
+
|
|
110
|
+
{If pm-analysis.md exists:}
|
|
111
|
+
───────────────────────────────────────────────────────
|
|
112
|
+
✅ PRODUCT STRATEGY (pm-analysis.md)
|
|
113
|
+
───────────────────────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
User Personas:
|
|
116
|
+
[List personas with needs and pain points]
|
|
117
|
+
|
|
118
|
+
Business Model:
|
|
119
|
+
[Revenue model, target metrics]
|
|
120
|
+
|
|
121
|
+
Feature Prioritization:
|
|
122
|
+
[P1/P2/P3 breakdown]
|
|
123
|
+
|
|
124
|
+
Success Metrics:
|
|
125
|
+
[Key metrics to track]
|
|
126
|
+
|
|
127
|
+
{If architecture.md exists:}
|
|
128
|
+
───────────────────────────────────────────────────────
|
|
129
|
+
✅ SYSTEM ARCHITECTURE (architecture.md)
|
|
130
|
+
───────────────────────────────────────────────────────
|
|
131
|
+
|
|
132
|
+
Tech Stack:
|
|
133
|
+
[List detected or specified tech stack]
|
|
134
|
+
|
|
135
|
+
System Design:
|
|
136
|
+
[Show Mermaid diagram if present, or describe architecture]
|
|
137
|
+
|
|
138
|
+
Data Models:
|
|
139
|
+
[List key entities and relationships]
|
|
140
|
+
|
|
141
|
+
API Design:
|
|
142
|
+
[List key endpoints or interfaces]
|
|
143
|
+
|
|
144
|
+
Scalability Considerations:
|
|
145
|
+
[Performance targets, scaling strategy]
|
|
146
|
+
|
|
147
|
+
{If ADRs referenced:}
|
|
148
|
+
───────────────────────────────────────────────────────
|
|
149
|
+
✅ ARCHITECTURE DECISIONS (ADRs)
|
|
150
|
+
───────────────────────────────────────────────────────
|
|
151
|
+
|
|
152
|
+
[For each ADR mentioned in plan.md:]
|
|
153
|
+
ADR {number}: {title}
|
|
154
|
+
- Decision: {what was decided}
|
|
155
|
+
- Rationale: {why}
|
|
156
|
+
- Trade-offs: {consequences}
|
|
157
|
+
|
|
158
|
+
{If infrastructure.md exists:}
|
|
159
|
+
───────────────────────────────────────────────────────
|
|
160
|
+
✅ INFRASTRUCTURE (infrastructure.md)
|
|
161
|
+
───────────────────────────────────────────────────────
|
|
162
|
+
|
|
163
|
+
Platform: {platform choice}
|
|
164
|
+
Resources: {compute, storage, database specs}
|
|
165
|
+
Deployment: {deployment strategy}
|
|
166
|
+
Monitoring: {monitoring tools}
|
|
167
|
+
Cost Estimate: {monthly cost breakdown}
|
|
168
|
+
|
|
169
|
+
{If security.md exists:}
|
|
170
|
+
───────────────────────────────────────────────────────
|
|
171
|
+
✅ SECURITY (security.md)
|
|
172
|
+
───────────────────────────────────────────────────────
|
|
173
|
+
|
|
174
|
+
Authentication: {auth strategy}
|
|
175
|
+
Authorization: {authz strategy}
|
|
176
|
+
Data Protection: {encryption, GDPR compliance}
|
|
177
|
+
Security Testing: {security test plan}
|
|
178
|
+
|
|
179
|
+
{If test-strategy.md exists:}
|
|
180
|
+
───────────────────────────────────────────────────────
|
|
181
|
+
✅ TEST STRATEGY (test-strategy.md)
|
|
182
|
+
───────────────────────────────────────────────────────
|
|
183
|
+
|
|
184
|
+
Test Pyramid:
|
|
185
|
+
[E2E, Integration, Unit test breakdown]
|
|
186
|
+
|
|
187
|
+
Coverage Target: {target %}
|
|
188
|
+
|
|
189
|
+
Critical Paths:
|
|
190
|
+
[List critical user journeys to test]
|
|
191
|
+
|
|
192
|
+
{If plan.md exists:}
|
|
193
|
+
───────────────────────────────────────────────────────
|
|
194
|
+
⏱️ IMPLEMENTATION PLAN (plan.md)
|
|
195
|
+
───────────────────────────────────────────────────────
|
|
196
|
+
|
|
197
|
+
Total Tasks: {count}
|
|
198
|
+
Estimated Time: {estimate}
|
|
199
|
+
|
|
200
|
+
Phases:
|
|
201
|
+
[List implementation phases with task ranges]
|
|
202
|
+
|
|
203
|
+
───────────────────────────────────────────────────────
|
|
204
|
+
💰 COST & TIMELINE SUMMARY
|
|
205
|
+
───────────────────────────────────────────────────────
|
|
206
|
+
|
|
207
|
+
Infrastructure: ${monthly cost}/month
|
|
208
|
+
External Services: ${services cost}/month
|
|
209
|
+
Total Monthly: ${total}/month
|
|
210
|
+
|
|
211
|
+
Development Time: {weeks} weeks
|
|
212
|
+
Launch Target: {date estimate}
|
|
213
|
+
|
|
214
|
+
═══════════════════════════════════════════════════════
|
|
215
|
+
|
|
216
|
+
❓ Do you approve this plan?
|
|
217
|
+
|
|
218
|
+
Options:
|
|
219
|
+
✅ Type "approve" - Proceed with implementation
|
|
220
|
+
⚠️ Type "changes" - Request specific updates
|
|
221
|
+
📋 Type "questions" - Ask clarifying questions
|
|
222
|
+
🔄 Type "regenerate" - Regenerate strategic analysis
|
|
223
|
+
|
|
224
|
+
───────────────────────────────────────────────────────
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
5. **Wait for user response**:
|
|
228
|
+
- If "approve" → Say: "✅ Strategic documentation approved. Ready to proceed with `/do` command."
|
|
229
|
+
- If "changes" → Ask: "What would you like to change? (architecture/features/security/infrastructure/other)"
|
|
230
|
+
- If "questions" → Ask: "What questions do you have?"
|
|
231
|
+
- If "regenerate" → Ask: "Which section should I regenerate?"
|
|
232
|
+
|
|
233
|
+
**STOP HERE for review mode** - Do not proceed to update mode.
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## STEP 2B: UPDATE MODE (Post-Implementation)
|
|
238
|
+
|
|
239
|
+
**Execute this if mode = UPDATE**
|
|
240
|
+
|
|
241
|
+
### Update Mode Purpose
|
|
242
|
+
Synchronize living documentation in `.specweave/docs/` with learnings and decisions from completed or in-progress increment.
|
|
243
|
+
|
|
244
|
+
### Execution Steps:
|
|
245
|
+
|
|
246
|
+
#### 1. Analyze Increment Artifacts
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
INCREMENT_DIR=".specweave/increments/{increment_id}"
|
|
250
|
+
|
|
251
|
+
# Read all increment files
|
|
252
|
+
SPEC="$INCREMENT_DIR/spec.md"
|
|
253
|
+
PLAN="$INCREMENT_DIR/plan.md"
|
|
254
|
+
ARCHITECTURE="$INCREMENT_DIR/architecture.md"
|
|
255
|
+
SECURITY="$INCREMENT_DIR/security.md"
|
|
256
|
+
INFRASTRUCTURE="$INCREMENT_DIR/infrastructure.md"
|
|
257
|
+
REPORTS_DIR="$INCREMENT_DIR/reports"
|
|
258
|
+
|
|
259
|
+
# List all report files
|
|
260
|
+
REPORTS=$(ls -1 "$REPORTS_DIR"/*.md 2>/dev/null)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Extract documentation updates**:
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
Reading increment {increment_id}...
|
|
267
|
+
|
|
268
|
+
📄 Files found:
|
|
269
|
+
✓ spec.md
|
|
270
|
+
{✓ or ✗ for each optional file}
|
|
271
|
+
✓ {count} reports in reports/
|
|
272
|
+
|
|
273
|
+
🔍 Analyzing for documentation updates...
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### 2. Identify Documentation Targets
|
|
277
|
+
|
|
278
|
+
**Map increment content to living docs locations**:
|
|
279
|
+
|
|
280
|
+
```yaml
|
|
281
|
+
# Mapping rules:
|
|
282
|
+
spec.md (new features):
|
|
283
|
+
→ .specweave/docs/public/overview/features.md
|
|
284
|
+
→ .specweave/docs/public/guides/ (if guides section present)
|
|
285
|
+
|
|
286
|
+
spec.md (API changes):
|
|
287
|
+
→ .specweave/docs/public/api/ (if exists)
|
|
288
|
+
|
|
289
|
+
plan.md (architecture decisions):
|
|
290
|
+
→ .specweave/docs/internal/architecture/adr/NNNN-decision-name.md (create new ADR)
|
|
291
|
+
|
|
292
|
+
plan.md (tech stack changes):
|
|
293
|
+
→ .specweave/docs/internal/architecture/README.md
|
|
294
|
+
|
|
295
|
+
architecture.md:
|
|
296
|
+
→ .specweave/docs/internal/architecture/diagrams/ (extract diagrams)
|
|
297
|
+
→ .specweave/docs/internal/architecture/system-design.md
|
|
298
|
+
|
|
299
|
+
security.md:
|
|
300
|
+
→ .specweave/docs/internal/security/
|
|
301
|
+
|
|
302
|
+
infrastructure.md:
|
|
303
|
+
→ .specweave/docs/internal/operations/deployment.md
|
|
304
|
+
→ .specweave/docs/internal/operations/infrastructure.md
|
|
305
|
+
|
|
306
|
+
reports/*.md (learnings):
|
|
307
|
+
→ .specweave/docs/internal/delivery/guides/
|
|
308
|
+
→ .specweave/docs/internal/architecture/ (if architectural learnings)
|
|
309
|
+
|
|
310
|
+
test-strategy.md:
|
|
311
|
+
→ .specweave/docs/internal/testing/
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Output**:
|
|
315
|
+
```
|
|
316
|
+
📊 Documentation updates identified:
|
|
317
|
+
|
|
318
|
+
1. New ADR needed: {decision from plan.md}
|
|
319
|
+
Target: .specweave/docs/internal/architecture/adr/NNNN-{slug}.md
|
|
320
|
+
|
|
321
|
+
2. Feature list update: {feature from spec.md}
|
|
322
|
+
Target: .specweave/docs/public/overview/features.md
|
|
323
|
+
|
|
324
|
+
3. Architecture diagram update: {diagram from architecture.md}
|
|
325
|
+
Target: .specweave/docs/internal/architecture/diagrams/{name}.md
|
|
326
|
+
|
|
327
|
+
{... list all updates}
|
|
328
|
+
|
|
329
|
+
Total: {count} documentation updates
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### 3. Detect Conflicts
|
|
333
|
+
|
|
334
|
+
**For each target file that already exists**:
|
|
335
|
+
|
|
336
|
+
1. **Read existing content**
|
|
337
|
+
2. **Read new content from increment**
|
|
338
|
+
3. **Compare and detect conflicts**:
|
|
339
|
+
|
|
340
|
+
```javascript
|
|
341
|
+
function detectConflict(existingContent, newContent, section) {
|
|
342
|
+
// Types of conflicts:
|
|
343
|
+
|
|
344
|
+
// 1. Addition (no conflict)
|
|
345
|
+
if (!existingContent.includes(section) && newContent.includes(section)) {
|
|
346
|
+
return { type: 'addition', conflict: false };
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// 2. Enhancement (minor conflict - check if contradictory)
|
|
350
|
+
if (existingContent.includes(section) && newContent.includes(section)) {
|
|
351
|
+
// Check if new content contradicts existing
|
|
352
|
+
if (isContradictory(existingContent, newContent)) {
|
|
353
|
+
return { type: 'contradiction', conflict: true };
|
|
354
|
+
} else {
|
|
355
|
+
return { type: 'enhancement', conflict: false };
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// 3. Removal (conflict)
|
|
360
|
+
if (existingContent.includes(section) && !newContent.includes(section)) {
|
|
361
|
+
return { type: 'removal', conflict: true };
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return { type: 'no_change', conflict: false };
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Conflict detection heuristics**:
|
|
369
|
+
- Keywords that indicate contradiction: "instead of", "rather than", "changed from", "no longer", "deprecated"
|
|
370
|
+
- Architecture decisions with different choices (PostgreSQL vs MongoDB)
|
|
371
|
+
- Security policies with different rules
|
|
372
|
+
- API endpoints with different signatures
|
|
373
|
+
|
|
374
|
+
**Output**:
|
|
375
|
+
```
|
|
376
|
+
🔍 Conflict detection results:
|
|
377
|
+
|
|
378
|
+
✅ No conflict: {count} additions/enhancements
|
|
379
|
+
⚠️ Conflicts found: {count} contradictions/removals
|
|
380
|
+
|
|
381
|
+
{If conflicts found, list them}
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
#### 4. Resolve Conflicts (If Any)
|
|
385
|
+
|
|
386
|
+
**For each conflict, present to user**:
|
|
387
|
+
|
|
388
|
+
```
|
|
389
|
+
═══════════════════════════════════════════════════════
|
|
390
|
+
⚠️ CONFLICT #{n}/{total}
|
|
391
|
+
═══════════════════════════════════════════════════════
|
|
392
|
+
|
|
393
|
+
File: {target_file_path}
|
|
394
|
+
Section: {section_name}
|
|
395
|
+
Conflict Type: {contradiction/removal}
|
|
396
|
+
|
|
397
|
+
───────────────────────────────────────────────────────
|
|
398
|
+
📄 EXISTING CONTENT
|
|
399
|
+
───────────────────────────────────────────────────────
|
|
400
|
+
{show existing content with context - 5 lines before/after}
|
|
401
|
+
|
|
402
|
+
───────────────────────────────────────────────────────
|
|
403
|
+
🆕 NEW CONTENT (from increment {increment_id})
|
|
404
|
+
───────────────────────────────────────────────────────
|
|
405
|
+
{show new content with context}
|
|
406
|
+
|
|
407
|
+
───────────────────────────────────────────────────────
|
|
408
|
+
❓ How should I resolve this?
|
|
409
|
+
───────────────────────────────────────────────────────
|
|
410
|
+
|
|
411
|
+
A) Keep existing only
|
|
412
|
+
B) Replace with new only
|
|
413
|
+
C) Merge both (document the evolution)
|
|
414
|
+
D) Show me more context
|
|
415
|
+
E) Skip this update
|
|
416
|
+
|
|
417
|
+
{If architecture decision:}
|
|
418
|
+
💡 Recommendation: Option C - Create new ADR documenting the change
|
|
419
|
+
|
|
420
|
+
Your choice (A/B/C/D/E):
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**Wait for user input, then record decision**
|
|
424
|
+
|
|
425
|
+
#### 5. Apply Updates
|
|
426
|
+
|
|
427
|
+
**For each update (non-conflicting + resolved conflicts)**:
|
|
428
|
+
|
|
429
|
+
1. **If creating new file**:
|
|
430
|
+
```bash
|
|
431
|
+
TARGET_FILE="{path}"
|
|
432
|
+
mkdir -p "$(dirname "$TARGET_FILE")"
|
|
433
|
+
cat > "$TARGET_FILE" <<EOF
|
|
434
|
+
{content}
|
|
435
|
+
EOF
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
Output: `✅ Created: {file_path}`
|
|
439
|
+
|
|
440
|
+
2. **If updating existing file**:
|
|
441
|
+
```bash
|
|
442
|
+
# Backup first
|
|
443
|
+
cp "$TARGET_FILE" "$TARGET_FILE.backup"
|
|
444
|
+
|
|
445
|
+
# Apply update (append, replace section, or merge)
|
|
446
|
+
{update logic based on user choice}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
Output: `✅ Updated: {file_path}`
|
|
450
|
+
|
|
451
|
+
3. **If creating new ADR**:
|
|
452
|
+
```bash
|
|
453
|
+
# Get next ADR number
|
|
454
|
+
NEXT_ADR=$(ls -1 .specweave/docs/internal/architecture/adr/ | grep -E '^[0-9]{4}' | sort -r | head -1 | cut -d- -f1)
|
|
455
|
+
NEXT_ADR=$((NEXT_ADR + 1))
|
|
456
|
+
NEXT_ADR=$(printf "%04d" $NEXT_ADR)
|
|
457
|
+
|
|
458
|
+
ADR_FILE=".specweave/docs/internal/architecture/adr/${NEXT_ADR}-{slug}.md"
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**ADR Template**:
|
|
462
|
+
```markdown
|
|
463
|
+
# ADR-{number}: {Title}
|
|
464
|
+
|
|
465
|
+
**Status**: Accepted
|
|
466
|
+
**Date**: {current_date}
|
|
467
|
+
**Deciders**: {team}
|
|
468
|
+
**Supersedes**: {previous_adr if applicable}
|
|
469
|
+
|
|
470
|
+
## Context
|
|
471
|
+
|
|
472
|
+
{describe the problem/decision point from increment}
|
|
473
|
+
|
|
474
|
+
## Decision
|
|
475
|
+
|
|
476
|
+
{what was decided during implementation}
|
|
477
|
+
|
|
478
|
+
## Rationale
|
|
479
|
+
|
|
480
|
+
{why this decision was made - from plan.md or reports/}
|
|
481
|
+
|
|
482
|
+
## Consequences
|
|
483
|
+
|
|
484
|
+
### Positive
|
|
485
|
+
{benefits}
|
|
486
|
+
|
|
487
|
+
### Negative
|
|
488
|
+
{trade-offs or limitations}
|
|
489
|
+
|
|
490
|
+
## Implementation
|
|
491
|
+
|
|
492
|
+
{how it was implemented - reference increment {increment_id}}
|
|
493
|
+
|
|
494
|
+
## Related
|
|
495
|
+
|
|
496
|
+
- Increment: {increment_id}
|
|
497
|
+
- {other related ADRs}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Output: `✅ Created ADR: {adr_file}`
|
|
501
|
+
|
|
502
|
+
#### 6. Summary Report
|
|
503
|
+
|
|
504
|
+
```
|
|
505
|
+
═══════════════════════════════════════════════════════
|
|
506
|
+
✅ DOCUMENTATION SYNC COMPLETE
|
|
507
|
+
═══════════════════════════════════════════════════════
|
|
508
|
+
|
|
509
|
+
Increment: {increment_id} ({title})
|
|
510
|
+
Status: {status} → Documentation Updated
|
|
511
|
+
|
|
512
|
+
───────────────────────────────────────────────────────
|
|
513
|
+
📊 CHANGES SUMMARY
|
|
514
|
+
───────────────────────────────────────────────────────
|
|
515
|
+
|
|
516
|
+
Created:
|
|
517
|
+
{list of new files with paths}
|
|
518
|
+
Total: {count} files
|
|
519
|
+
|
|
520
|
+
Updated:
|
|
521
|
+
{list of updated files with paths}
|
|
522
|
+
Total: {count} files
|
|
523
|
+
|
|
524
|
+
ADRs Generated:
|
|
525
|
+
{list of new ADRs}
|
|
526
|
+
Total: {count} ADRs
|
|
527
|
+
|
|
528
|
+
Skipped:
|
|
529
|
+
{list of skipped updates due to user choice}
|
|
530
|
+
Total: {count} updates
|
|
531
|
+
|
|
532
|
+
───────────────────────────────────────────────────────
|
|
533
|
+
💾 BACKUPS
|
|
534
|
+
───────────────────────────────────────────────────────
|
|
535
|
+
|
|
536
|
+
{If any files were updated:}
|
|
537
|
+
Backup files created: {count}
|
|
538
|
+
Location: {original_file}.backup
|
|
539
|
+
|
|
540
|
+
To restore: cp {file}.backup {file}
|
|
541
|
+
|
|
542
|
+
───────────────────────────────────────────────────────
|
|
543
|
+
🎯 NEXT STEPS
|
|
544
|
+
───────────────────────────────────────────────────────
|
|
545
|
+
|
|
546
|
+
1. Review updated documentation:
|
|
547
|
+
- Public docs: .specweave/docs/public/
|
|
548
|
+
- Internal docs: .specweave/docs/internal/
|
|
549
|
+
- New ADRs: .specweave/docs/internal/architecture/adr/
|
|
550
|
+
|
|
551
|
+
2. (Optional) Generate Docusaurus site:
|
|
552
|
+
- Use 'docusaurus' skill to publish updated docs
|
|
553
|
+
|
|
554
|
+
3. Commit changes:
|
|
555
|
+
git add .specweave/docs/
|
|
556
|
+
git commit -m "docs: sync from increment {increment_id}"
|
|
557
|
+
|
|
558
|
+
═══════════════════════════════════════════════════════
|
|
559
|
+
|
|
560
|
+
Documentation is now in sync with increment {increment_id}! 🎉
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
---
|
|
564
|
+
|
|
565
|
+
## STEP 3: Configuration Support
|
|
566
|
+
|
|
567
|
+
**Check for user configuration** (optional):
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
**If config exists, respect it**. If not, use defaults shown above.
|
|
572
|
+
|
|
573
|
+
---
|
|
574
|
+
|
|
575
|
+
## ERROR HANDLING
|
|
576
|
+
|
|
577
|
+
### Error: Increment Not Found
|
|
578
|
+
```
|
|
579
|
+
❌ Error: Increment '{increment_id}' not found
|
|
580
|
+
|
|
581
|
+
Available increments:
|
|
582
|
+
{list .specweave/increments/*/}
|
|
583
|
+
|
|
584
|
+
Usage: /sync-docs [review|update] [increment_id]
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
### Error: No Increment Files
|
|
588
|
+
```
|
|
589
|
+
❌ Error: Increment '{increment_id}' has no spec.md
|
|
590
|
+
|
|
591
|
+
This increment may be incomplete. Expected files:
|
|
592
|
+
- spec.md (required)
|
|
593
|
+
- plan.md (optional)
|
|
594
|
+
- architecture.md (optional)
|
|
595
|
+
|
|
596
|
+
Cannot proceed with sync.
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### Error: Invalid Mode
|
|
600
|
+
```
|
|
601
|
+
❌ Error: Invalid mode '{mode}'
|
|
602
|
+
|
|
603
|
+
Valid modes:
|
|
604
|
+
- review (pre-implementation doc review)
|
|
605
|
+
- update (post-implementation doc sync)
|
|
606
|
+
- [none] (auto-detect based on status)
|
|
607
|
+
|
|
608
|
+
Usage: /sync-docs [review|update] [increment_id]
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
---
|
|
612
|
+
|
|
613
|
+
## EXAMPLES
|
|
614
|
+
|
|
615
|
+
### Example 1: Auto-detect mode for current increment
|
|
616
|
+
```
|
|
617
|
+
User: /sync-docs
|
|
618
|
+
|
|
619
|
+
Output:
|
|
620
|
+
🔍 Detected increment: 0002
|
|
621
|
+
📊 Status: completed
|
|
622
|
+
🎯 Mode: UPDATE
|
|
623
|
+
|
|
624
|
+
Proceeding with UPDATE mode...
|
|
625
|
+
{... executes update mode}
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### Example 2: Explicit review mode
|
|
629
|
+
```
|
|
630
|
+
User: /sync-docs review 0003
|
|
631
|
+
|
|
632
|
+
Output:
|
|
633
|
+
🔍 Increment: 0003
|
|
634
|
+
📊 Status: planned
|
|
635
|
+
🎯 Mode: REVIEW
|
|
636
|
+
|
|
637
|
+
{... shows strategic documentation summary}
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
### Example 3: Explicit update mode with increment
|
|
641
|
+
```
|
|
642
|
+
User: /sync-docs update 0002
|
|
643
|
+
|
|
644
|
+
Output:
|
|
645
|
+
🔍 Increment: 0002
|
|
646
|
+
📊 Status: completed
|
|
647
|
+
🎯 Mode: UPDATE
|
|
648
|
+
|
|
649
|
+
{... executes update mode with conflict resolution}
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
---
|
|
653
|
+
|
|
654
|
+
## IMPORTANT NOTES
|
|
655
|
+
|
|
656
|
+
1. **Always show progress**: Keep user informed at each step
|
|
657
|
+
2. **Always ask on conflicts**: Never overwrite without user approval
|
|
658
|
+
3. **Always create backups**: Before modifying existing files
|
|
659
|
+
4. **Always provide summary**: Show what changed at the end
|
|
660
|
+
5. **Never skip validation**: Check files exist before reading
|
|
661
|
+
6. **Never assume structure**: Verify .specweave/docs/ structure exists
|
|
662
|
+
|
|
663
|
+
---
|
|
664
|
+
|
|
665
|
+
**You are now ready to execute this command. Follow the steps above precisely.**
|