ags-epic-contracts
Lock minimal API contracts for stub-mode systems in the active epic. Writes Contracts section in EPIC.md and pre-registers stubs in stubs.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Lock minimal API contracts for stub-mode systems in the active epic. Writes Contracts section in EPIC.md and pre-registers stubs in stubs.md.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Validates completeness and consistency of the project architecture against all GDDs. Builds a traceability matrix mapping every GDD technical requirement to ADRs, identifies coverage gaps, detects cross-ADR conflicts, verifies engine compatibility consistency across all decisions, and produces a PASS/CONCERNS/FAIL verdict. The architecture equivalent of /ags-design-review.
Reviews a game design document for completeness, internal consistency, implementability, and adherence to project design standards. Run this before handing a design document to programmers.
Brownfield onboarding — audits existing project artifacts for template format compliance (not just existence), classifies gaps by impact, and produces a numbered migration plan. Run this when joining an in-progress project or upgrading from an older template version. Distinct from /ags-project-stage-detect (which checks what exists) — this checks whether what exists will actually work with the template's skills.
Creates an Architecture Decision Record (ADR) documenting a significant technical decision, its context, alternatives considered, and consequences. Every major technical choice should have an ADR.
Guided, section-by-section Art Bible authoring. Creates the visual identity specification that gates all asset production. Run after /ags-brainstorm is approved and before /ags-map-systems or any GDD authoring begins.
Audits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.
| name | ags-epic-contracts |
| description | Lock minimal API contracts for stub-mode systems in the active epic. Writes Contracts section in EPIC.md and pre-registers stubs in stubs.md. |
| argument-hint | [epic-slug] |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Write, Edit, AskUserQuestion |
Language: Talk to user in language from .ags/project/user-interaction.md. Fall back to English if file missing. Files on disk always English per .ags/rules/user-interaction.md.
| Artifact | Created by | If missing |
|---|---|---|
.ags/project/stage.md (Phase = production) | /ags-gate-check production | STOP. "Not in production phase. Run /ags-gate-check production first." |
Active .ags/project/epics/[slug]/EPIC.md | /ags-create-epics | STOP. "No active epic. Run /ags-create-epics first." |
.ags/project/stubs.md (creates if missing) | /ags-stub-track or this skill | If missing, this skill creates it from t_stubs.md template — not a STOP. |
If any STOP triggers, exit with verdict BLOCKED — missing prerequisite.
If [epic-slug] argument provided, use it. Otherwise read .ags/project/stage.md to find the active epic ID.
Read .ags/project/epics/[slug]/EPIC.md. Verify Status is designing or planned. If status is done or rolled-back, use AskUserQuestion with prompt "Epic status is [X]. Contracts already locked. Re-lock anyway?" options: Re-lock / Cancel.
If epic file missing or unreadable, stop. Verdict: FAIL — no active epic. Run /ags-create-epics first.
Parse the Systems in Scope table in EPIC.md. Collect rows where Mode = stub.
If no stub rows, no contracts needed. Output: "No stub systems in this epic — contracts not required." Verdict: COMPLETE — nothing to do.
For each stub system:
GDD Section).new and revise systems in the same epic — they are the consumers that need the stub interface.If consumer needs are unclear, ask the user one question per stub system before drafting.
For each stub system, draft:
NotImplementedException, empty collection, sane default value, or no-op.STUB-NNN where NNN is the next free integer in .ags/project/stubs.md Open + Closed + Migrated tables. Numbering is global across the project.Present draft contracts to the user as a structured block per stub system.
Use AskUserQuestion with prompt "Any edits to interfaces, defaults, or owner-epic assignments?" and options:
Approve as drafted — proceed to internal reviewEdit interfaces — user describes changes free-form, redraftCancel — stop with verdict BLOCKEDApply edits, redraft, present again. Loop until user approves.
Spawn lead-programmer (and optionally technical-director) via Task to review the drafted contracts against existing ADRs, registry stances, and stubs.md.
Loop exit condition. Single iteration where every spawned reviewer returns clean (no critical/high/medium findings). Non-clean → user revises affected interfaces / defaults, re-spawn the reviewers. No iteration cap.
Record iteration count.
Per .ags/rules/review-workflow.md. The internal review section above runs in parallel with external Codex inside one loop. Each iteration:
.ags/project/reviews/.tmp/[type]-[slug]-iter[N]-draft.md./ags-external-review [type] [draft-path] --embedded-parallel --iteration [N] --min-severity [floor] — Codex unavailable returns skipped: codex-unavailable; aggregator logs skip in decisions-log and continues with internal pool only.producer by default; skill-designated lead where the skill specifies one) merges findings from internal + external, drops nitpicks + below-floor.No iteration cap. No user-confirm gate before external — it runs every iteration automatically. Record final iteration count for the decisions-log entry written at skill completion.
Use AskUserQuestion with prompt "May I write contracts to EPIC.md and pre-register stubs in stubs.md?" and options:
Yes — write both filesNo — cancelIf declined, stop. Verdict: BLOCKED — user declined write.
EPIC.md — Edit the ## Contracts (Stub Interfaces) section. Replace placeholder content with one subsection per stub system. Edit the ## Stubs Introduced table — append rows for each new STUB-ID.
stubs.md — Append rows to ## Open Stubs table. One row per new stub. Columns: ID, System, Interface, Introduced (epic), Owner Epic, Reason, Notes.
decisions-log.md — Append entry:
## [YYYY-MM-DD HH:MM] — Lock contracts for epic-[id]
**Type**: architecture
**Context**: Epic [name] introduces stub neighbors.
**Decision**: API contracts locked for [list of stub systems].
**Rationale**: [user-provided one-sentence reason]
**Refs**: .ags/project/epics/[slug]/EPIC.md, .ags/project/stubs.md
**Decided by**: human
Verdict: COMPLETE — contracts locked, stubs registered.
Suggest:
/ags-create-stories [epic-slug] — break epic into stories./ags-dev-story — implement stories with stubs marked // TODO(epic-[id]):.// TODO(epic-[id]): marker once implementation starts./ags-stub-track reconciles code markers with this registry.