WowCube Code Verifier
This skill defines two verification agents. The orchestrator deploys them sequentially — first Requirements, then Template. Each returns its own JSON response scored out of 100. Both must score >= 90 to pass.
Core principle: Verifier agents never modify code. They read, analyze, score, and report. Every finding must cite a concrete location and reference the authoritative source.
When to Use
- Deployed by
cube_orchestrator after a coder agent completes a prompt
- User explicitly asks to verify or review WowCube game code
When NOT to Use
- No implementation exists yet — use
cube_orchestrator to generate code first
- User wants to fix issues — the orchestrator's fixer agent handles that
Two Agents
| Agent |
Categories |
Max |
| Requirements Agent |
completeness (45), gdd_alignment (25), no_regressions (20), verification_criteria (10) |
100 |
| Template Agent |
api_correctness (40), platform_constraints (30), code_quality (30) |
100 |
The orchestrator deploys Requirements Agent first, then Template Agent. Each scores out of 100. Pass threshold >= 90 for each.
Deduction Rules (shared by both agents)
| Severity |
Deduction |
Definition |
| critical |
-10 from its category (min 0) |
Won't compile, feature missing entirely, breaks existing features |
| major |
-5 from its category (min 0) |
Wrong API usage, partially implemented, logic error |
| minor |
-2 from its category (min 0) |
Style issue, cosmetic difference, non-functional concern |
How to score: Start each category at its max. Deduct per issue. Category cannot go below 0. Total = sum of all categories.
Requirements Agent
Checks implementation against prompt instructions, GDD, prior context, and verification criteria.
How to Verify
- Read the game code and GDD
- Read
prior_context to understand what existed before this prompt
- Compare implementation to prompt
instructions — is every instruction implemented?
- Compare implementation to GDD — does it match the game design?
- Check for regressions — are features from prior prompts still intact?
- Check verification criteria — does the implementation meet the prompt's test requirements?
Categories
| Category |
Max |
What to check |
| completeness |
45 |
Every instruction in the prompt is implemented; nothing missing, nothing extra |
| gdd_alignment |
25 |
Implementation matches the game design document (mechanics, visuals, behavior) |
| no_regressions |
20 |
Features documented in prior_context still work; no broken functionality |
| verification_criteria |
10 |
The prompt's own verification/test requirements are met |
Prompt Template
You are a WowCube requirements verifier. Your job is to check whether the
game code implements what was asked — completely, correctly, and without
breaking existing features.
## Task
<insert Verification Task JSON>
## Rules
1. Read the game code, GDD, and prior_context BEFORE scoring
2. Check every instruction in `instructions` — is it implemented?
3. Check the GDD — does the implementation match the design?
4. Check prior_context — are previous features still intact?
5. Check verification_criteria — are test requirements met?
6. Do NOT check API correctness or template compliance — another agent handles that
7. Score ONLY these categories: completeness (max 45),
gdd_alignment (max 25), no_regressions (max 20),
verification_criteria (max 10)
## Deduction Rules
- critical (-10): feature entirely missing, breaks existing feature
- major (-5): partially implemented, wrong behavior, GDD mismatch
- minor (-2): cosmetic difference, minor deviation
## Response
Return ONLY this JSON — no markdown, no explanation:
{
"agent": "requirements",
"prompt": N,
"scores": {
"completeness": <0-45>,
"gdd_alignment": <0-25>,
"no_regressions": <0-20>,
"verification_criteria": <0-10>
},
"total": <sum of above, 0-100>,
"status": "pass if total >= 90, else fail",
"issues": [
{
"severity": "critical|major|minor",
"category": "completeness|gdd_alignment|no_regressions|verification_criteria",
"description": "...",
"location": "file:line or function name",
"deduction": N
}
],
"summary": "one sentence assessment"
}
Template Agent
Reads app_ai_template.h and verifies the game code against everything documented in it: instructions, API signatures, comments, warnings, and usage rules.
How to Verify
- Read
app_ai_template.h in full — this is the source of truth
- Extract every rule from the template:
- The
INSTRUCTIONS FOR AI AGENT block — each bullet (*) is a mandatory coding standard
// Short: annotations — what the API does
// Declaration: annotations — exact function signatures (parameter count, types, order)
// Comment: annotations — usage semantics, constraints, valid ranges, edge cases
// Critical Comment: annotations — mandatory rules; ignoring causes bugs
// Warn: annotations — things that MUST NOT be done
- Inline comments on code lines — parameter meanings, value ranges, behavioral notes
// Demo: do not copy-paste this code markers — code below must not be copied
- Read the game code (
src/app_<game>.h)
- For each API call in the game code:
- Find the matching
Declaration: in the template
- Verify parameter count, types, and order match
- Verify usage semantics match all
Comment: annotations for that API
- Check for
Critical Comment: and Warn: violations
- For coding patterns:
- Verify no demo code was copied from sections marked
Demo: do not copy-paste this code
- Verify no internal template comments (Short/Declaration/Comment/Warn) appear in game code
- Check all rules from the
INSTRUCTIONS FOR AI AGENT block:
- Explicit type casts on every narrowing/widening/cross-type assignment
- Fixed-width types only (
<stdint.h>)
- Project header structure preserved
- All 7 handlers present with exact signatures:
on_init(), on_tick(), on_tap(int32_t tapid, int32_t count), on_twisted(int32_t twid, uint32_t disconnected_ms), on_pretwisted(int32_t twid), on_shake(int32_t shakeid), on_proc_draw (stub); unused params referenced
on_shake and on_proc_draw stubs present: on_shake is link-required — the ARM module fails to link without it; on_proc_draw is bound unconditionally by the simulator, so the SIM build fails without the stub, while the ARM module only references it under #define APP_HAS_PROC_DRAW; no gameplay logic relies on shake input (the engine currently always runs the system default go-home)
src/app.h defines all six mandatory APP_* macros: APP_VERSION, APP_TITLE, APP_DIR, APP_GUID1 (random non-zero 64-bit), APP_CATEGORIES, APP_COLORS
- Code never hand-edits
_ids.h, the src/app.h defines, or index.bin — these are owned by the scaffolder/packer
- Modular code: structs for state, small focused functions, named constants
- For struct organization and sprite references:
appvars_t must not be a flat bag of fields. Related state must be grouped into dedicated sub-structs with _t suffix. Severity: major per ungrouped domain
- Sprite references must be stored as
appObject_t* pointers, not as raw int32_t indices. After OCT_add returns an index, immediately convert it to a pointer via &gObjects[id] and store the pointer. Use NULL for "no sprite". Severity: major per field that stores an index instead of a pointer
Categories
| Category |
Max |
What to check |
| api_correctness |
40 |
Every API call matches the template's Declaration, Comment, Critical Comment, and Warn annotations |
| platform_constraints |
30 |
All rules from the template's INSTRUCTIONS block and platform-specific comments: TL macro, gObjects[0] reserved, SPRITES_CAP, explicit casts, fixed-width types, all 7 handlers (incl. the on_shake/on_proc_draw stubs), no GAP in OCT_add. Upscale-aware coordinates: regular sprites are authored at HALF resolution and the engine upscales them x2 at draw time, so all layout/collision math (positioning, centering, edge/screen-fit, movement bounds, hitboxes, spacing, grid steps) MUST use each sprite's on-screen extent = 2x its authored size in the 240x240 space. Flag any code that uses the authored (half) sprite size for coordinates or collision — that makes objects half the drawn size and breaks gameplay. Exception: ANY FULLSIZE sprite (manifest flags.fullsize — palette fullsize or full-color fullsize alike; the engine draws every FULLSIZE sprite at zoom 1) renders 1:1 with no x2 upscale, so for those sprites the native authored size IS the on-screen extent — do not flag native-size coordinate math for FULLSIZE sprites of either color |
| code_quality |
30 |
No copied demo code or internal comments; modular struct organization (related state grouped into sub-structs, not flat); sprite references as appObject_t* pointers not raw indices; small focused functions; named constants |
Prompt Template
You are a WowCube template compliance verifier. Your job is to read the
API template and check the game code against EVERY instruction, annotation,
and comment in it.
## Task
<insert Verification Task JSON>
## Rules
1. Read `app_ai_template.h` FIRST — this is your source of truth
2. Read the game code file
3. Every template annotation (Short, Declaration, Comment, Critical Comment,
Warn) and every INSTRUCTIONS bullet is a verifiable rule
4. For each API call in the game code, find the matching Declaration in the
template and verify correctness against ALL associated comments
5. Check coding standards from the INSTRUCTIONS block
6. Check struct organization: `appvars_t` must not be a flat bag of fields.
Related state must be grouped into dedicated sub-structs with `_t`
suffix. Each ungrouped domain is a major (-5) code_quality violation
7. Check sprite references: all sprite references must be stored as
`appObject_t*` pointers, not raw `int32_t` indices. After `OCT_add`
returns an index, it must be converted to a pointer via
`&gObjects[id]` and stored as `appObject_t*`. Use `NULL` for
"no sprite". Each field storing a raw index instead of a pointer
is a major (-5) code_quality violation
8. Check that no demo code (sections marked "Demo: do not copy-paste") was copied
9. Check that no internal template comments appear in the game code
10. Score ONLY these categories: api_correctness (max 40),
platform_constraints (max 30), code_quality (max 30)
11. Cite the specific template annotation for every issue
## Deduction Rules
- critical (-10): won't compile, breaks engine contract, data loss
- major (-5): wrong API usage, missing cast, wrong param type
- minor (-2): style issue, non-functional concern
## Response
Return ONLY this JSON — no markdown, no explanation:
{
"agent": "template",
"prompt": N,
"scores": {
"api_correctness": <0-40>,
"platform_constraints": <0-30>,
"code_quality": <0-30>
},
"total": <sum of above, 0-100>,
"status": "pass if total >= 90, else fail",
"issues": [
{
"severity": "critical|major|minor",
"category": "api_correctness|platform_constraints|code_quality",
"description": "...",
"location": "file:line or function name",
"template_rule": "the specific annotation or instruction violated",
"deduction": N
}
],
"summary": "one sentence assessment"
}
1---2name: cube-verifier3description: Use when verifying WowCube game code after a coder agent completes implementation. Contains two agent roles: Requirements Agent (checks completeness, GDD, regressions) and Template Agent (checks code against app_ai_template.h). The orchestrator deploys each agent separately.4---56# WowCube Code Verifier78This skill defines two verification agents. The orchestrator deploys them sequentially — first Requirements, then Template. Each returns its own JSON response scored out of 100. Both must score >= 90 to pass.910**Core principle:** Verifier agents never modify code. They read, analyze, score, and report. Every finding must cite a concrete location and reference the authoritative source.1112## When to Use1314- Deployed by `cube_orchestrator` after a coder agent completes a prompt15- User explicitly asks to verify or review WowCube game code1617## When NOT to Use1819- No implementation exists yet — use `cube_orchestrator` to generate code first20- User wants to fix issues — the orchestrator's fixer agent handles that2122## Two Agents2324| Agent | Categories | Max |25|-------|-----------|-----|26| **Requirements Agent** | completeness (45), gdd_alignment (25), no_regressions (20), verification_criteria (10) | **100** |27| **Template Agent** | api_correctness (40), platform_constraints (30), code_quality (30) | **100** |2829The orchestrator deploys Requirements Agent first, then Template Agent. Each scores out of 100. Pass threshold >= 90 for each.3031## Deduction Rules (shared by both agents)3233| Severity | Deduction | Definition |34|----------|-----------|------------|35| critical | **-10** from its category (min 0) | Won't compile, feature missing entirely, breaks existing features |36| major | **-5** from its category (min 0) | Wrong API usage, partially implemented, logic error |37| minor | **-2** from its category (min 0) | Style issue, cosmetic difference, non-functional concern |3839**How to score:** Start each category at its max. Deduct per issue. Category cannot go below 0. Total = sum of all categories.4041---4243## Requirements Agent4445Checks implementation against prompt instructions, GDD, prior context, and verification criteria.4647### How to Verify48491. **Read the game code** and **GDD**502. **Read `prior_context`** to understand what existed before this prompt513. **Compare implementation to prompt `instructions`** — is every instruction implemented?524. **Compare implementation to GDD** — does it match the game design?535. **Check for regressions** — are features from prior prompts still intact?546. **Check verification criteria** — does the implementation meet the prompt's test requirements?5556### Categories5758| Category | Max | What to check |59|----------|-----|---------------|60| **completeness** | 45 | Every instruction in the prompt is implemented; nothing missing, nothing extra |61| **gdd_alignment** | 25 | Implementation matches the game design document (mechanics, visuals, behavior) |62| **no_regressions** | 20 | Features documented in `prior_context` still work; no broken functionality |63| **verification_criteria** | 10 | The prompt's own verification/test requirements are met |6465### Prompt Template6667```68You are a WowCube requirements verifier. Your job is to check whether the69game code implements what was asked — completely, correctly, and without70breaking existing features.7172## Task73<insert Verification Task JSON>7475## Rules761. Read the game code, GDD, and prior_context BEFORE scoring772. Check every instruction in `instructions` — is it implemented?783. Check the GDD — does the implementation match the design?794. Check prior_context — are previous features still intact?805. Check verification_criteria — are test requirements met?816. Do NOT check API correctness or template compliance — another agent handles that827. Score ONLY these categories: completeness (max 45),83 gdd_alignment (max 25), no_regressions (max 20),84 verification_criteria (max 10)8586## Deduction Rules87- critical (-10): feature entirely missing, breaks existing feature88- major (-5): partially implemented, wrong behavior, GDD mismatch89- minor (-2): cosmetic difference, minor deviation9091## Response92Return ONLY this JSON — no markdown, no explanation:93{94 "agent": "requirements",95 "prompt": N,96 "scores": {97 "completeness": <0-45>,98 "gdd_alignment": <0-25>,99 "no_regressions": <0-20>,100 "verification_criteria": <0-10>101 },102 "total": <sum of above, 0-100>,103 "status": "pass if total >= 90, else fail",104 "issues": [105 {106 "severity": "critical|major|minor",107 "category": "completeness|gdd_alignment|no_regressions|verification_criteria",108 "description": "...",109 "location": "file:line or function name",110 "deduction": N111 }112 ],113 "summary": "one sentence assessment"114}115```116117---118119## Template Agent120121Reads `app_ai_template.h` and verifies the game code against **everything** documented in it: instructions, API signatures, comments, warnings, and usage rules.122123### How to Verify1241251. **Read `app_ai_template.h` in full** — this is the source of truth1262. **Extract every rule** from the template:127 - The `INSTRUCTIONS FOR AI AGENT` block — each bullet (`*`) is a mandatory coding standard128 - `// Short:` annotations — what the API does129 - `// Declaration:` annotations — exact function signatures (parameter count, types, order)130 - `// Comment:` annotations — usage semantics, constraints, valid ranges, edge cases131 - `// Critical Comment:` annotations — mandatory rules; ignoring causes bugs132 - `// Warn:` annotations — things that MUST NOT be done133 - Inline comments on code lines — parameter meanings, value ranges, behavioral notes134 - `// Demo: do not copy-paste this code` markers — code below must not be copied1353. **Read the game code** (`src/app_<game>.h`)1364. **For each API call in the game code:**137 - Find the matching `Declaration:` in the template138 - Verify parameter count, types, and order match139 - Verify usage semantics match all `Comment:` annotations for that API140 - Check for `Critical Comment:` and `Warn:` violations1415. **For coding patterns:**142 - Verify no demo code was copied from sections marked `Demo: do not copy-paste this code`143 - Verify no internal template comments (Short/Declaration/Comment/Warn) appear in game code144 - Check all rules from the `INSTRUCTIONS FOR AI AGENT` block:145 - Explicit type casts on every narrowing/widening/cross-type assignment146 - Fixed-width types only (`<stdint.h>`)147 - Project header structure preserved148 - All 7 handlers present with exact signatures: `on_init()`, `on_tick()`, `on_tap(int32_t tapid, int32_t count)`, `on_twisted(int32_t twid, uint32_t disconnected_ms)`, `on_pretwisted(int32_t twid)`, `on_shake(int32_t shakeid)`, `on_proc_draw` (stub); unused params referenced149 - `on_shake` and `on_proc_draw` stubs present: `on_shake` is link-required — the ARM module fails to link without it; `on_proc_draw` is bound unconditionally by the simulator, so the SIM build fails without the stub, while the ARM module only references it under `#define APP_HAS_PROC_DRAW`; no gameplay logic relies on shake input (the engine currently always runs the system default go-home)150 - `src/app.h` defines all six mandatory APP_* macros: APP_VERSION, APP_TITLE, APP_DIR, APP_GUID1 (random non-zero 64-bit), APP_CATEGORIES, APP_COLORS151 - Code never hand-edits `_ids.h`, the `src/app.h` defines, or `index.bin` — these are owned by the scaffolder/packer152 - Modular code: structs for state, small focused functions, named constants1536. **For struct organization and sprite references:**154 - `appvars_t` must not be a flat bag of fields. Related state must be grouped into dedicated sub-structs with `_t` suffix. Severity: **major** per ungrouped domain155 - Sprite references must be stored as `appObject_t*` pointers, not as raw `int32_t` indices. After `OCT_add` returns an index, immediately convert it to a pointer via `&gObjects[id]` and store the pointer. Use `NULL` for "no sprite". Severity: **major** per field that stores an index instead of a pointer156157### Categories158159| Category | Max | What to check |160|----------|-----|---------------|161| **api_correctness** | 40 | Every API call matches the template's Declaration, Comment, Critical Comment, and Warn annotations |162| **platform_constraints** | 30 | All rules from the template's INSTRUCTIONS block and platform-specific comments: TL macro, gObjects[0] reserved, SPRITES_CAP, explicit casts, fixed-width types, all 7 handlers (incl. the `on_shake`/`on_proc_draw` stubs), no GAP in OCT_add. **Upscale-aware coordinates:** regular sprites are authored at HALF resolution and the engine upscales them x2 at draw time, so all layout/collision math (positioning, centering, edge/screen-fit, movement bounds, hitboxes, spacing, grid steps) MUST use each sprite's on-screen extent = 2x its authored size in the 240x240 space. Flag any code that uses the authored (half) sprite size for coordinates or collision — that makes objects half the drawn size and breaks gameplay. **Exception:** ANY FULLSIZE sprite (manifest `flags.fullsize` — palette fullsize or full-color fullsize alike; the engine draws every FULLSIZE sprite at zoom 1) renders 1:1 with no x2 upscale, so for those sprites the native authored size IS the on-screen extent — do not flag native-size coordinate math for FULLSIZE sprites of either color |163| **code_quality** | 30 | No copied demo code or internal comments; modular struct organization (related state grouped into sub-structs, not flat); sprite references as `appObject_t*` pointers not raw indices; small focused functions; named constants |164165### Prompt Template166167```168You are a WowCube template compliance verifier. Your job is to read the169API template and check the game code against EVERY instruction, annotation,170and comment in it.171172## Task173<insert Verification Task JSON>174175## Rules1761. Read `app_ai_template.h` FIRST — this is your source of truth1772. Read the game code file1783. Every template annotation (Short, Declaration, Comment, Critical Comment,179 Warn) and every INSTRUCTIONS bullet is a verifiable rule1804. For each API call in the game code, find the matching Declaration in the181 template and verify correctness against ALL associated comments1825. Check coding standards from the INSTRUCTIONS block1836. Check struct organization: `appvars_t` must not be a flat bag of fields.184 Related state must be grouped into dedicated sub-structs with `_t`185 suffix. Each ungrouped domain is a major (-5) code_quality violation1867. Check sprite references: all sprite references must be stored as187 `appObject_t*` pointers, not raw `int32_t` indices. After `OCT_add`188 returns an index, it must be converted to a pointer via189 `&gObjects[id]` and stored as `appObject_t*`. Use `NULL` for190 "no sprite". Each field storing a raw index instead of a pointer191 is a major (-5) code_quality violation1928. Check that no demo code (sections marked "Demo: do not copy-paste") was copied1939. Check that no internal template comments appear in the game code19410. Score ONLY these categories: api_correctness (max 40),195 platform_constraints (max 30), code_quality (max 30)19611. Cite the specific template annotation for every issue197198## Deduction Rules199- critical (-10): won't compile, breaks engine contract, data loss200- major (-5): wrong API usage, missing cast, wrong param type201- minor (-2): style issue, non-functional concern202203## Response204Return ONLY this JSON — no markdown, no explanation:205{206 "agent": "template",207 "prompt": N,208 "scores": {209 "api_correctness": <0-40>,210 "platform_constraints": <0-30>,211 "code_quality": <0-30>212 },213 "total": <sum of above, 0-100>,214 "status": "pass if total >= 90, else fail",215 "issues": [216 {217 "severity": "critical|major|minor",218 "category": "api_correctness|platform_constraints|code_quality",219 "description": "...",220 "location": "file:line or function name",221 "template_rule": "the specific annotation or instruction violated",222 "deduction": N223 }224 ],225 "summary": "one sentence assessment"226}227```