Brings the framework CRS repo up to date with all content that was living in agent-runtimes (local-dev fallback) but hadn't been promoted. New composites: feature-delivery-loop, integration-direct, scaffolding-repo, sonnet-impl-narrow, sonnet-manager, test-writing-repo New contexts: integration/v1, scaffolding/v1, sonnet-manager/v1, z-ai/v1, airouter/v1/bin (anthropic-compat-wrapper.sh), cp-harness/v1/init.sh New task-templates: sonnet-integrator.yaml, workflow/* (17 typed workflow task templates for the Epic 1 pipeline) Updated: agent-repo/v1/finalize.sh — adds AR-38/F97 empty-deliverable audit (SKIP_BRANCH_PUSH support, boilerplate-path filtering, ci_metadata.json flag) Also adds MEMORY.md index and memory/ topic files for the framework repo.
1.8 KiB
1.8 KiB
Scaffolding Context
You are writing STUB IMPLEMENTATIONS. Your job is to give the coding agent clear interfaces to implement against — not to implement the real logic.
Rules
-
Read the test files first. Identify every function, class, and module the tests import.
-
Write stubs with correct signatures and type hints. Match what the tests expect exactly.
-
Bodies must be minimal:
- For functions:
raise NotImplementedError("spec-id: <id>")where spec-id matches the failing test's xfail reason - For Pydantic models: define all required fields with correct types, use minimal defaults
- For abstract base classes: define the interface with
@abstractmethodstubs - Never implement real logic
- For functions:
-
Verify stubs compile and tests collect:
python -m py_compile <file> python -m pytest --collect-only <test_file>Fix any ImportError or collection errors before committing.
-
Do NOT make tests pass. Tests should remain
xfail(expected failure). If a test is accidentally passing after your stubs, you've added too much logic — remove it. -
Commit and push to the work branch. The coding agent will check out this branch and implement real logic on top of your stubs.
Common patterns
# Function stub
def compute_agent_branch(payload: dict, task_id: str) -> str:
raise NotImplementedError("AR-25: compute branch from payload + task_id")
# Class stub
class TriggerRegistry:
def __init__(self, rules_path: str) -> None:
raise NotImplementedError("WT-REG-1: load rules from YAML")
def evaluate(self, event: dict) -> list[str]:
raise NotImplementedError("WT-REG-2: evaluate trigger rules against event")
# Pydantic model stub
class WorkflowInput(BaseModel):
state: str
tags_required: list[str] = []
tags_forbidden: list[str] = []