specweave 1.0.342 → 1.0.344
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/dist/plugins/specweave-github/lib/github-client-v2.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +3 -0
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/src/adapters/codex/README.md +1 -1
- package/dist/src/adapters/codex/adapter.js +1 -1
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +30 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +1 -1
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +1 -1
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/path-utils.d.ts +24 -1
- package/dist/src/cli/helpers/init/path-utils.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/path-utils.js +75 -0
- package/dist/src/cli/helpers/init/path-utils.js.map +1 -1
- package/dist/src/cli/helpers/init/types.d.ts +14 -0
- package/dist/src/cli/helpers/init/types.d.ts.map +1 -1
- package/dist/src/cli/workers/brownfield-worker.js +1 -1
- package/dist/src/cli/workers/living-docs-worker.js +4 -4
- package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
- package/dist/src/core/lazy-loading/llm-plugin-detector.js +9 -8
- package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
- package/dist/src/core/llm/index.d.ts +2 -2
- package/dist/src/core/llm/index.js +2 -2
- package/dist/src/core/llm/provider-factory.js +3 -3
- package/dist/src/core/llm/provider-factory.js.map +1 -1
- package/dist/src/core/llm/providers/anthropic-provider.js +1 -1
- package/dist/src/core/llm/providers/anthropic-provider.js.map +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.js +1 -1
- package/dist/src/core/llm/providers/bedrock-provider.js.map +1 -1
- package/dist/src/core/llm/providers/claude-code-provider.js +1 -1
- package/dist/src/core/llm/providers/openai-provider.js +1 -1
- package/dist/src/core/llm/providers/openai-provider.js.map +1 -1
- package/dist/src/core/llm/providers/vertex-ai-provider.js +2 -2
- package/dist/src/core/llm/providers/vertex-ai-provider.js.map +1 -1
- package/dist/src/core/llm/types.d.ts +7 -7
- package/dist/src/core/llm/types.d.ts.map +1 -1
- package/dist/src/core/llm/types.js +34 -34
- package/dist/src/core/llm/types.js.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/cost-aggregator.js +3 -7
- package/dist/src/dashboard/server/data/cost-aggregator.js.map +1 -1
- package/dist/src/sync/base-reconciler.d.ts +3 -1
- package/dist/src/sync/base-reconciler.d.ts.map +1 -1
- package/dist/src/sync/base-reconciler.js +33 -22
- package/dist/src/sync/base-reconciler.js.map +1 -1
- package/dist/src/sync/github-reconciler.d.ts +12 -1
- package/dist/src/sync/github-reconciler.d.ts.map +1 -1
- package/dist/src/sync/github-reconciler.js +108 -90
- package/dist/src/sync/github-reconciler.js.map +1 -1
- package/dist/src/types/model-selection.d.ts +3 -3
- package/dist/src/types/model-selection.js +1 -1
- package/dist/src/utils/ascii-diagrams.d.ts +37 -0
- package/dist/src/utils/ascii-diagrams.d.ts.map +1 -0
- package/dist/src/utils/ascii-diagrams.js +294 -0
- package/dist/src/utils/ascii-diagrams.js.map +1 -0
- package/dist/src/utils/model-selection.d.ts +1 -1
- package/dist/src/utils/model-selection.js +2 -2
- package/dist/src/utils/model-selection.js.map +1 -1
- package/dist/src/utils/pricing-constants.d.ts +7 -7
- package/dist/src/utils/pricing-constants.js +5 -5
- package/dist/src/utils/pricing-constants.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/hooks/startup-health-check.sh +4 -56
- package/plugins/specweave/hooks/user-prompt-submit.sh +71 -34
- package/plugins/specweave/lib/vendor/sync/github-reconciler.d.ts +12 -1
- package/plugins/specweave/lib/vendor/sync/github-reconciler.js +108 -90
- package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
- package/plugins/specweave/skills/architect/SKILL.md +56 -0
- package/plugins/specweave/skills/increment/SKILL.md +56 -0
- package/plugins/specweave/skills/plan/SKILL.md +32 -0
- package/plugins/specweave-github/lib/github-client-v2.js +3 -0
- package/plugins/specweave-github/lib/github-client-v2.ts +3 -0
|
@@ -48,6 +48,62 @@ When a service exposes 50+ API endpoints to AI agents, avoid exposing each as a
|
|
|
48
48
|
|
|
49
49
|
**Reference**: ADR-0140 (Code Execution Over Direct MCP Tool Calls) in `.specweave/docs/internal/architecture/adr/`
|
|
50
50
|
|
|
51
|
+
## Markdown Preview Guidelines
|
|
52
|
+
|
|
53
|
+
When presenting **2+ architectural approaches** for the user to choose between, use `AskUserQuestion` with the `markdown` preview field to show ASCII diagrams. This lets the user visually compare structural trade-offs in a side-by-side panel.
|
|
54
|
+
|
|
55
|
+
**When to use**: Any decision point with 2+ options that have structural differences (service layout, schema design, component boundaries, data flow).
|
|
56
|
+
|
|
57
|
+
**When NOT to use**: Simple yes/no questions, single-option confirmations, or text-only trade-offs without structural implications.
|
|
58
|
+
|
|
59
|
+
### Example 1: Service Architecture Decision (Box Diagrams)
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
AskUserQuestion({
|
|
63
|
+
questions: [{
|
|
64
|
+
question: "Which service architecture should we use for the payment system?",
|
|
65
|
+
header: "Architecture",
|
|
66
|
+
multiSelect: false,
|
|
67
|
+
options: [
|
|
68
|
+
{
|
|
69
|
+
label: "Gateway Pattern (Recommended)",
|
|
70
|
+
description: "Single API gateway routes to microservices. Centralized auth, rate limiting.",
|
|
71
|
+
markdown: "┌─────────────┐ ┌─────────────┐\n│ Frontend │────►│ API Gateway │\n│ (Next.js) │ │ (Workers) │\n└─────────────┘ └──────┬──────┘\n ┌────┴────┐\n ┌─────▼───┐ ┌───▼───────┐\n │ Payment │ │ Billing │\n │ Service │ │ Service │\n └─────────┘ └───────────┘"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: "Direct Service Mesh",
|
|
75
|
+
description: "Services communicate directly via mesh. More resilient but complex.",
|
|
76
|
+
markdown: "┌─────────────┐ ┌───────────┐\n│ Frontend │────►│ Payment │\n│ (Next.js) │ ┌─►│ Service │\n└──────┬──────┘ │ └─────┬─────┘\n │ │ │\n │ ┌────┴────┐ │\n └───►│ Billing │◄──┘\n │ Service │\n └─────────┘"
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}]
|
|
80
|
+
})
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Example 2: Database Schema Decision (ASCII Tables)
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
AskUserQuestion({
|
|
87
|
+
questions: [{
|
|
88
|
+
question: "Which schema design should we use for user sessions?",
|
|
89
|
+
header: "Schema",
|
|
90
|
+
multiSelect: false,
|
|
91
|
+
options: [
|
|
92
|
+
{
|
|
93
|
+
label: "Normalized (Recommended)",
|
|
94
|
+
description: "Separate tables with foreign keys. Strict integrity, standard JOINs.",
|
|
95
|
+
markdown: "users sessions\n──────────────── ────────────────────\nid UUID PK id UUID PK\nemail TEXT UNIQUE user_id UUID FK ──► users.id\nname TEXT token TEXT UNIQUE\n expires TIMESTAMP\n\nIndexes: users(email), sessions(token, user_id)"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
label: "Denormalized",
|
|
99
|
+
description: "Single table with embedded session data. Faster reads, no JOINs.",
|
|
100
|
+
markdown: "user_sessions\n──────────────────────────────\nid UUID PK\nemail TEXT UNIQUE\nname TEXT\nsession_token TEXT UNIQUE\nsession_exp TIMESTAMP\nmetadata JSONB\n\nIndexes: user_sessions(email, session_token)"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}]
|
|
104
|
+
})
|
|
105
|
+
```
|
|
106
|
+
|
|
51
107
|
## Delegation
|
|
52
108
|
|
|
53
109
|
After architecture is ready, delegate to domain skills:
|
|
@@ -381,6 +381,62 @@ Tasks: [N] | Domains: [M] | Complexity: [Low/Medium/High]
|
|
|
381
381
|
|
|
382
382
|
See CLAUDE.md Execution Strategy section for the full decision matrix.
|
|
383
383
|
|
|
384
|
+
## Markdown Preview Guidelines
|
|
385
|
+
|
|
386
|
+
When presenting **scope or structure decisions** that have 2+ meaningful options, use `AskUserQuestion` with the `markdown` preview field to show tree diagrams (folder structures) or tables (AC coverage). This helps the user visually compare what each approach delivers.
|
|
387
|
+
|
|
388
|
+
**When to use**: Choosing between increment scopes (MVP vs full), folder structures, or comparing AC coverage across approaches.
|
|
389
|
+
|
|
390
|
+
**When NOT to use**: Simple type classification (feature vs bug), single-option confirmations, or questions without structural implications.
|
|
391
|
+
|
|
392
|
+
### Example 1: Scope Decision with AC Coverage Table
|
|
393
|
+
|
|
394
|
+
```
|
|
395
|
+
AskUserQuestion({
|
|
396
|
+
questions: [{
|
|
397
|
+
question: "Which scope should this increment cover?",
|
|
398
|
+
header: "Scope",
|
|
399
|
+
multiSelect: false,
|
|
400
|
+
options: [
|
|
401
|
+
{
|
|
402
|
+
label: "MVP (Recommended)",
|
|
403
|
+
description: "Core auth flow only. Ship fast, iterate in next increment.",
|
|
404
|
+
markdown: "Task AC Coverage Stories\n────────── ─────────────── ───────\nDB Schema AC-US1-01 US-001\nJWT Utils AC-US1-02 US-001\nLogin API AC-US1-01,03 US-001\nAuth MW AC-US2-01 US-002\n\nTotal: 4 tasks | 2 stories | 4 ACs covered"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
label: "Full Feature",
|
|
408
|
+
description: "Auth + password reset + OAuth. More complete but 3x the work.",
|
|
409
|
+
markdown: "Task AC Coverage Stories\n──────────── ───────────────── ───────\nDB Schema AC-US1-01 US-001\nJWT Utils AC-US1-02 US-001\nLogin API AC-US1-01,03 US-001\nAuth MW AC-US2-01 US-002\nPwd Reset AC-US3-01,02 US-003\nOAuth Flow AC-US4-01,02,03 US-004\nE2E Tests AC-US1-01..US4-03 All\n\nTotal: 7 tasks | 4 stories | 10 ACs covered"
|
|
410
|
+
}
|
|
411
|
+
]
|
|
412
|
+
}]
|
|
413
|
+
})
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
### Example 2: Structure Decision with Tree Preview
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
AskUserQuestion({
|
|
420
|
+
questions: [{
|
|
421
|
+
question: "Which folder structure should we use for this feature?",
|
|
422
|
+
header: "Structure",
|
|
423
|
+
multiSelect: false,
|
|
424
|
+
options: [
|
|
425
|
+
{
|
|
426
|
+
label: "By Domain (Recommended)",
|
|
427
|
+
description: "Group files by business domain. Better for feature isolation.",
|
|
428
|
+
markdown: "src/\n├── auth/\n│ ├── api/\n│ │ ├── login.ts\n│ │ └── register.ts\n│ ├── middleware.ts\n│ └── jwt-utils.ts\n├── billing/\n│ ├── api/\n│ └── stripe-client.ts\n└── shared/\n └── db.ts"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
label: "By Layer",
|
|
432
|
+
description: "Group by technical layer. Familiar MVC-style structure.",
|
|
433
|
+
markdown: "src/\n├── api/\n│ ├── auth.ts\n│ └── billing.ts\n├── middleware/\n│ └── auth.ts\n├── services/\n│ ├── jwt-utils.ts\n│ └── stripe-client.ts\n└── db/\n └── client.ts"
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
}]
|
|
437
|
+
})
|
|
438
|
+
```
|
|
439
|
+
|
|
384
440
|
## Output
|
|
385
441
|
|
|
386
442
|
```
|
|
@@ -235,6 +235,38 @@ Planning for framework features requires different considerations than user apps
|
|
|
235
235
|
- ACTIVE → ACTIVE (regenerate plan/tasks)
|
|
236
236
|
- BACKLOG → (no change - spec.md already exists)
|
|
237
237
|
|
|
238
|
+
## Markdown Preview Guidelines
|
|
239
|
+
|
|
240
|
+
When the execution strategy analysis (Step 6) identifies **2+ viable execution approaches** or when task dependency ordering has meaningful alternatives, use `AskUserQuestion` with the `markdown` preview field to show DAG diagrams of task dependencies.
|
|
241
|
+
|
|
242
|
+
**When to use**: Presenting execution strategy options where the task dependency graph helps visualize parallelism, critical path, or execution order trade-offs.
|
|
243
|
+
|
|
244
|
+
**When NOT to use**: When there's only one viable strategy, or when the choice is purely about tooling (e.g., `/sw:do` vs `/sw:auto`) without structural implications.
|
|
245
|
+
|
|
246
|
+
### Example: Task Execution Strategy with DAG Preview
|
|
247
|
+
|
|
248
|
+
```
|
|
249
|
+
AskUserQuestion({
|
|
250
|
+
questions: [{
|
|
251
|
+
question: "Which execution strategy should we use for this increment?",
|
|
252
|
+
header: "Strategy",
|
|
253
|
+
multiSelect: false,
|
|
254
|
+
options: [
|
|
255
|
+
{
|
|
256
|
+
label: "Parallel (Recommended)",
|
|
257
|
+
description: "Frontend and backend in parallel, merge at integration. 2 parallel lanes.",
|
|
258
|
+
markdown: "T-001 [DB Schema] ──► T-003 [API Routes] ──┐\n ├──► T-006 [E2E Tests]\nT-002 [JWT Utils] ──► T-004 [Middleware] ──┘\n └──► T-005 [Frontend] ──► T-007 [Docs]\n\nCritical path: T-001 → T-003 → T-006\nParallel lanes: 2 | Tasks: 7"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: "Sequential",
|
|
262
|
+
description: "All tasks in order. Simpler but slower, no parallelism.",
|
|
263
|
+
markdown: "T-001 [DB Schema] ──► T-002 [JWT Utils] ──► T-003 [API Routes]\n ──► T-004 [Middleware] ──► T-005 [Frontend]\n ──► T-006 [E2E Tests] ──► T-007 [Docs]\n\nCritical path: T-001 → T-002 → ... → T-007 (all)\nParallel lanes: 0 | Tasks: 7"
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
}]
|
|
267
|
+
})
|
|
268
|
+
```
|
|
269
|
+
|
|
238
270
|
## Related Commands
|
|
239
271
|
|
|
240
272
|
- `/sw:increment` - Create new increment (generates spec.md)
|
|
@@ -336,6 +336,9 @@ ${body}`;
|
|
|
336
336
|
const issue = JSON.parse(result.stdout);
|
|
337
337
|
return {
|
|
338
338
|
...issue,
|
|
339
|
+
// gh CLI returns state as UPPERCASE ("OPEN"/"CLOSED"), normalize to lowercase
|
|
340
|
+
// for consistency with GitHub REST API which uses lowercase
|
|
341
|
+
state: issue.state?.toLowerCase() ?? issue.state,
|
|
339
342
|
html_url: issue.url,
|
|
340
343
|
labels: issue.labels?.map((l) => l.name) || []
|
|
341
344
|
};
|
|
@@ -445,6 +445,9 @@ export class GitHubClientV2 {
|
|
|
445
445
|
const issue = JSON.parse(result.stdout);
|
|
446
446
|
return {
|
|
447
447
|
...issue,
|
|
448
|
+
// gh CLI returns state as UPPERCASE ("OPEN"/"CLOSED"), normalize to lowercase
|
|
449
|
+
// for consistency with GitHub REST API which uses lowercase
|
|
450
|
+
state: issue.state?.toLowerCase() ?? issue.state,
|
|
448
451
|
html_url: issue.url,
|
|
449
452
|
labels: issue.labels?.map((l: any) => l.name) || [],
|
|
450
453
|
};
|