Autonomous spec-driven development agent. Syncs DEV_SPEC.md into chapter-based reference files, identifies the next pending task from the schedule, implements code following spec architecture and patterns, runs tests with up to 3 auto-fix rounds, and persists progress with atomic commits. Use when user says "auto code", "自动开发", "自动写代码", "auto dev", "一键开发", "autopilot", or wants fully automated spec-to-code workflow.
One trigger completes read spec → find task → code → test → persist progress.
Optional modifiers: append a task ID (e.g. auto code B2) to target a specific task, or --no-commit to skip git commit.
Sync Spec → Find Task → Implement → Test (≤3 fix rounds) → Persist
Pause only at the end for commit confirmation. Run everything else autonomously.
⚠️ CRITICAL: Activate
.venvbefore ANYpython/pytestcommand (idempotent, re-run if unsure).
- Windows:
.\.venv\Scripts\Activate.ps1- macOS/Linux:
source .venv/bin/activate
All files under .github/skills/auto-coder/references/:
| File | Content | When to Read |
|---|---|---|
01-overview.md | Project overview & goals | First task or when needing project context |
02-features.md | Feature specifications | When implementing feature-related tasks |
03-tech-stack.md | Tech stack & dependencies | When choosing libraries or patterns |
04-testing.md | Testing conventions | When writing tests |
05-architecture.md | Architecture & module design | When creating/modifying modules |
06-schedule.md | Task schedule & status | Every cycle (Sync Spec step) |
07-future.md | Future roadmap | When planning or assessing scope |
python .github/skills/auto-coder/scripts/sync_spec.py
Then read the schedule file to get task statuses:
.github/skills/auto-coder/references/06-schedule.mdTask markers:
| Marker | Status |
|---|---|
[ ] / ⬜ | Not started |
[~] / 🔶 / (进行中) | In progress |
[x] / ✅ / (已完成) | Completed |
Pick the first IN_PROGRESS task, then the first NOT_STARTED. If user specified a task ID, use that directly.
Quick-check predecessor artifacts exist (file-level only). On mismatch, log a warning and continue — only stop if the target task itself is blocked.
Read relevant spec from .github/skills/auto-coder/references/:
05-architecture.md03-tech-stack.md04-testing.mdExtract from spec: inputs/outputs, design principles (Pluggable? Config-driven? Factory?), file list, acceptance criteria.
Plan files to create/modify before writing any code.
Code — project-specific rules:
config/settings.yaml values, never hardcodeWrite tests alongside code:
tests/unit/ or tests/integration/ per specSelf-review before running tests: verify all planned files exist and tests import correctly.
Round 0..2:
Run pytest on relevant test file
If pass → go to step 5
If fail → analyze error, apply fix, re-run
Round 3 still failing → STOP, show failure report to user
DEV_SPEC.md (global file): change task marker [ ] → [x]python .github/skills/auto-coder/scripts/sync_spec.py --force✅ [A3] 配置加载与校验 — done
Files: src/core/settings.py, tests/unit/test_settings.py
Tests: 8/8 passed
Commit: feat(config): [A3] implement config loader
"commit" → git add + commit
"skip" → end
"next" → commit + start next task
On "next", loop back to step 1 and start the next task.