flywheel-conventions
Shared conventions for Flywheel subagents. Tool discipline, output format, research patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Shared conventions for Flywheel subagents. Tool discipline, output format, research patterns.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Research codebase, validate external claims, and emit a work-ready spec.json for a new planning session. Single-pass creation with integrated validation via Context7 and locator/analyzer agents. Triggers on "create plan", "plan for", "write a plan". For exploratory requests where the user is unsure what to build, prefer brainstorm first. Once spec.json exists, use plan-review for evaluation or go straight to work. For a reviewed spec, use plan-consolidation to merge findings.
Execute spec.json (plan mode) or review.findings.json (fix-findings mode) by dispatching subagents per chunk. Triggers on "work on", "implement", "execute plan", "carry on", "continue".
Perform exhaustive code reviews using multi-agent analysis. Reviews PRs, branches, or current changes. Writes review.findings.json to the active session. Triggers on "review", "code review", "check PR".
Refine the active session's spec.json by merging reviewer findings.json into it. Backs up the pre-refinement spec to a .pre-consolidation sidecar. Triggers on "consolidate plan", "finalize plan".
Run ALL reviewer agents in parallel against a plan. Deduplicates findings semantically and writes findings.json to the active session. Triggers on "review plan", "check plan".
Autonomously execute the full plan → implement → review → fix cycle without stopping. The agent makes every decision, including answering open questions during plan-consolidation. Use when you'll be away from the keyboard and trust the agent to ship.
| name | flywheel-conventions |
| description | Shared conventions for Flywheel subagents. Tool discipline, output format, research patterns. |
| user-invocable | false |
Maximize elegance. This is the single governing principle. Every rule below describes what elegance looks like — heuristics in service of the principle, not the goal themselves. When a rule produces awkward or indirect output, break it and document why the result is more elegant.
Maximize elegance over minimizing churn. Pick the more elegant design no matter how big the refactor. Better now than months from now with more features and dependencies in place.
The output — plan or code — must read as if every decision was deliberate. A reader should never ask "why is this here?" about any line, phase, or task.
| # | Check | If violated |
|---|---|---|
| 1 | Is there exactly one source of truth for this data? | You're creating a copy. Read from the existing source. |
| 2 | Would deleting this code change behavior? | If not, delete it now. |
| 3 | Is this abstraction used in 2+ places? | If not, inline it — unless inlining would force the caller to do two unrelated jobs. |
| 4 | Does this wrapper add a new capability? | If not, call the underlying API directly. |
| 5 | Could a reader understand this in 30 seconds without context? | If not, the names or shape are wrong. |
| 6 | Does data flow in one direction? | If A updates B and B updates A, you have a cycle. Pick one owner. |
| 7 | Are you fighting the language or framework? | Use the idiomatic primitive. Ceremony signals the tool wants to be used differently. |
| 8 | Are you adding something speculative ("we might need…")? | Delete it. Add when the need is concrete. |
For the canonical anti-pattern catalog and the elegance dispatch bar, see references/elegance.md. Use catalog names ("Shallow Wrapper", "Forwarding Chain", "Parallel State", "Premature Abstraction", "Dead Code", "God Class", and the Universal Principles) when leading the Failure paragraph in findings — plan-consolidation routes structural failures to redesign by these names.
When you see multiple small issues clustered in one area, they usually point at one structural defect. Fix the structure; the symptoms dissolve. If you find yourself patching N findings in the same file, stop and redesign instead.
BLOCKING: Never use Bash for operations that have a dedicated tool.
grep/rg via Bashfind/ls via Bashcat/head/tail via BashBash is only for: git commands, bun commands, and system operations with no dedicated tool.
Limits: Locators 500 words. Analyzers 1500. Reviewers: prose findings (Title / Severity / Location / Failure / Fix per finding). The orchestrating skill (plan-review or work-review) parses your prose into flywheel/schemas/findings.schema.json. Do NOT emit JSON.
Format: Structured sections (End Goal, Key Findings, Files Identified). Paths only, never file contents. Flag ambiguities with "OPEN QUESTION:".
Severity: P1 blocks merge (security, data loss, breaking change, normal-path defect). P2 should fix (real downside — edge case, perf regression, maintainability trap). P3 user's discretion (low-impact, narrow scope).
References: Always path/to/file.ts:42-67, never "in the auth module."
Core rule: don't emit a finding without a concrete, named consequence. A suppressed finding beats a noisy one — when in doubt, suppress.
Suppress if:
The failure field is the implementer's primary input. It must contain everything needed to understand the full scope of the problem in one read. Four slots:
references/elegance.md), SOLID, DRY, language-specific anti-patterns, or domain-canonical names ("N+1 Query", "Race Condition", "Layering Violation", "Convention Drift"). The synthesizer routes structural failures by this leading token — keep it first, with a period.Format: <Principle>. <Intent>. <Observation>. <Reasoning>.
Strong (observable failure, named):
"Silent Logout. parseDate is supposed to accept the common date formats users actually submit. It only handles YYYY-MM-DD and returns null for DD/MM/YYYY; the caller at line 78 treats null as 'expired' and logs the user out. DD/MM/YYYY input becomes a silent logout — wrong outcome and confusing UX."
Strong (principle violation, named):
"God Class. AuthService should expose only orchestration concerns. It currently imports React components and renders login forms inline. Every UI tweak forces re-testing auth logic, and headless contexts can't use the service."
Weak — drops the leading principle or is too terse:
If you can't lead with a principle name, the finding is observational only — mark P3 or suppress.
Before emitting spec.json, verify each phase contains:
A spec is ready when an implementer can start confidently without needing to infer.
If any phase fails the bar, loop back: read the codebase, ask the user, or defer the phase explicitly as status: deferred with rationale.
Documentarian mode (locators + analyzers): Document what IS, not what SHOULD BE. No suggestions, critiques, or recommendations.
Read files fully: Use Read WITHOUT limit/offset. Partial reads cause hallucination.
Locators first — run in parallel
locator-codebase, locator-patterns, locator-docs (haiku)locator-web (sonnet — query crafting needs stronger reasoning)Analyzers second — targeted, use sonnet
analyzer-codebase, analyzer-patterns, analyzer-docsImplementation subagents (general-purpose, Explore, Plan) inherit the parent model — never set model. Only research agents (locators, analyzers) use explicit models.
Pass file paths (not content) to Read-capable agents. Content inline to locators. Phase-only plan excerpts, not full plans. Under 100 lines where possible.
3 strikes then escalate:
Every line in a SKILL.md loads on every invocation. Include rationale only when it changes what the agent does at runtime. If behavior would not differ without the sentence, cut it. Extract conditional/late-sequence content to references/ and load on demand.