Created
January 23, 2026 12:45
-
-
Save antonioc-cl/a5140e9e1c896bae90c89cedf1caa67e to your computer and use it in GitHub Desktop.
AgentBacklog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| backlog.json interface + contract: | |
| export type ISODateString = `${number}-${number}-${number}`; | |
| export type Priority = "P0" | "P1" | "P2" | "P3"; | |
| export type Scope = "IN_SCOPE" | "OUT_OF_SCOPE" | "ICEBOX"; | |
| export type Risk = "LOW" | "MED" | "HIGH"; | |
| export type Category = | |
| | "functional" | |
| | "architecture" | |
| | "security" | |
| | "reliability" | |
| | "performance" | |
| | "quality" | |
| | "testing" | |
| | "e2e" | |
| | "ux" | |
| | "observability"; | |
| export type NetworkMode = "allowlist" | "deny_all" | "unrestricted"; | |
| export type ExternalDbAccessPolicy = "forbidden" | "allow_with_flag"; | |
| export type WorkItemState = | |
| | "TODO" | |
| | "IN_PROGRESS" | |
| | "BLOCKED" | |
| | "IN_REVIEW" | |
| | "DONE"; | |
| export interface BacklogMeta { | |
| product: string; | |
| version: string; | |
| namespace: string; | |
| updated: ISODateString; | |
| goal: string; | |
| agent_execution_contract: { | |
| sandbox: { | |
| fresh_env_per_run: boolean; | |
| artifact_dir: string; | |
| workspace_dir: string; | |
| cleanup_on_finish: boolean; | |
| }; | |
| network: { | |
| mode: NetworkMode; | |
| allowed_hosts: string[]; | |
| }; | |
| datastores: { | |
| external_db_access: ExternalDbAccessPolicy; | |
| local_db?: { | |
| kind: "postgres" | "sqlite"; | |
| startup_cmd: string; | |
| migrate_cmd: string; | |
| seed_cmd?: string; | |
| teardown_cmd: string; | |
| }; | |
| }; | |
| }; | |
| interfaces: { | |
| bootstrap_cmd: string; | |
| verify_cmd: string; | |
| unit_cmd?: string; | |
| integration_cmd?: string; | |
| e2e_cmd?: string; | |
| coverage_cmd?: string; | |
| }; | |
| quality_policy: { | |
| tdd_required_for_categories: Category[]; | |
| bdd_required_for_categories: Category[]; | |
| bdd_required_if_user_flow: boolean; | |
| definition_of_done_gates: string[]; | |
| }; | |
| } | |
| export interface WorkItemEvidence { | |
| verification_artifact_path?: string; | |
| commit?: string; | |
| notes?: string; | |
| } | |
| export interface WorkItemStatus { | |
| state: WorkItemState; | |
| evidence?: WorkItemEvidence; | |
| } | |
| export interface WorkItem { | |
| id: string; | |
| category: Category; | |
| title: string; | |
| priority: Priority; | |
| scope: Scope; | |
| risk: Risk; | |
| objective: string; | |
| constraints: string[]; | |
| acceptance_criteria: string[]; | |
| verification: { | |
| must_pass: string[]; | |
| suggested?: string[]; | |
| }; | |
| test_intent: { | |
| tdd: { required: boolean }; | |
| bdd: { required: boolean; scenarios: string[] }; | |
| }; | |
| deliverables?: { | |
| expected_artifacts?: string[]; | |
| expected_code_areas?: string[]; | |
| }; | |
| status: WorkItemStatus; | |
| // Keep for humans, but not required for agents: | |
| estimated_hours?: number; | |
| dependencies?: string[]; | |
| } | |
| export interface AgentBacklog { | |
| meta: BacklogMeta; | |
| items: WorkItem[]; | |
| } | |
| -- | |
| Generate valid `backlog` JSON. | |
| - Every `WorkItem` must be outcome-first: | |
| a) `objective` (1–2 sentences) | |
| b) `constraints` (MUST/SHOULD style) | |
| c) `acceptance_criteria` (verifiable statements) | |
| - `verification.must_pass` must include `meta.interfaces.verify_cmd` at minimum. | |
| - No hardcoding brittle stuff (no exact test counts, no fixed file paths unless required by an external interface). | |
| - `status.state` defaults to `TODO` unless evidence is provided. | |
| - If `category` implies tests by policy, set `test_intent` accordingly. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment