spec-setup
Spec Setup
Usage
$spec-setup
No arguments. Scans the codebase and generates spec files in .workflow/specs/.
Implementation
Step 1: Validate Preconditions
test -d .workflow || exit 1 # E001: not initialized
Verify project contains source files to scan (E002 if empty).
Step 2: Scan Codebase
Detect conventions and tech stack by scanning:
- Package files (
package.json,Cargo.toml,go.mod, etc.) - Config files (
.eslintrc,tsconfig.json,.prettierrc, etc.) - Source structure (directories, naming patterns, import style)
- Test patterns (framework, naming, location)
Step 3: Generate Spec Files
Create .workflow/specs/ directory and write:
coding-conventions.md-- Detected naming, import, formatting patternsarchitecture-constraints.md-- Structural rules, layer boundariesquality-rules.md-- Linting, testing, coverage requirementslearnings.md-- Initialized with format instructions for future entries
Step 4: Generate Tech Profile
Read template from ~/.maestro/templates/project-tech.json if available.
Write .workflow/project-tech.json with detected tech stack:
- Language, framework, build system, test framework
- Key dependencies, module system, TypeScript config
Step 5: Display Report
=== SPEC SETUP COMPLETE ===
Created:
- .workflow/specs/coding-conventions.md
- .workflow/specs/architecture-constraints.md
- .workflow/specs/quality-rules.md
- .workflow/specs/learnings.md
- .workflow/project-tech.json
Next: Run Skill({ skill: "spec-add", args: "<type> <content>" }) to add entries
Error Handling
| Code | Severity | Description |
|---|---|---|
| E001 | fatal | .workflow/ not initialized -- run Skill({ skill: "maestro-init" }) first |
| E002 | fatal | No source files found in project |
| W001 | warning | Convention detection uncertain -- marked [UNCERTAIN] |
More from catlog22/maestro-flow
spec-map
Analyze codebase with 4 parallel mapper agents via CSV wave pipeline. Produces .workflow/codebase/ documents for tech-stack, architecture, features, and cross-cutting concerns.
1manage-codebase-rebuild
Full codebase documentation rebuild via CSV wave pipeline. Spawns 5 parallel doc generator agents to scan project and produce complete .workflow/codebase/ documentation set. Replaces manage-codebase-rebuild command.
1maestro-quick
Fast-track single task execution with workflow guarantees — analyze, plan, execute in one pass
1quality-sync
Sync codebase docs after code changes -- traces git diff through component/feature/requirement layers
1maestro-roadmap
Lightweight roadmap generation via 2-wave CSV pipeline. Wave 1 runs parallel requirement analysis agents (scope, risk, dependency). Wave 2 runs roadmap assembly agent producing roadmap.md with phases, milestones, and success criteria. Replaces maestro-roadmap command.
1manage-memory
Manage memory entries across workflow and system stores (list, search, view, edit, delete, prune)
1