You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #663. Blocked by #665 and #666 (needs project.toml on disk and type detection to identify project-bound sessions).
Important
Problem: The autoresearch director, its mode card, and the director-core skill all hardcode vault paths — session ledgers in <personal vault>/sessions/, hypotheses in <vault>/hypotheses/, specs in <vault>/specs/. When a session is bound to a research project, the director has no way to read or write the project's ledger/, scripts/, data/, or config/ directories.
Approach: Introduce a conditional path model: when the context includes an Active Research Project (injected by stack_state.ts from project.toml), the director reads/writes the project directory. When no project is bound, existing vault behavior is unchanged. Update the LEDGER DISCOVERY RULE to v2 (project-aware), update the autoresearch skill with conditional path rules, and update the context plugin to inject project metadata.
Scope: 7 files across skills, mode card, context plugin, and onset router. No changes to the gate pack, core clauses, role definitions, or loop structure.
Acceptance Criteria
Director-core (LEDGER DISCOVERY RULE v2):
director-core/SKILL.md updated: LEDGER DISCOVERY RULE carries a project-aware conditional — when project-bound, ledger path is <project>/ledger/campaigns/campaign-<YYYYMMDD>-<slug>.md; when not, existing <personal vault>/sessions/session-<YYYYMMDD>-<slug>.md
The canonical block remains self-contained and embeddable by mode cards
autoresearch/SKILL.md updated: when operating on a research project, reads hypotheses from <project>/ledger/hypotheses/, writes campaign ledgers to <project>/ledger/campaigns/, writes observations to <project>/ledger/observations/, reads scripts from <project>/scripts/, reads data from <project>/data/, reads config from <project>/config/
vault_contract frontmatter supplemented with project_contract (folders: ledger/{hypotheses,observations,campaigns}, scripts/, data/, config/)
Vault fallback: when no project is bound, all existing vault paths unchanged (no regression)
Checkout registry (sessions/CHECKOUTS.md) stays vault-based (fleet-wide, not project-scoped)
Mode card:
agents/autoresearch.md re-embeds the updated DIRECTOR-SPINE block (v2 ledger rule) between the existing markers
Context plugin (project injection):
stack_state.ts detects the session's project binding (workspace folder with project.toml)
When project-bound, injects an ## Active Research Project block into the system prompt: project name, question, status, directory path, and layout summary
When not project-bound, existing context injection unchanged
Supporting skills:
hypothesis-review/SKILL.md updated: when project-bound, reads hypotheses from <project>/ledger/hypotheses/
Onset router (AGENTS.md + router.ts): "Resume the active campaign" checks <project>/ledger/campaigns/ when project-bound, vault sessions/ otherwise
Invariants preserved:
The four core clauses unchanged (ledger discipline, cast pattern, compaction honesty, anti-gaming)
The gate pack (research.toml) unchanged — it references concepts, not paths
Role definitions (hypothesizer/experimenter/analyzer) unchanged
Fleet-wide checkout registry stays vault-based
Testing Decisions
Manual smoke test: bind a session to a research project, invoke autoresearch, verify director reads <project>/ledger/hypotheses/ and writes campaign ledger to <project>/ledger/campaigns/
Manual regression test: session not bound to a project, verify director uses vault paths as before
Unit test for stack_state.ts: project-bound session → "Active Research Project" block in context; non-project session → no block
Key Decisions
Decision
Rationale
Conditional paths (project vs vault), not hard switch
Note on director-core/SKILL.md: This skill's canonical copy lives in the harmoniqs/armonissima repo (the team vault), mounted read-only at ~/.amico/vaults/armonissima/skills/director-core/. The runtime copy at opencode-project/skills/director-core/ is staged from armonissima. To update it, submit a PR to harmoniqs/armonissima first, then the staged copy will pick up the change on next skill resolution.
Constraints & Invariants
The protocol (loop, clauses, gates, roles) is path-agnostic and unchanged
The conditional path model is "project when bound, vault otherwise" — never both simultaneously for the same artifact
The checkout registry is the sole exception: always vault-based (fleet-wide coordination)
A project-bound campaign that runs without a vault must work (standalone-first)
Source
Part of #663. Blocked by #665 and #666. Cross-repo: requires a PR to harmoniqs/armonissima for the director-core/SKILL.md update.
Autoresearch director project integration
Part of #663. Blocked by #665 and #666 (needs
project.tomlon disk and type detection to identify project-bound sessions).Important
Problem: The autoresearch director, its mode card, and the director-core skill all hardcode vault paths — session ledgers in
<personal vault>/sessions/, hypotheses in<vault>/hypotheses/, specs in<vault>/specs/. When a session is bound to a research project, the director has no way to read or write the project'sledger/,scripts/,data/, orconfig/directories.Approach: Introduce a conditional path model: when the context includes an Active Research Project (injected by
stack_state.tsfromproject.toml), the director reads/writes the project directory. When no project is bound, existing vault behavior is unchanged. Update the LEDGER DISCOVERY RULE to v2 (project-aware), update the autoresearch skill with conditional path rules, and update the context plugin to inject project metadata.Scope: 7 files across skills, mode card, context plugin, and onset router. No changes to the gate pack, core clauses, role definitions, or loop structure.
Acceptance Criteria
Director-core (LEDGER DISCOVERY RULE v2):
director-core/SKILL.mdupdated: LEDGER DISCOVERY RULE carries a project-aware conditional — when project-bound, ledger path is<project>/ledger/campaigns/campaign-<YYYYMMDD>-<slug>.md; when not, existing<personal vault>/sessions/session-<YYYYMMDD>-<slug>.mdAutoresearch skill (project-aware context assembly):
autoresearch/SKILL.mdupdated: when operating on a research project, reads hypotheses from<project>/ledger/hypotheses/, writes campaign ledgers to<project>/ledger/campaigns/, writes observations to<project>/ledger/observations/, reads scripts from<project>/scripts/, reads data from<project>/data/, reads config from<project>/config/vault_contractfrontmatter supplemented withproject_contract(folders:ledger/{hypotheses,observations,campaigns},scripts/,data/,config/)sessions/CHECKOUTS.md) stays vault-based (fleet-wide, not project-scoped)Mode card:
agents/autoresearch.mdre-embeds the updated DIRECTOR-SPINE block (v2 ledger rule) between the existing markersContext plugin (project injection):
stack_state.tsdetects the session's project binding (workspace folder withproject.toml)## Active Research Projectblock into the system prompt: project name, question, status, directory path, and layout summarySupporting skills:
hypothesis-review/SKILL.mdupdated: when project-bound, reads hypotheses from<project>/ledger/hypotheses/router.ts): "Resume the active campaign" checks<project>/ledger/campaigns/when project-bound, vaultsessions/otherwiseInvariants preserved:
research.toml) unchanged — it references concepts, not pathsTesting Decisions
<project>/ledger/hypotheses/and writes campaign ledger to<project>/ledger/campaigns/stack_state.ts: project-bound session → "Active Research Project" block in context; non-project session → no blockKey Decisions
Files modified
skills/director-core/SKILL.mdharmoniqs/armonissima(team vault, separate repo) — requires a PR to armonissima, merged before this issue can landpackages/extension/skills/autoresearch/SKILL.mdpackages/extension/agents/autoresearch.mdpackages/extension/opencode-plugin/stack_state.tsdetectProjectTypefrom #666)packages/extension/skills/hypothesis-review/SKILL.mdpackages/extension/AGENTS.mdpackages/extension/src/scores/router.tsNote on
director-core/SKILL.md: This skill's canonical copy lives in theharmoniqs/armonissimarepo (the team vault), mounted read-only at~/.amico/vaults/armonissima/skills/director-core/. The runtime copy atopencode-project/skills/director-core/is staged from armonissima. To update it, submit a PR toharmoniqs/armonissimafirst, then the staged copy will pick up the change on next skill resolution.Constraints & Invariants
Source
Part of #663. Blocked by #665 and #666. Cross-repo: requires a PR to
harmoniqs/armonissimafor thedirector-core/SKILL.mdupdate.