2026-03-26 18:14:35 +00:00
|
|
|
<!-- last-reviewed: f32707ba659de278a3af434e3549fb8a8dce9d3a -->
|
2026-03-21 12:44:23 +00:00
|
|
|
# Planner Agent
|
|
|
|
|
|
2026-03-21 18:28:38 +00:00
|
|
|
**Role**: Strategic planning using a Prerequisite Tree (Theory of Constraints),
|
|
|
|
|
executed directly from cron via tmux + Claude.
|
|
|
|
|
Phase 0 (preflight): pull latest code, load persistent memory and prerequisite
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
tree from `$OPS_REPO_ROOT/knowledge/planner-memory.md` and `$OPS_REPO_ROOT/prerequisites.md`. Also reads
|
2026-03-22 12:07:31 +00:00
|
|
|
all available formulas: factory formulas (`$FACTORY_ROOT/formulas/*.toml`) and
|
|
|
|
|
project-specific formulas (`$PROJECT_REPO_ROOT/formulas/*.toml`). Phase 1
|
2026-03-21 18:28:38 +00:00
|
|
|
(prediction-triage): triage `prediction/unreviewed` issues filed by the
|
2026-03-26 00:05:34 +00:00
|
|
|
Predictor — for each prediction, the planner **must** act or dismiss with a
|
|
|
|
|
stated reason (no fence-sitting, no `prediction/backlog` label). Actions:
|
|
|
|
|
promote to a real issue (relabel to `prediction/actioned`, close) or
|
|
|
|
|
dismiss (comment reason, relabel to `prediction/dismissed`, close).
|
|
|
|
|
The planner has a per-run action budget — it cannot defer indefinitely.
|
|
|
|
|
Dismissed predictions get re-filed by the predictor with stronger evidence
|
|
|
|
|
if still valid. Phase 2
|
2026-03-21 18:28:38 +00:00
|
|
|
(update-prerequisite-tree): scan repo state + open/closed issues, mark resolved
|
2026-03-23 12:47:32 +00:00
|
|
|
prerequisites, discover new ones, update the tree. **Also scans comments on
|
2026-03-26 09:09:58 +00:00
|
|
|
referenced issues for bounce/stuck signals** (BOUNCED, LABEL_CHURN)
|
|
|
|
|
to detect issues ping-ponging between backlog and underspecified. Issues that
|
|
|
|
|
need human decisions or external resources are filed as vault procurement items
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
(`$OPS_REPO_ROOT/vault/pending/*.md`) instead of being escalated. Phase 3
|
2026-03-21 18:28:38 +00:00
|
|
|
(file-at-constraints): identify the top 3 unresolved prerequisites that block
|
2026-03-23 12:47:32 +00:00
|
|
|
the most downstream objectives — file issues as either `backlog` (code changes,
|
2026-03-31 19:42:25 +00:00
|
|
|
dev-agent) or `action` (run existing formula, dispatcher). **Stuck issues
|
2026-03-23 12:47:32 +00:00
|
|
|
(detected BOUNCED/LABEL_CHURN) are dispatched to the `groom-backlog` formula
|
|
|
|
|
in breakdown mode instead of being re-promoted** — this breaks the ping-pong
|
2026-03-26 09:09:58 +00:00
|
|
|
loop by splitting them into dev-agent-sized sub-issues. **Human-blocked issues
|
2026-03-26 13:01:36 +00:00
|
|
|
are routed through the vault** — the planner files an actionable procurement
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
item (`$OPS_REPO_ROOT/vault/pending/<project>-<slug>.md` with What/Why/Human action/Factory
|
2026-03-26 13:01:36 +00:00
|
|
|
will then sections) and marks the prerequisite as blocked-on-vault in the tree.
|
|
|
|
|
Deduplication: checks pending/ + approved/ + fired/ before creating.
|
2026-03-22 12:36:19 +00:00
|
|
|
Phase 4 (journal-and-memory): write updated prerequisite tree + daily journal
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
entry (committed to ops repo) and update `$OPS_REPO_ROOT/knowledge/planner-memory.md`.
|
|
|
|
|
Phase 5 (commit-ops): commit all ops repo changes, push directly.
|
2026-03-22 12:07:31 +00:00
|
|
|
AGENTS.md maintenance is handled by the Gardener.
|
|
|
|
|
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
**Artifacts use `$OPS_REPO_ROOT`**: All planner artifacts (journal,
|
|
|
|
|
prerequisite tree, memory, vault state) live under `$OPS_REPO_ROOT/`.
|
|
|
|
|
Each project manages its own planner state in a separate ops repo.
|
2026-03-21 12:44:23 +00:00
|
|
|
|
2026-03-21 16:02:29 +00:00
|
|
|
**Trigger**: `planner-run.sh` runs daily via cron (accepts an optional project
|
2026-03-25 00:07:52 +00:00
|
|
|
TOML argument, defaults to `projects/disinto.toml`). Sources `lib/guard.sh` and
|
|
|
|
|
calls `check_active planner` first — skips if `$FACTORY_ROOT/state/.planner-active`
|
|
|
|
|
is absent. Then creates a tmux session with `claude --model opus`, injects
|
|
|
|
|
`formulas/run-planner.toml` as context, monitors the phase file, and cleans up
|
|
|
|
|
on completion or timeout. No action issues — the planner is a nervous system
|
|
|
|
|
component, not work.
|
2026-03-21 12:44:23 +00:00
|
|
|
|
|
|
|
|
**Key files**:
|
|
|
|
|
- `planner/planner-run.sh` — Cron wrapper + orchestrator: lock, memory guard,
|
2026-03-26 00:05:34 +00:00
|
|
|
sources disinto project config, builds structural analysis via `lib/formula-session.sh:build_graph_section()`,
|
|
|
|
|
creates tmux session, injects formula prompt, monitors phase file, handles crash recovery, cleans up
|
2026-03-21 18:28:38 +00:00
|
|
|
- `formulas/run-planner.toml` — Execution spec: six steps (preflight,
|
|
|
|
|
prediction-triage, update-prerequisite-tree, file-at-constraints,
|
|
|
|
|
journal-and-memory, commit-and-pr) with `needs` dependencies. Claude
|
|
|
|
|
executes all steps in a single interactive session with tool access
|
2026-03-23 12:47:32 +00:00
|
|
|
- `formulas/groom-backlog.toml` — Dual-mode formula: grooming (default) or
|
|
|
|
|
breakdown (dispatched by planner for bounced/stuck issues — splits the issue
|
|
|
|
|
into dev-agent-sized sub-issues, removes `underspecified` label)
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
- `$OPS_REPO_ROOT/prerequisites.md` — Prerequisite tree: versioned constraint
|
2026-03-21 18:28:38 +00:00
|
|
|
map linking VISION.md objectives to their prerequisites. Planner owns the
|
|
|
|
|
tree, humans steer by editing VISION.md. Tree grows organically as the
|
|
|
|
|
planner discovers new prerequisites during runs
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
- `$OPS_REPO_ROOT/knowledge/planner-memory.md` — Persistent memory across runs (in ops repo)
|
|
|
|
|
- `$OPS_REPO_ROOT/journal/planner/*.md` — Daily raw logs from each planner run (in ops repo)
|
2026-03-21 12:44:23 +00:00
|
|
|
|
2026-03-21 18:28:38 +00:00
|
|
|
**Constraint focus**: The planner uses Theory of Constraints to avoid premature
|
|
|
|
|
issue filing. Only the top 3 unresolved prerequisites that block the most
|
|
|
|
|
downstream objectives get filed as issues. Everything else exists in the
|
|
|
|
|
prerequisite tree but NOT as issues. This prevents the "spray issues across
|
|
|
|
|
all milestones" pattern that produced premature work in planner v1/v2.
|
2026-03-21 12:44:23 +00:00
|
|
|
|
|
|
|
|
**Environment variables consumed**:
|
fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757
## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
|
|
|
- `FORGE_TOKEN`, `FORGE_PLANNER_TOKEN` (falls back to FORGE_TOKEN), `FORGE_REPO`, `FORGE_API`, `PROJECT_NAME`, `PROJECT_REPO_ROOT`, `OPS_REPO_ROOT`
|
2026-03-21 12:44:23 +00:00
|
|
|
- `PRIMARY_BRANCH`, `CLAUDE_MODEL` (set to opus by planner-run.sh)
|