-
Notifications
You must be signed in to change notification settings - Fork 391
Description
Problem
Currently, Autocoder requires a manually written app_spec.txt to initialize features. For existing projects that were started with other tools (Claude Code, Cursor, etc.), there's no easy way to onboard them to Autocoder.
Users have to manually analyze their codebase and write the XML spec from scratch - which is time-consuming and error-prone.
Proposed Solution
Integrate with the Get Shit Done (GSD) Framework to automatically generate app_spec.txt from existing codebases.
How It Works
Existing Project
│
▼
/gsd:map-codebase ← Analyzes codebase with 4 parallel agents
│
▼
.planning/codebase/
├── STACK.md ← Technologies, frameworks, dependencies
├── ARCHITECTURE.md ← Patterns, layers, data flow
├── STRUCTURE.md ← Directory layout, key files
├── CONVENTIONS.md ← Code style, naming patterns
├── INTEGRATIONS.md ← External APIs, services
├── TESTING.md ← Test structure
└── CONCERNS.md ← Technical debt
│
▼
/gsd:to-autocoder-spec ← NEW: Converts GSD output to Autocoder format
│
▼
prompts/app_spec.txt ← Generated XML spec for Autocoder
│
▼
Autocoder Initializer ← Creates features.db from spec
│
▼
Coding Agent ← Implements features autonomously
Mapping GSD Documents to Autocoder Spec
| GSD Document | Autocoder Section |
|---|---|
| STACK.md Languages | <technology_stack> |
| STACK.md Frameworks | <frontend>, <backend> |
| STACK.md Dependencies | <prerequisites> |
| ARCHITECTURE.md Layers | <core_features> categories |
| ARCHITECTURE.md Data Flow | <key_interactions> |
| STRUCTURE.md Layout | <ui_layout>, <implementation_steps> |
| INTEGRATIONS.md APIs | <api_endpoints_summary> |
Benefits
- Zero manual spec writing - Codebase analysis generates the spec automatically
- Respects existing patterns - Features align with actual code architecture
- Token efficient - One-time conversion, not repeated context loading
- Framework agnostic - Works with any tech stack GSD can analyze
Implementation Options
Option A: External Skill (Already Built)
I've created a Claude Code skill that bridges GSD and Autocoder:
~/.claude/skills/gsd-to-autocoder-spec/
├── SKILL.md # Workflow definition
└── references/
└── app-spec-format.md # XML format reference
Usage:
cd /path/to/existing-project
# Run in Claude Code:
/gsd:map-codebase
/gsd:to-autocoder-spec
# Then start Autocoder normallyOption B: Native Integration
Add GSD support directly to Autocoder:
- Detect GSD mapping in
prompts.py:
def get_app_spec(project_dir: Path) -> str:
# Check for GSD mapping first
gsd_dir = project_dir / ".planning" / "codebase"
if gsd_dir.exists() and not (project_dir / "prompts" / "app_spec.txt").exists():
return generate_spec_from_gsd(gsd_dir)
# ... existing logic- Auto-generate spec from GSD documents
- Skip manual spec creation if GSD mapping exists
Option C: Prompt Enhancement
Modify coding_prompt.template.md to read GSD context:
# If GSD mapping exists, read it for context
if [ -d ".planning/codebase" ]; then
cat .planning/codebase/STACK.md
cat .planning/codebase/ARCHITECTURE.md
fiWhy GSD?
GSD's /gsd:map-codebase spawns 4 parallel Explore agents that thoroughly analyze:
- Technology stack and dependencies
- Architecture patterns and code organization
- Directory structure and conventions
- Technical debt and concerns
This produces comprehensive, structured documentation that maps perfectly to Autocoder's spec format.
Related
- GSD Framework: https://github.com/glittercowboy/get-shit-done
- GSD map-codebase workflow: Creates
.planning/codebase/*.md - Autocoder app_spec format: XML with
<project_specification>root
Note: I'm happy to contribute the skill code or help with native integration. The skill is already working in my local setup.