coding-orchestration
Orchestrate software-engineering work inside Git repositories with custom Droid subagents. Use for coding analysis, implementation, debugging, refactors, reviews, tests, UI or design work, security checks, performance work, and releases. Apply to every non-trivial coding task in a Git repo; keep trivial one-step work on the parent agent. Do not use for non-code conversations or folders that are not software repositories.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- coding-orchestration
- description
- Orchestrate software-engineering work inside Git repositories with custom Droid subagents. Use for coding analysis, implementation, debugging, refactors, reviews, tests, UI or design work, security checks, performance work, and releases. Apply to every non-trivial coding task in a Git repo; keep trivial one-step work on the parent agent. Do not use for non-code conversations or folders that are not software repositories.
02 资源文件 2
- 参考文档agents/openai.yaml216 B
- 脚本scripts/validate_agents.py2.8 KB
03 SKILL.md 正文
Coding Orchestration
Keep the parent agent responsible for integration. A tiny change stays on the parent unless delegation is demonstrably faster. Its target is functional evidence within five minutes; ten minutes is an exceptional ceiling that requires a written reason. If it crosses ten minutes, stop and audit the process instead of adding gates.
Decide whether to delegate
- Confirm the task is software work inside a Git repository.
- Read applicable
AGENTS.mdfiles and required repo skills before delegating. - Keep the task on the parent when it is a trivial read, one-step command, tiny localized edit, or quick answer.
- Delegate when at least one condition holds:
- two or more independent discovery or verification lanes exist;
- the task crosses packages, apps, services, or specialties;
- noisy searches, logs, tests, or browser evidence would pollute the parent context;
- an independent correctness, security, performance, or release review materially reduces risk.
- Keep one writer and no ticket worktrees by default. When the user explicitly
invokes
work-multiple, let that separate skill own lane planning, worktrees, integration, and measurement.
Subagents cost additional tokens. Never spawn agents merely to restate the prompt or duplicate the same search.
Lock the terminal slice
Before delegating or editing, state the smallest executable slice that advances the requested end state:
- a binary done condition;
- exact ownership and scope;
- the focused checks needed during work;
- the single final gate needed before handoff;
- any preview, production, merge, or human-review stop boundary.
Freeze adjacent improvements. If work reaches roughly twice its expected duration or token budget, waiting dominates the run, or a lane produces no useful evidence, stop expanding the slice and audit the process before continuing.
Route by role
Use the Task tool with subagent_type matching the custom droid from ~/.factory/droids/ whose name matches the job:
| Droid | subagent_type | Assign when |
|---|---|---|
| code-mapper | code-mapper |
Locate code paths, ownership, repo rules, tests, and commands. |
| docs-researcher | docs-researcher |
Verify version-sensitive framework or API behavior from primary sources. |
| qa-planner | qa-planner |
Translate changed surfaces into the smallest sufficient verification matrix. |
| test-runner | test-runner |
Run focused checks and summarize failures without editing product code. |
| mechanical-worker | mechanical-worker |
Execute large, explicit, low-ambiguity edits or migrations. |
| fast-implementer | fast-implementer |
Execute exact bounded packets with low complexity for rapid mechanical writes. |
| implementer | implementer |
Make a scoped general code change after ownership is clear. |
| backend-specialist | backend-specialist |
Own backend, schema, auth, migration, or data-contract implementation. |
| browser-qa | browser-qa |
Reproduce and verify user-visible behavior with browser tooling. |
| performance-auditor | performance-auditor |
Inspect rendering, bundle, query, or runtime performance risks. |
| ui-designer | ui-designer |
Design or implement user-facing UI where visual judgment is central. |
| visual-reviewer | visual-reviewer |
Independently inspect design quality and rendered UI evidence. |
| architecture-planner | architecture-planner |
Resolve ambiguous, cross-cutting, or high-risk technical design. |
| reviewer | reviewer |
Independently review correctness, regressions, and missing tests. |
| security-reviewer | security-reviewer |
Review trust boundaries, auth, permissions, secrets, and data exposure. |
| release-manager | release-manager |
Evaluate and execute an authorized repo release path and smoke checks. |
The droid .md files in ~/.factory/droids/ are the single source of truth for model and reasoning settings. Do not copy model maps into repositories.
Execute in bounded waves
Choose only the lanes the task needs:
- Discovery: run
code-mapper,docs-researcher, orqa-plannerin parallel (multiple Task calls in the same turn, orrun_in_background: true) when their scopes are independent. - Decision: have the parent integrate evidence; use
architecture-planneronly when judgment remains genuinely hard. - Implementation: default to one writer. Use
fast-implementerwithcomplexity: lightfirst for exact bounded packets,implementerorbackend-specialistwithcomplexity: medium, orui-designerwithcomplexity: heavy, with explicit file or package ownership. - Verification: run focused tests and browser checks independently when useful.
- Review: add only the risk-specific reviewer needed, then let the parent integrate findings and finish repo gates.
The parent owns conflicts, final integration, and the requested end state.
Reuse a suitable existing droid for follow-up work instead of spawning a fresh copy. Re-run only a failed or materially changed lane.
Keep prompts lean
When spawning a custom droid via the Task tool, set subagent_type to its exact name. Include the required task-local context in the delegated prompt instead of relying on parent conversation history. Subagents run with a fresh context window.
Every delegated prompt must include:
- one concrete objective;
- exact scope or ownership boundaries;
- relevant repo instructions or paths to read;
- whether edits are allowed;
- the evidence or output format to return;
- conditions that require escalation to the parent.
Pass task-local context, not the full conversation. Ask for concise summaries with file references instead of raw logs.
Escalate by evidence
Start with the cheapest explicitly resolved droid model adequate for the
bounded job. inherit is not routing evidence. Escalate only when its output
is incomplete, contradictory, repeatedly failing, or reaches a high-risk
decision outside its mandate.
Use this complexity progression:
complexity: lightfor exact bounded implementation packets (fast-implementer), focused test execution (test-runner), and explicit mechanical edits (mechanical-worker).complexity: lightfor discovery, docs, and QA planning (code-mapper,docs-researcher,qa-planner).complexity: mediumfor implementation, backend work, performance analysis, everyday review, and release work.- Use explicit Claude Opus 4.7 droids for visual review, UI design, architecture, and security judgment.
- Keep those judgment routes explicit and provisional until same-packet benchmarks support a cheaper replacement.
Judge the returned work, not the complexity tier. Re-run only the failed lane; do not restart the whole workflow.
Fast model labels are candidates, not routing proof. Confirm model IDs and
supported reasoning levels from the installed Factory runtime. The installed
droid roster must name the model explicitly; inherit is not accepted.
Re-rank a route only after a same-packet benchmark shows that a challenger
improves wall time and pass rate at an acceptable credit multiplier.
Minimize orchestration overhead
- Do useful parent work while droids, tests, or CI run; do not actively poll.
- Store the run identifier and check once when the result can unblock a decision. Wait only when it is the last blocker.
- Run the smallest check that proves the acceptance criterion. A full suite is forbidden by default and may run only when the user explicitly requests it for that run. Do not infer that authorization from change size, ticket count, a release label, or a generic "verify everything" convention.
- Run UI acceptance only when UI changed and the observable risk justifies it. A label, copy, icon, or obvious style-only change without behavior risk skips browser QA. Interaction, navigation, mutation, responsive behavior, meaningful regression, or a critical flow gets one direct acceptance flow.
- Report what every cited check actually proved. Never present total tests, destinations, routes, or surfaces as quality evidence without mapping them to acceptance criteria.
- Inspect the real command, log, route, or runtime behavior behind a green label. A named check is not evidence that it exercised the intended surface.
- Prefer one coherent implementation wave and one integrated review over repeated global reviews after every small change.
- Record each delegated lane's role, droid, harness, resolved model, reasoning,
session id, event id, and runtime metadata source. Copying the selected model
from the plan is not evidence. Missing, self-reported, or
inheritmodel evidence is unresolved.
Preserve safety and repo policy
- Delegation never expands authorization.
- Apply the repo's branch, test, review, deploy, and approval policy.
- Subagents cannot spawn further subagents (depth is one).
- Do not treat generated plans as proof; verify the real repository and runtime state.
- Route design decisions, UI craft, and independent visual judgment to their
explicit Claude Opus 4.7 droids; escalate unresolved design judgment back to
ui-designer. - For cross-harness workflow changes, run
python3 ~/.agents/scripts/validate-development-system.py --repos-root <projects-directory>.
04 同仓库更多 Skills
working-backwards
Define a software feature through PRFAQ and staged documents when the user requests working backwards before coding.
flow-implement
Implement a requested software change through verification, corrections, and its authorized delivery endpoint.
development-steward
Run the scheduled, read-only weekly maintenance review for the six explicitly opted-in repositories and prepare one concise private report for Check-in.
grill-with-docs
Run one recoverable interview for functional, visual, or mixed software grills; reuse equivalent answers and offer the shared HTML questionnaire.
global-agent-guardrails
Install, audit, test, or update the Development System's global destructive-command guard for Codex, Claude Code and T3 Code. Use when configuring agent safety hooks or investigating whether dangerous shell operations are blocked.
impeccable
Design or refine frontend UI using project context and a focused design playbook; also handles visual critique and polish.