Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/rules/.ai-rules/rules/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@ feat(auth): add token validation with session management
**Purpose:**
Create actionable implementation plans following TDD and augmented coding principles

### API Assumption Verification (PLAN mode)

When a plan references external API fields, schemas, or behaviors:
1. **Cite source**: Include the official documentation URL for every API assumption
2. **Mark unverified**: Tag any assumption without a verified source as `[UNVERIFIED]`
3. **Verify before ACT**: All `[UNVERIFIED]` items must be verified (via WebFetch/WebSearch) before transitioning to ACT mode
4. **No fabricated schemas**: Never assume API input/output fields exist without documentation proof

Example:
- ✅ "Hook stdin includes `tool_name` field ([source](https://code.claude.com/docs/en/hooks))"
- ❌ "Hook stdin includes `session_cost` field" (no source → will cause implementation failure)

---

### Structured Reasoning Process (SRP)
Expand Down
18 changes: 18 additions & 0 deletions packages/rules/.ai-rules/skills/writing-plans/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,24 @@ Every non-trivial decision in the plan MUST include at least two approaches with
- State the chosen approach with a clear rationale
- If only one viable approach exists, explain why alternatives were ruled out

## API Verification

When the plan references external APIs, SDKs, or protocols:

1. **Document every API assumption** with its source URL
2. **Create an "API Assumptions" table** in the plan:

| Assumption | Verified? | Source |
|-----------|:---------:|--------|
| Hook stdin has `tool_name` | ✅ | [Hooks Reference](url) |
| Hook stdin has `session_cost` | ❌ UNVERIFIED | — |

1. **All assumptions must be verified before ACT phase**
2. **WebFetch/WebSearch the official docs** — never rely on memory or guesses

### Why This Matters
Unverified API assumptions propagate into implementation, causing features to be unimplementable as designed. Verification at PLAN time costs minutes; rework at ACT time costs hours.

## Task Structure

```markdown
Expand Down
Loading