@viniciuscarvalho/feature-marker 4.0.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.
Files changed (29) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/bin/feature-marker.js +299 -0
  4. package/dist/agents/feature-marker.md +656 -0
  5. package/dist/feature-marker/.claude/settings.local.json +13 -0
  6. package/dist/feature-marker/SKILL.md +405 -0
  7. package/dist/feature-marker/feature-marker.sh +239 -0
  8. package/dist/feature-marker/install.sh +183 -0
  9. package/dist/feature-marker/lib/config.sh +89 -0
  10. package/dist/feature-marker/lib/dependency-installer.sh +206 -0
  11. package/dist/feature-marker/lib/menu.sh +329 -0
  12. package/dist/feature-marker/lib/platform-detector.sh +105 -0
  13. package/dist/feature-marker/lib/spec-workflow-bridge.sh +383 -0
  14. package/dist/feature-marker/lib/state-manager.sh +168 -0
  15. package/dist/feature-marker/lib/ui.sh +148 -0
  16. package/dist/feature-marker/resources/commit.md +165 -0
  17. package/dist/feature-marker/resources/spec-workflow/ABSTRACTION_PLAN.md +712 -0
  18. package/dist/feature-marker/resources/spec-workflow/README.md +129 -0
  19. package/dist/feature-marker/resources/spec-workflow/references/config.md +201 -0
  20. package/dist/feature-marker/resources/spec-workflow/references/personas.md +165 -0
  21. package/dist/feature-marker/resources/spec-workflow/references/spec-template.md +189 -0
  22. package/dist/feature-marker/resources/spec-workflow/references/spec-writer-integration.md +150 -0
  23. package/dist/feature-marker/resources/spec-workflow/skills/create-worktree/SKILL.md +135 -0
  24. package/dist/feature-marker/resources/spec-workflow/skills/idea-explorer/SKILL.md +107 -0
  25. package/dist/feature-marker/resources/spec-workflow/skills/spec-executor/SKILL.md +367 -0
  26. package/dist/feature-marker/resources/spec-workflow/skills/spec-orchestrator/SKILL.md +398 -0
  27. package/dist/feature-marker/resources/spec-workflow/skills/spec-workflow-init/SKILL.md +331 -0
  28. package/dist/feature-marker/resources/spec-workflow/skills/spec-writer/SKILL.md +379 -0
  29. package/package.json +47 -0
@@ -0,0 +1,712 @@
1
+ # Spec Workflow Abstraction Plan
2
+
3
+ ## Design Philosophy
4
+
5
+ **Core Tension**: Framework structure vs. user philosophy
6
+
7
+ These skills encode a particular way of working (spec-driven, iterative, review-heavy). We want to:
8
+ 1. Preserve this as sensible defaults that work immediately
9
+ 2. Let users override details (paths, commands) without friction
10
+ 3. Let users inject their own philosophy (review criteria, personas, process)
11
+ 4. Avoid forcing our opinions where they don't add value
12
+
13
+ **Guiding Principle**: *Opinionated defaults, open philosophy*
14
+
15
+ The framework provides structure (what phases exist, what artifacts are produced). Users provide philosophy (what makes a good spec, who reviews, when something is "done").
16
+
17
+ ---
18
+
19
+ ## Progressive Disclosure Model
20
+
21
+ Users should be able to engage at the level that matches their needs:
22
+
23
+ ```
24
+ Level 0: Zero Config
25
+ ├── Works out of the box
26
+ ├── Auto-detects project structure
27
+ ├── Uses built-in defaults
28
+ └── Good for: trying it out, simple projects
29
+
30
+ Level 1: Path & Command Config
31
+ ├── Customize paths, build commands, services
32
+ ├── Single config file
33
+ └── Good for: adapting to existing project structure
34
+
35
+ Level 2: Philosophy Customization
36
+ ├── Custom personas, review criteria, templates
37
+ ├── Markdown files injected into prompts
38
+ └── Good for: teams with specific processes
39
+
40
+ Level 3: Workflow Extension
41
+ ├── Skip/add phases, custom hooks
42
+ ├── Compose skills differently
43
+ └── Good for: fundamentally different workflows
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Configuration Architecture
49
+
50
+ ### Where Config Lives
51
+
52
+ **Important**: Configuration lives in the **user's project**, not in the plugin. This follows the same pattern as ESLint, Prettier, TypeScript, etc. - the tool knows where to look, but config is owned by the project.
53
+
54
+ ```
55
+ user-project/ # User's actual codebase
56
+ ├── .claude/
57
+ │ └── spec-workflow/ # Plugin looks here for config
58
+ │ ├── config.yaml # Level 1: Paths, commands, services
59
+ │ ├── philosophy/ # Level 2: Injected into prompts
60
+ │ │ ├── exploration.md # What makes exploration complete?
61
+ │ │ ├── spec-standards.md # What makes a good spec?
62
+ │ │ └── review-criteria.md # What should reviewers focus on?
63
+ │ ├── personas/ # Level 2: Custom reviewer perspectives
64
+ │ │ └── *.md # Each file is a reviewer persona
65
+ │ └── templates/ # Level 2: Custom templates
66
+ │ └── spec.md # Spec document template
67
+ ├── src/
68
+ ├── package.json
69
+ └── ...
70
+ ```
71
+
72
+ **Why this approach:**
73
+ - Config is version-controlled with the project
74
+ - Teammates share the same workflow configuration
75
+ - Different projects can have different configs
76
+ - Not tied to plugin installation or Claude Code settings
77
+
78
+ ### Init Command
79
+
80
+ The plugin provides a `/spec-workflow-init` skill to scaffold config:
81
+
82
+ ```
83
+ /spec-workflow-init
84
+ --minimal # Just config.yaml with comments
85
+ --full # All files with example content
86
+ --philosophy-only # Just philosophy/ and personas/
87
+ ```
88
+
89
+ This creates the `.claude/spec-workflow/` structure with documented examples so users don't start from scratch.
90
+
91
+ ### File Structure
92
+
93
+ ### config.yaml Schema
94
+
95
+ ```yaml
96
+ # .claude/spec-workflow/config.yaml
97
+
98
+ # ─────────────────────────────────────────────────────────────
99
+ # PATHS - Where things live
100
+ # ─────────────────────────────────────────────────────────────
101
+ paths:
102
+ specs: "./specs" # Default: ./specs
103
+ worktrees: "./worktrees" # Default: ./worktrees
104
+ # Philosophy/persona/template dirs default to .claude/spec-workflow/*
105
+
106
+ # ─────────────────────────────────────────────────────────────
107
+ # SERVICES - Your technology stack
108
+ # ─────────────────────────────────────────────────────────────
109
+ # If omitted, auto-detected from project structure
110
+ services:
111
+ backend:
112
+ path: "./backend"
113
+ build: "npm run build"
114
+ test: "npm test"
115
+ lint: "npm run lint"
116
+ patterns: "./backend/AGENTS.md" # Optional: architecture docs
117
+
118
+ frontend:
119
+ path: "./frontend"
120
+ build: "npm run build"
121
+ test: "npm test"
122
+ lint: "npm run lint"
123
+
124
+ # Special key: use '_default' for monorepo root or single-service projects
125
+ _default:
126
+ build: "make build"
127
+ test: "make test"
128
+
129
+ # ─────────────────────────────────────────────────────────────
130
+ # SPEC FORMAT - How specs are named and structured
131
+ # ─────────────────────────────────────────────────────────────
132
+ spec:
133
+ # Naming pattern. Available tokens: {date}, {topic}, {id}
134
+ naming: "{date}-{topic}-spec.md" # Default: YYYY-MM-DD-{topic}-spec.md
135
+
136
+ # Required frontmatter fields (validated before execution)
137
+ requiredFields:
138
+ - status
139
+ - services
140
+
141
+ # Optional frontmatter fields (documented but not required)
142
+ optionalFields:
143
+ - worktree
144
+ - branch
145
+ - reviewers
146
+ - risk
147
+
148
+ # ─────────────────────────────────────────────────────────────
149
+ # REVIEW PROCESS - How specs get reviewed
150
+ # ─────────────────────────────────────────────────────────────
151
+ review:
152
+ # Maximum revision cycles before escalating to user
153
+ maxIterations: 3 # Default: 3
154
+
155
+ # Minimum reviewer consensus for auto-approval (0.0-1.0)
156
+ # Set to 1.0 to always require user approval
157
+ autoApproveThreshold: 0.8 # Default: 0.8
158
+
159
+ # Reviewer selection strategy
160
+ selection:
161
+ # "auto" = select based on spec classification
162
+ # "all" = always use all personas
163
+ # "explicit" = only use personas listed in spec frontmatter
164
+ strategy: "auto" # Default: auto
165
+
166
+ # Minimum reviewers per spec
167
+ minimum: 2 # Default: 2
168
+
169
+ # Maximum reviewers per spec (prevents over-review)
170
+ maximum: 4 # Default: 4
171
+
172
+ # ─────────────────────────────────────────────────────────────
173
+ # EXECUTION - How specs get implemented
174
+ # ─────────────────────────────────────────────────────────────
175
+ execution:
176
+ # Steps per batch before checkpoint
177
+ batchSize: 5 # Default: 5
178
+
179
+ # Checkpoint behavior
180
+ checkpoint:
181
+ # "pause" = always pause for user review
182
+ # "continue" = auto-continue if no issues
183
+ # "smart" = pause on warnings/errors, continue otherwise
184
+ behavior: "smart" # Default: smart
185
+
186
+ # Parallelization
187
+ parallel:
188
+ # Enable spawning sub-agents for parallel work
189
+ enabled: true # Default: true
190
+ # Max concurrent sub-agents
191
+ maxAgents: 3 # Default: 3
192
+
193
+ # ─────────────────────────────────────────────────────────────
194
+ # WORKTREE - Git worktree configuration
195
+ # ─────────────────────────────────────────────────────────────
196
+ worktree:
197
+ # Branch naming pattern. Tokens: {name}, {date}, {spec}
198
+ branchNaming: "{name}" # Default: {name}
199
+
200
+ # Base branch for new worktrees (null = current branch)
201
+ defaultBase: null # Default: null (current branch)
202
+
203
+ # Bootstrap hook - runs after worktree creation
204
+ # Receives environment variables:
205
+ # WORKTREE_PATH - absolute path to the new worktree
206
+ # WORKTREE_NAME - name of the worktree
207
+ # SPEC_FILE - path to spec file (if --spec was provided)
208
+ # BASE_BRANCH - the branch this worktree was created from
209
+ #
210
+ # User's script handles all service-specific setup
211
+ onBootstrap: null # Default: null (no hook)
212
+ # Example: onBootstrap: "./scripts/bootstrap-worktree.sh"
213
+
214
+ # ─────────────────────────────────────────────────────────────
215
+ # WORKFLOW CUSTOMIZATION (Level 3)
216
+ # ─────────────────────────────────────────────────────────────
217
+ workflow:
218
+ # Skip phases entirely
219
+ skip:
220
+ - exploration # Skip idea-explorer, start with spec-writer
221
+ - review # Skip spec-orchestrator review cycle
222
+
223
+ # Require explicit user approval at these points
224
+ requireApproval:
225
+ - beforeExecution
226
+ - afterReview
227
+ ```
228
+
229
+ ---
230
+
231
+ ## Philosophy Injection System
232
+
233
+ ### How It Works
234
+
235
+ Philosophy files are **markdown documents** that get injected into skill prompts at runtime. They let users express *how* they want work done without modifying skill code.
236
+
237
+ The skill sees: `[default instructions] + [user philosophy if present]`
238
+
239
+ ### Philosophy Files
240
+
241
+ #### `philosophy/exploration.md`
242
+ *Injected into idea-explorer*
243
+
244
+ ```markdown
245
+ # Exploration Philosophy
246
+
247
+ ## When is exploration complete?
248
+
249
+ An idea is ready for spec writing when:
250
+ - [ ] The problem is clearly articulated
251
+ - [ ] We've identified who benefits and how
252
+ - [ ] Technical approach is outlined (not detailed)
253
+ - [ ] Major unknowns are called out
254
+ - [ ] Scope is bounded
255
+
256
+ ## Questions we always ask
257
+
258
+ 1. What's the simplest version that delivers value?
259
+ 2. What existing patterns can we reuse?
260
+ 3. What are we explicitly NOT doing?
261
+
262
+ ## Red flags to surface
263
+
264
+ - Scope creep ("while we're at it...")
265
+ - Premature optimization
266
+ - Solutions looking for problems
267
+ ```
268
+
269
+ #### `philosophy/spec-standards.md`
270
+ *Injected into spec-writer*
271
+
272
+ ```markdown
273
+ # Spec Standards
274
+
275
+ ## What makes a good spec?
276
+
277
+ A spec is ready for review when:
278
+ - Someone unfamiliar with the context can implement it
279
+ - Edge cases are explicitly handled or explicitly deferred
280
+ - Testing strategy is clear
281
+ - Rollback plan exists for risky changes
282
+
283
+ ## Our conventions
284
+
285
+ - Implementation steps should be atomic (one concern each)
286
+ - Prefer explicit over clever
287
+ - Include "Why" not just "What"
288
+ ```
289
+
290
+ #### `philosophy/review-criteria.md`
291
+ *Injected into spec-orchestrator and all reviewers*
292
+
293
+ ```markdown
294
+ # Review Criteria
295
+
296
+ ## What reviewers should evaluate
297
+
298
+ 1. **Completeness**: Can this be implemented without guesswork?
299
+ 2. **Correctness**: Does this solve the actual problem?
300
+ 3. **Consistency**: Does this fit our existing patterns?
301
+ 4. **Risk**: Are failure modes addressed?
302
+
303
+ ## Review tone
304
+
305
+ - Assume good intent
306
+ - Ask questions rather than demand changes
307
+ - "Consider..." rather than "You must..."
308
+ - Distinguish blocking issues from suggestions
309
+ ```
310
+
311
+ ### Persona Files
312
+
313
+ Each file in `personas/` defines a reviewer perspective.
314
+
315
+ #### `personas/security.md`
316
+
317
+ ```markdown
318
+ ---
319
+ name: Security Reviewer
320
+ triggers:
321
+ - auth
322
+ - api
323
+ - user-data
324
+ - tokens
325
+ - permissions
326
+ ---
327
+
328
+ # Security Reviewer Persona
329
+
330
+ You are reviewing this spec from a security perspective.
331
+
332
+ ## Your focus areas
333
+
334
+ - Authentication and authorization
335
+ - Data exposure and leakage
336
+ - Input validation
337
+ - Injection vulnerabilities
338
+ - Secure defaults
339
+
340
+ ## Questions to ask
341
+
342
+ - What happens if this is called by an unauthorized user?
343
+ - What data could leak if this fails?
344
+ - Are we validating all external inputs?
345
+
346
+ ## What you DON'T review
347
+
348
+ - Code style, naming conventions
349
+ - Performance (unless security-relevant)
350
+ - Feature completeness
351
+ ```
352
+
353
+ #### `personas/pragmatist.md`
354
+
355
+ ```markdown
356
+ ---
357
+ name: Pragmatist
358
+ triggers:
359
+ - always # This reviewer is always included
360
+ ---
361
+
362
+ # Pragmatist Persona
363
+
364
+ You are the voice of "let's ship it."
365
+
366
+ ## Your focus
367
+
368
+ - Is this the simplest solution?
369
+ - Are we over-engineering?
370
+ - Can we defer complexity?
371
+ - What's the minimum viable version?
372
+
373
+ ## Your questions
374
+
375
+ - Do we need this for v1?
376
+ - What can we hardcode now and make configurable later?
377
+ - Is there a library that does this?
378
+ ```
379
+
380
+ ---
381
+
382
+ ## Argument System
383
+
384
+ Skills accept arguments for one-off overrides that don't warrant config changes.
385
+
386
+ ### Syntax
387
+
388
+ ```
389
+ /skill-name [positional-args] [--flags] [--key=value]
390
+ ```
391
+
392
+ ### Per-Skill Arguments
393
+
394
+ #### idea-explorer
395
+
396
+ ```
397
+ /idea-explorer [topic]
398
+ --depth=<quick|normal|thorough> # How deep to explore (default: normal)
399
+ --skip-yagni # Skip YAGNI checkpoint
400
+ --output=<path> # Write refined idea to file
401
+ ```
402
+
403
+ #### spec-writer
404
+
405
+ ```
406
+ /spec-writer [topic-or-idea-file]
407
+ --mode=<interactive|autonomous> # default: interactive
408
+ --services=<svc1,svc2> # Limit to specific services
409
+ --template=<path> # Use custom template
410
+ --output=<path> # Override output location
411
+ ```
412
+
413
+ #### spec-orchestrator
414
+
415
+ ```
416
+ /spec-orchestrator [spec-file]
417
+ --skip-review # Write spec without review cycle
418
+ --reviewers=<p1,p2> # Use specific personas only
419
+ --max-iterations=<n> # Override max revision cycles
420
+ --require-approval # Always require user approval
421
+ ```
422
+
423
+ #### spec-executor
424
+
425
+ ```
426
+ /spec-executor <spec-file>
427
+ --batch-size=<n> # Steps per checkpoint
428
+ --no-checkpoint # Run without pausing
429
+ --dry-run # Show what would be done
430
+ --resume # Resume from last checkpoint
431
+ --parallel=<true|false> # Enable/disable parallelization
432
+ ```
433
+
434
+ #### create-worktree
435
+
436
+ ```
437
+ /create-worktree <name>
438
+ --spec=<path> # Spec file to copy into worktree
439
+ --base=<branch> # Base branch (default: current)
440
+ --no-bootstrap # Skip onBootstrap hook
441
+ ```
442
+
443
+ ---
444
+
445
+ ## Default Behaviors (Zero-Config)
446
+
447
+ When no configuration exists, skills should still work:
448
+
449
+ ### Auto-Detection
450
+
451
+ ```
452
+ Project Structure Detection:
453
+ ├── package.json found?
454
+ │ ├── Has "workspaces"? → Multi-service, detect each
455
+ │ └── No workspaces? → Single service at root
456
+ ├── Cargo.toml found? → Rust project
457
+ ├── go.mod found? → Go project
458
+ ├── pyproject.toml found? → Python project
459
+ └── Multiple of above? → Multi-service, one per tech
460
+
461
+ Build Command Detection (per service):
462
+ ├── package.json with scripts.build? → npm run build
463
+ ├── Makefile with build target? → make build
464
+ ├── Cargo.toml? → cargo build
465
+ └── Fallback → skip build verification
466
+ ```
467
+
468
+ ### Built-in Personas
469
+
470
+ When no custom personas exist, use these defaults:
471
+
472
+ 1. **Completeness Reviewer** - Can this be implemented without guesswork?
473
+ 2. **Pragmatist** - Is this the simplest solution?
474
+ 3. **Risk Assessor** - What could go wrong?
475
+
476
+ ### Built-in Spec Template
477
+
478
+ A generic template that works for any project:
479
+
480
+ ```markdown
481
+ ---
482
+ status: draft
483
+ services: []
484
+ created: {date}
485
+ ---
486
+
487
+ # {title}
488
+
489
+ ## Problem Statement
490
+ What problem are we solving? Why now?
491
+
492
+ ## Proposed Solution
493
+ High-level approach.
494
+
495
+ ## Design Details
496
+ Technical details, broken into sections as needed.
497
+
498
+ ## Implementation Steps
499
+ | # | Service | Description | Dependencies |
500
+ |---|---------|-------------|--------------|
501
+
502
+ ## Testing Strategy
503
+ How will we verify this works?
504
+
505
+ ## Rollback Plan
506
+ What if this goes wrong?
507
+
508
+ ## Open Questions
509
+ What's still unclear?
510
+ ```
511
+
512
+ ---
513
+
514
+ ## Skill Refactoring Requirements
515
+
516
+ ### idea-explorer
517
+
518
+ **Remove:**
519
+ - Hardcoded `specs/*` path
520
+
521
+ **Add:**
522
+ - Read config for `paths.specs`
523
+ - Accept `--output` argument
524
+ - Inject `philosophy/exploration.md` if present
525
+ - Default behavior unchanged when no config
526
+
527
+ ### spec-orchestrator
528
+
529
+ **Remove:**
530
+ - Hardcoded persona definitions
531
+ - Hardcoded model references ("Sonnet", "Haiku")
532
+
533
+ **Add:**
534
+ - Load personas from `personas/*.md` (fallback to built-in)
535
+ - Read `review.*` config for iteration limits, thresholds
536
+ - Inject `philosophy/review-criteria.md` if present
537
+ - Accept `--reviewers`, `--max-iterations` arguments
538
+
539
+ ### spec-writer
540
+
541
+ **Remove:**
542
+ - "Cut-Specific Considerations" section entirely
543
+ - Hardcoded service paths (`/backend/`, `/ios/`, `/web/`)
544
+ - Hardcoded template reference
545
+
546
+ **Add:**
547
+ - Read `services` from config (fallback to auto-detect)
548
+ - Read `spec.*` config for naming, required fields
549
+ - Load template from `templates/spec.md` (fallback to built-in)
550
+ - Inject `philosophy/spec-standards.md` if present
551
+ - Accept `--mode`, `--services`, `--template` arguments
552
+ - Reference service `patterns` paths from config when available
553
+
554
+ ### spec-executor
555
+
556
+ **Remove:**
557
+ - Hardcoded build commands (`bun run build`, `pnpm build`)
558
+ - Hardcoded worktree path assumption
559
+
560
+ **Add:**
561
+ - Read `services.*.build/test/lint` from config
562
+ - Read `execution.*` config for batch size, checkpoint behavior
563
+ - Read `paths.worktrees` from config
564
+ - Accept `--batch-size`, `--no-checkpoint`, `--dry-run` arguments
565
+ - Auto-detect build commands when not configured
566
+
567
+ ### create-worktree
568
+
569
+ **Remove:**
570
+ - Hardcoded `./worktrees/` path
571
+ - Hardcoded `./scripts/setup-worktree.sh` reference
572
+ - Hardcoded service list and service-specific flags
573
+
574
+ **Add:**
575
+ - Read `paths.worktrees` from config
576
+ - Read `worktree.*` config for branch naming, onBootstrap hook
577
+ - Run `onBootstrap` hook with environment variables (WORKTREE_PATH, WORKTREE_NAME, SPEC_FILE, BASE_BRANCH)
578
+ - Accept `--spec`, `--base`, `--no-bootstrap` arguments
579
+
580
+ ---
581
+
582
+ ## Implementation Phases
583
+
584
+ ### Phase 1: Core Abstraction
585
+ 1. Create config loading utility (with defaults)
586
+ 2. Refactor path references in all skills
587
+ 3. Add argument parsing to all skills
588
+ 4. Test with zero-config (must still work)
589
+
590
+ ### Phase 2: Service Abstraction
591
+ 1. Implement service auto-detection
592
+ 2. Refactor build/test/lint command references
593
+ 3. Add service config to all skills
594
+ 4. Test with various project structures
595
+
596
+ ### Phase 3: Philosophy Injection
597
+ 1. Implement philosophy file loading
598
+ 2. Implement persona file loading
599
+ 3. Refactor spec-orchestrator to use loaded personas
600
+ 4. Create built-in defaults for all philosophy/personas
601
+
602
+ ### Phase 4: Template System
603
+ 1. Implement template loading
604
+ 2. Create built-in spec template
605
+ 3. Refactor spec-writer to use templates
606
+ 4. Document template customization
607
+
608
+ ### Phase 5: Workflow Customization
609
+ 1. Implement phase skipping
610
+ 2. Implement approval gates
611
+ 3. Document advanced customization
612
+ 4. Create example configurations
613
+
614
+ ---
615
+
616
+ ## User Experience Examples
617
+
618
+ ### Example 1: Zero Config (Just Works)
619
+
620
+ ```bash
621
+ # User installs plugin and immediately uses it
622
+ $ /idea-explorer "add user notifications"
623
+ # → Uses auto-detected project structure
624
+ # → Uses built-in exploration philosophy
625
+ # → Outputs to ./specs/ (default)
626
+ ```
627
+
628
+ ### Example 2: Simple Path Override
629
+
630
+ ```yaml
631
+ # .claude/spec-workflow/config.yaml
632
+ paths:
633
+ specs: "./docs/specs"
634
+ worktrees: "./.worktrees"
635
+ ```
636
+
637
+ ```bash
638
+ $ /spec-writer "notifications"
639
+ # → Outputs to ./docs/specs/2024-01-15-notifications-spec.md
640
+ ```
641
+
642
+ ### Example 3: Custom Tech Stack
643
+
644
+ ```yaml
645
+ # .claude/spec-workflow/config.yaml
646
+ services:
647
+ api:
648
+ path: "./services/api"
649
+ build: "cargo build"
650
+ test: "cargo test"
651
+ web:
652
+ path: "./apps/web"
653
+ build: "pnpm build"
654
+ test: "pnpm test"
655
+ ```
656
+
657
+ ```bash
658
+ $ /spec-executor ./specs/my-spec.md
659
+ # → Uses correct build commands for each service
660
+ ```
661
+
662
+ ### Example 4: Custom Review Process
663
+
664
+ ```yaml
665
+ # .claude/spec-workflow/config.yaml
666
+ review:
667
+ maxIterations: 5
668
+ autoApproveThreshold: 1.0 # Always require human approval
669
+ ```
670
+
671
+ ```markdown
672
+ <!-- .claude/spec-workflow/personas/compliance.md -->
673
+ ---
674
+ name: Compliance Reviewer
675
+ triggers: [data, pii, gdpr, user]
676
+ ---
677
+
678
+ You review specs for regulatory compliance...
679
+ ```
680
+
681
+ ```bash
682
+ $ /spec-orchestrator ./specs/user-data-spec.md
683
+ # → Includes compliance reviewer
684
+ # → Never auto-approves
685
+ ```
686
+
687
+ ### Example 5: Different Workflow Entirely
688
+
689
+ ```yaml
690
+ # .claude/spec-workflow/config.yaml
691
+ workflow:
692
+ skip:
693
+ - review # We do reviews in PRs, not specs
694
+ requireApproval:
695
+ - beforeExecution # But always check before implementing
696
+ ```
697
+
698
+ ---
699
+
700
+ ## Open Questions
701
+
702
+ 1. **Config file format**: YAML is human-friendly but adds a dependency. JSON is universal but less readable. Support both?
703
+
704
+ 2. **Philosophy file format**: Pure markdown, or markdown with frontmatter for metadata?
705
+
706
+ 3. **Inheritance**: Should services inherit from a `_default` service config, or require full specification?
707
+
708
+ 4. **Validation**: How strict should config validation be? Warn on unknown keys, or error?
709
+
710
+ 5. **Migration path**: How do existing Cut-specific skills transition? Provide a migration guide?
711
+
712
+ 6. **Skill composition**: Should orchestrator *invoke* writer, or should they be independent with a contract?