1.6 KiB
1.6 KiB
| description | allowed-tools |
|---|---|
| Implement an approved entity from the manifest | Read, Write, Bash |
Implement Entity
Implement the entity: "$ARGUMENTS"
CRITICAL RULES
⚠️ GUARDRAIL ENFORCEMENT ACTIVE
You can ONLY write to files that:
- Are defined in
project_manifest.json - Have status =
APPROVED - Match the
file_pathin the manifest EXACTLY
Steps
-
Verify Phase: Must be in
IMPLEMENTATION_PHASE -
Find Entity in manifest:
- If "$ARGUMENTS" is
--all: implement all APPROVED entities - Otherwise: find the specific entity by ID
- If "$ARGUMENTS" is
-
For Each Entity:
a. Load Definition from manifest
b. Verify Status is
APPROVEDc. Generate Code matching the specification:
- Props must match manifest exactly
- Types must match manifest exactly
- File path must match
file_pathin manifest
d. Write File to the exact path in manifest
e. Run Validations:
npm run lint --if-present npm run type-check --if-present -
Status Updates (handled by post-hook):
- Entity status changes to
IMPLEMENTED - Timestamp recorded
- Entity status changes to
Code Templates
Component (Frontend)
import React from 'react';
interface [Name]Props {
// From manifest.props
}
export const [Name]: React.FC<[Name]Props> = (props) => {
return (
// Implementation
);
};
API Endpoint (Backend)
import { Request, Response } from 'express';
export async function handler(req: Request, res: Response) {
// From manifest.request/response schemas
}