-
Notifications
You must be signed in to change notification settings - Fork 1
structured planning
Aryan Iyappan edited this page Apr 28, 2026
·
1 revision
title: Structured Planning category: concepts tags: [harness, planning, dag, layer-2, quality] status: developing created: 2026-04-28 updated: 2026-04-28 sources:
- "harness-implementation-plan" related:
- "agentic-harness"
- "spec-hardening"
- "grounding-checkpoints"
- "schema-orchestration" layer: "Layer_2" summary: Layer 2 produces a machine-readable task DAG reviewed before code begins. No code without a plan. Plans are validated, adversarially reviewed, and must be approved. provenance: extracted: 0.85 inferred: 0.15 ambiguous: 0.0
Machine-readable task DAG reviewed before code begins. No code without a plan.
spec_hardened event →
Planner.createPlan(spec) → AI call → ExecutionPlan with nodes[]
↓
DAG validation: cycle detection, orphan detection, spec coverage
↓
If invalid: regenerate (max_plan_revisions)
↓
Plan review gate:
→ Adversarial critic review of plan
→ OR human approval (config: require_approval)
↓
Store ExecutionPlan in .pi/harness/plans/<id>.json
↓
Emit: plan_approved → Archon workflow (Layer 7)
Each PlanNode in the DAG includes:
- task_id, title, description — what to do
- inputs, outputs — declared data dependencies
- dependencies — which tasks must complete first
- risk_surface — at least one risk entry per task
- verification — concrete method to verify completion
- status — pending → in_progress → completed/failed/blocked
The ExecutionPlan tracks:
- DAG validation status
- Review status (pending/approved/rejected/revised)
- Reviewer notes if rejected
Automated DAG validation checks:
- Cycle detection — no circular dependencies
- Orphan detection — no disconnected nodes
- Spec coverage — every success criterion maps to at least one task
Plans go through adversarial review before approval:
- A critic agent attacks the plan (missing tasks, incorrect dependencies, overly broad tasks)
- If rejected, the planner regenerates with review notes incorporated
-
require_approvalconfig controls whether human approval is also needed -
max_plan_revisionscaps regeneration cycles (default: 3)
| Type | Name | Description |
|---|---|---|
| Tool | create-plan |
Generate plan from hardened spec |
| Tool | review-plan |
Adversarial review of plan |
| Tool | approve-plan |
Human approval gate |
| Command | /harness-plan-status |
Current plan status |
-
lib/harness-planner.ts— Planner class, DAG generation, validation -
extensions/harness-planner.ts— Extension: listens for spec_hardened, produces plan