一键导入
sage-developer
Run the Developer agent inline to implement code for the next ready story (or a specific story)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the Developer agent inline to implement code for the next ready story (or a specific story)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | sage-developer |
| description | Run the Developer agent inline to implement code for the next ready story (or a specific story) |
| when_to_use | When you want to implement code for a story whose tests already exist (status IN_DEV), without running the full team workflow |
This skill runs the Developer role solo: implement code for one story, write the AC implementation map sidecar, flip the story to TESTING, and report to the user as plain text.
Path note: All
python .sage/_tools/...commands below assume an installed project (a.sage/directory exists at the project root). If you're running this skill from the sage-feature-team source repo itself (no.sage/exists), substitute_tools/...instead.
Usage:
/sage-developer # Auto-pick: next story at IN_DEV
/sage-developer STORY-3 # Target a specific story
/sage-developer --feature add_dark_mode STORY-3
Compute:
STORY-\d+, else null--feature <name> if given, else auto-detect (Step 3)python .sage/_tools/load_agents.py full
From the JSON, extract agents.Developer. The rendered prompt has two kinds of content -- use them differently:
Use these sections (mode-agnostic role contract -- they apply to you):
.sage/agents/_BASE.md § Project-Specific Instructions -- the project's code conventions, file structure.sage/agents/developer.md § Your Job.sage/agents/developer.md § Test Handling.sage/agents/developer.md § AC Implementation Map (mandatory per story) -- format, rules, FORBIDDEN words.sage/agents/developer.md § Key RulesIgnore these sections (team-mode workflow that does not apply when invoked as a skill):
_BASE.md § STOP / SILENCE RULE / Starting Message / Workflow / Completion Outcomes / Progress File Updates / Key Rules (All Agents)developer.md § Developer Workflow (After Receiving Task) -- this skill defines its own workflow belowdeveloper.md § Completion Message Format -- this skill reports to the user as plain text insteadIf success is false, surface the loader's error and stop.
If feature_name was passed via --feature, use it directly. Otherwise:
<output_dir>/*/stories/ (output_dir from sage-config.yaml; default _output)feature_name from the directory nameCompute:
stories_dir = <output_dir>/<feature_name>/stories/spec_file = <output_dir>/<feature_name>/spec.mdRead every YAML file in stories_dir and spec_file (for feature-level context).
If explicit_story was given:
<stories_dir>/<STORY-N>.yaml. Error if missing.status: IN_DEV. If not:
TODO or CREATE_TESTS: tell the user no tests exist yet -- suggest /sage-test-creator <story> first; offer to abort or proceed anyway.TESTING or DONE: tell the user the story is past Developer's scope; ask whether to re-implement, switch story, or abort.If no story was given (auto-pick): call the eligibility script:
python .sage/_tools/list_eligible.py --feature <feature_name>
Take the first story from the Developer list (already sorted lowest STORY-N first). If the list is empty, show the user the bucketing so they see why nothing's eligible, then stop. Likely next steps: /sage-test-creator to advance a TODO story to IN_DEV, or /sage-tester to validate stories at TESTING.
Set target_story to the chosen story ID.
You need to know which test functions belong to target_story so you can reason about what must pass.
.sage/sage-test-creator-config.yaml (the convention TestCreator used).target_story.If the tagging convention is missing or you can't find tests for target_story, stop and ask the user.
spec_file from Step 3) for feature-level context (overview, edge cases, tech notes), and read target_story's YAML for its acceptance_criteria: block -- the per-story contract you must satisfy.target_story (not just the AC the tests cover) AND make target_story's tests pass. Do NOT break tests for stories already at DONE. UI / device-only / manual-only AC still require production-code wiring (composables called from a route, buttons connected, etc.) -- code that compiles in isolation does NOT satisfy an AC. See .sage/agents/developer.md § Your Job for the full contract framing..sage/agents/developer.md § Test Handling. You MAY fix test bugs (wrong assertions, broken setup, mismatch with AC). You MUST NOT weaken assertions, remove cases, suppress errors, or loosen validation. Do NOT run tests yourself -- that's /sage-tester's job. Reason carefully about whether your changes will pass.<stories_dir>/STORY-N.implementation.md. Format, rules, and FORBIDDEN word list are in .sage/agents/developer.md § AC Implementation Map (mandatory per story). One ## ACx heading per AC; under each, list at least one production file path.python .sage/_tools/verify_ac_map.py STORY-N --stories-dir <stories_dir>
If success: false, fix the gaps it reports (actually wire the missing AC, or escalate if an AC truly belongs in another story) BEFORE flipping to TESTING.target_story to TESTING via the helper script -- only after the AC map verifies clean:
python .sage/_tools/update_story_status.py STORY-N TESTING --stories-dir <stories_dir>
Check the JSON return; on success: false, stop and report to the user..sage/agents/developer.md § Key Rules. Highlights: never flip directly to DONE, never hand-edit story YAMLs, no scope creep beyond the story's AC, follow project conventions.If you encounter a blocker (ambiguous requirement, missing dependency, contradiction between AC and tests, AC genuinely belongs in a different story), stop and ask the user inline -- do NOT make assumptions and do NOT silently push the AC forward.
When done, report to the user as plain text:
Story: <target_story> -> TESTING
AC implemented:
- AC1: <file:line>, <file:line>
- AC2: <file:line>
- AC3: <file:line>
Files changed:
- <path1>
- <path2>
Tests targeted:
- <test_name1>
- <test_name2>
AC map sidecar: <stories_dir>/STORY-N.implementation.md (verified [OK])
Summary: <one-paragraph description of what you implemented and any decisions/trade-offs>
/sage-tester next)After reporting to the user, record this skill's estimated token consumption:
python .sage/_tools/record_worker_usage.py --feature <feature_name> --role Developer --story <target_story> --cycle 1 --inline --output-chars <approximate output chars produced>
Inline-mode entries are flagged estimated: true in _output/<feature_name>/tokens.json because we can't measure exact tokens from inside the main conversation (use /usage for the precise session total). Estimate output-chars as roughly the size of files you wrote + your final user-facing report. Failure here is non-fatal -- log and continue.
Ad hoc dev/test cycle -- runs existing tests and fixes failures iteratively
Complete feature development workflow (ProductOwner -> parallel TestCreator/Developer/Tester per story)
Ad hoc dev/test cycle -- runs existing tests and fixes failures iteratively
Complete feature development workflow (ProductOwner -> parallel TestCreator/Developer/Tester per story)
Run the ProductOwner agent inline to create a feature spec + per-story YAML files
Run the TestCreator agent inline to write tests for the next ready story (or a specific story)