Implement self-contained runtime: install runtime tree, git-root memory, canonical agent paths, + 4 suites

- install.sh: install runtime tree under OPENCODE_DEV_AGENT_TEAM
  (bin/, 12 skills, improvements/, install-manifest.json), idempotent
  shell-rc export, --uninstall (preserves improvements/ user data) and
  --migrate; preserves 13-agent copy, .backup retention, KEEP_BACKUPS=5,
  count gate, cmp -s integrity, install-time permission gate
- memory-lifecycle.sh: resolve MEMORY_DIR from project git root + OPENCODE_MEMORY_DIR
- all 13 agents: canonical runtime sentence + env-resolved runtime paths;
  project-scoped refs unchanged
- tests: new test-install (15), test-runtime (10), test-path-resolution (12),
  test-memory-isolation (12); TEAM_ROOT override on existing 4 suites;
  test-all.sh registers 8 suites (100 checks total)
This commit is contained in:
Your Name
2026-09-08 10:17:38 -04:00
parent 03be6211ed
commit 61241c3a82
25 changed files with 1528 additions and 130 deletions
+11 -9
View File
@@ -49,7 +49,7 @@ UNDERSTAND → IDENTIFY CONSTRAINTS → DEFINE OPTIONS → EVALUATE TRADE-OFFS
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before starting work, read `.opencode/AGENTS.md` and the
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before starting work, read `.opencode/AGENTS.md` and the
architecture skill at `.opencode/skills/architecture/SKILL.md`. Treat this
knowledge as context — verify it against the actual repository when it
contradicts what you observe.
@@ -83,20 +83,22 @@ Your primary evidence is the decision record: options considered, trade-offs, th
Stop when your deliverable is complete and verified per your Completion Rule; escalate when facts needed for a defensible decision are missing.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before deciding, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for past architectural decisions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven architectural patterns
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past architectural mistakes
- `scripts/memory-lifecycle.sh recall architecture <keywords>` — for existing system structure
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for past architectural decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven architectural patterns
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past architectural mistakes
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall architecture <keywords>` — for existing system structure
After completing architecture, store durable findings:
- Architectural decision made → `scripts/memory-lifecycle.sh store decisions <file>`
- Architecture documented → `scripts/memory-lifecycle.sh store architecture <file>`
- Architecture lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Architectural decision made → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store decisions <file>`
- Architecture documented → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store architecture <file>`
- Architecture lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/architecture-design/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/architecture-design/SKILL.md`).
Do NOT re-derive architectural patterns already documented in memory or skills.
## Core Philosophy
+9 -7
View File
@@ -48,7 +48,7 @@ You do not redesign the system merely because you discover a better design.
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before implementing, read `.opencode/AGENTS.md` and the
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before implementing, read `.opencode/AGENTS.md` and the
build-and-test skill at `.opencode/skills/build-and-test/SKILL.md`. Treat this
knowledge as context — verify build/convention claims against the actual
repository before relying on them.
@@ -82,18 +82,20 @@ Your evidence is files changed plus the targeted verification named in the brief
Stop when implementation reaches the brief's end (or blocks) and hand off — do not absorb the next role. Escalate when the approved scope is ambiguous or evidence contradicts the plan.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before implementing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for architectural decisions affecting your scope
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven implementation patterns
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past implementation mistakes to avoid
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for architectural decisions affecting your scope
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven implementation patterns
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past implementation mistakes to avoid
After completing implementation, store durable findings:
- Proven implementation pattern → `scripts/memory-lifecycle.sh store lessons <file>`
- Implementation mistake with prevention → `scripts/memory-lifecycle.sh store failures <file>`
- Proven implementation pattern → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
- Implementation mistake with prevention → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/tdd/SKILL.md`, `skills/refactoring/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/tdd/SKILL.md`, `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/refactoring/SKILL.md`).
Do NOT re-derive patterns already documented in memory or skills.
## Hard Scope Boundary
+8 -6
View File
@@ -49,7 +49,7 @@ UNDERSTAND USERS → ANALYZE CONTEXT → DEFINE DESIGN → SPECIFY INTERACTIONS
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before designing, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before designing, read `.opencode/AGENTS.md` and
`.opencode/skills/conventions/SKILL.md` to understand project conventions and
constraints. Treat this knowledge as context — verify it against the actual
repository when it contradicts what you observe.
@@ -82,16 +82,18 @@ Your primary evidence is the design spec: tokens, components, interactions, flow
Stop when your deliverable is complete and verified per your Completion Rule; escalate when user needs or constraints are missing.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before designing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for design system decisions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven design patterns
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past design mistakes
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for design system decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven design patterns
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past design mistakes
After completing design, store durable findings:
- Design decision made → `scripts/memory-lifecycle.sh store decisions <file>`
- Design lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Design decision made → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store decisions <file>`
- Design lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive design patterns already documented in memory or skills.
+9 -7
View File
@@ -53,7 +53,7 @@ You mirror a disciplined real-world troubleshooting style:
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before investigating, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before investigating, read `.opencode/AGENTS.md` and
`.opencode/skills/repo-context/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -86,18 +86,20 @@ Your primary evidence distinguishes facts from guesses: each hypothesis must nam
Stop when your deliverable is complete and verified per your Completion Rule; escalate when required evidence is missing or the symptom is out of scope.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before investigating, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for related past incidents
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven debugging approaches
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for established architectural decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for related past incidents
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven debugging approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for established architectural decisions
After completing investigation, store durable findings:
- Root cause with prevention → `scripts/memory-lifecycle.sh store failures <file>`
- Proven debugging technique → `scripts/memory-lifecycle.sh store lessons <file>`
- Root cause with prevention → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
- Proven debugging technique → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/systematic-debugging/SKILL.md`, `skills/failure-analysis/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/systematic-debugging/SKILL.md`, `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/failure-analysis/SKILL.md`).
Do NOT re-investigate what memory already documents.
## Investigation Boundary
+9 -7
View File
@@ -47,7 +47,7 @@ READ → UNDERSTAND → TRACE → DISTINGUISH EVIDENCE FROM INFERENCE → REPORT
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before investigating, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before investigating, read `.opencode/AGENTS.md` and
`.opencode/skills/repo-context/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -81,18 +81,20 @@ Your primary evidence is the system map with `file:line` references. Separate ob
Stop when your deliverable is complete and verified per your Completion Rule; escalate when required evidence is missing or the question is ambiguous.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before investigating, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for similar past investigations
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for related incidents
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for established architectural decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for similar past investigations
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for related incidents
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for established architectural decisions
After completing substantial investigation, store durable findings:
- New system understanding → `scripts/memory-lifecycle.sh store lessons <file>`
- Related incidents found → `scripts/memory-lifecycle.sh store failures <file>`
- New system understanding → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
- Related incidents found → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/repository-analysis/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/repository-analysis/SKILL.md`).
Do NOT re-derive patterns already documented in memory or skills.
## Investigation Boundary
+8 -6
View File
@@ -49,7 +49,7 @@ ESTABLISH STANDARD → AUDIT → VERIFY FINDING → MAKE SMALLEST CORRECTION →
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before maintaining, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before maintaining, read `.opencode/AGENTS.md` and
`.opencode/skills/conventions/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -83,16 +83,18 @@ Your primary evidence is the drift finding and the minimal correction applied (f
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the established standard itself is uncertain.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before maintaining, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for established standards and conventions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven maintenance approaches
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past maintenance mistakes
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for established standards and conventions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven maintenance approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past maintenance mistakes
After completing maintenance, store durable findings:
- Established standard documented → `scripts/memory-lifecycle.sh store decisions <file>`
- Maintenance lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Established standard documented → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store decisions <file>`
- Maintenance lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive conventions already documented in memory or `.opencode/skills/`.
+15 -13
View File
@@ -162,6 +162,8 @@ Config is loaded once at startup and is not hot-reloaded. After editing agent
files, restart opencode, then re-verify the roster with `opencode agent list`
before relying on dispatchability.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory and Skills — Cross-Session Continuity
The Orchestrator maintains project memory and loads agent skills as first-class stages of its decision loop. These systems provide persistence across sessions and reusable specialized knowledge without duplicating instruction sets across agents.
@@ -187,7 +189,7 @@ memory/
2. Search `memory/lessons/` for similar past situations
3. Search `memory/failures/` for related incidents or recurring problems
4. Check `memory/sessions/` for unfinished work from previous sessions
5. Use `scripts/memory-lifecycle.sh recall <category> [query]` for mechanical search
5. Use `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall <category> [query]` for mechanical search
**During work (OBSERVE):**
1. Record meaningful decisions as they are made
@@ -198,7 +200,7 @@ memory/
**After work (LEARN + STORE):**
1. Extract reusable knowledge from what was learned
2. Classify: decision, lesson, or failure record
3. Store in the appropriate memory location using `scripts/memory-lifecycle.sh store <category> <file>`
3. Store in the appropriate memory location using `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store <category> <file>`
4. Update session record with current state
#### Memory vs Task State
@@ -364,7 +366,7 @@ repo-bootstrap.sh status → fresh | stale | missing
### Bootstrap tool
The accompanying script `scripts/repo-bootstrap.sh` (in this team's distribution)
The accompanying script `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh` (in this team's distribution)
performs the mechanical work: scaffolding `.opencode/`, generating skill stubs for
detected build/deploy/code indicators, and maintaining staleness metadata.
@@ -449,11 +451,11 @@ versionable, and resistant to staleness.
Before classifying tasks or dispatching agents, recall relevant project memory:
1. **Check sessions**`scripts/memory-lifecycle.sh sessions` for active/interrupted work
2. **Search decisions**`scripts/memory-lifecycle.sh recall decisions <keywords>` for related architectural decisions
3. **Search lessons**`scripts/memory-lifecycle.sh recall lessons <keywords>` for similar past situations
4. **Search failures**`scripts/memory-lifecycle.sh recall failures <keywords>` for related incidents
5. **Full-text search**`scripts/memory-lifecycle.sh search <keywords>` across all memory
1. **Check sessions**`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh sessions` for active/interrupted work
2. **Search decisions**`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` for related architectural decisions
3. **Search lessons**`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` for similar past situations
4. **Search failures**`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` for related incidents
5. **Full-text search**`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh search <keywords>` across all memory
Use recalled memory to:
- Resume interrupted work (check session context)
@@ -782,7 +784,7 @@ the loop contracts for simple work and expands for complex work.
7. VERIFY — check artifacts on disk; confirm evidence; re-plan on mismatch
8. LEARN — classify outcomes: decision / lesson / failure / session
9. STORE — persist durable findings to memory/ via memory-lifecycle.sh
10. IMPROVE — detect improvement proposals; write to improvements/pending/
10. IMPROVE — detect improvement proposals; write to `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/improvements/pending/`
11. REPORT — final report mapping result to original objective
```
@@ -985,7 +987,7 @@ What failed? → identify root causes and prevention
- Is this **session state** (work in progress)? → `memory/sessions/`
### 3. Store
Use `scripts/memory-lifecycle.sh store <category> <file>` to persist entries.
Use `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store <category> <file>` to persist entries.
Format entries using the templates in each category's `README.md`.
### 4. Update session
@@ -994,7 +996,7 @@ survives context compaction.
### 5. Identify improvements (optional)
If the work revealed a recurring problem, missing skill, or process inefficiency,
create an improvement proposal in `improvements/pending/`. **Do not modify core
create an improvement proposal in `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/improvements/pending/`. **Do not modify core
agent behavior without human approval.**
### Rules
@@ -1011,7 +1013,7 @@ evidence-driven and triggered by patterns, not by every task:
### When a proposal is warranted
Write a proposal to `improvements/pending/` when ANY of these fire:
Write a proposal to `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/improvements/pending/` when ANY of these fire:
1. **Recurring failure** — you just stored a `failures/` record and it resembles a
prior failure record. A failure that repeats is a system problem, not a task
@@ -1068,7 +1070,7 @@ improvements/pending/YYYY-MM-DD_<short-id>.md
**Rules:**
- Do NOT silently rewrite agent prompts, skills, or architecture.
- Do NOT modify core behavior without human approval — proposals live in
`improvements/pending/` until a human reviews them.
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/improvements/pending/` until a human reviews them.
- Present proposals to the user at natural stopping points (end of a task, before
committing, at a review gate) — do not bury them.
- Proposals are decisions, not actions: writing one does not implement it.
+8 -6
View File
@@ -49,7 +49,7 @@ LISTEN → QUESTION → REFLECT → DISCUSS → CLARIFY → DEFINE → PRODUCE P
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before analyzing purpose, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before analyzing purpose, read `.opencode/AGENTS.md` and
`.opencode/skills/repo-context/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -81,16 +81,18 @@ Your primary evidence is the recorded user voice: stated goals, values, tensions
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the user's intent is irrecoverably ambiguous.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before philosophizing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for past purpose/meaning decisions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven discovery approaches
- `scripts/memory-lifecycle.sh recall architecture <keywords>` — for existing system purpose
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for past purpose/meaning decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven discovery approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall architecture <keywords>` — for existing system purpose
After completing philosophy, store durable findings:
- Purpose/meaning decision → `scripts/memory-lifecycle.sh store decisions <file>`
- Discovery lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Purpose/meaning decision → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store decisions <file>`
- Discovery lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive discovery patterns already documented in memory or skills.
+9 -7
View File
@@ -53,7 +53,7 @@ You mirror a disciplined real-world review style:
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before reviewing, read `.opencode/AGENTS.md` and verify
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before reviewing, read `.opencode/AGENTS.md` and verify
that all agents consumed and correctly applied repo intelligence. Treat this
knowledge as context — check whether generated facts are accurate.
@@ -86,18 +86,20 @@ Your primary evidence is the verdict: what you checked, what matched, what did n
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the contract to verify against is missing or ambiguous.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before reviewing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for scope/approval decisions
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past review misses to watch for
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven review approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for scope/approval decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past review misses to watch for
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven review approaches
After completing review, store durable findings:
- Recurring review miss → `scripts/memory-lifecycle.sh store failures <file>`
- Proven review technique → `scripts/memory-lifecycle.sh store lessons <file>`
- Recurring review miss → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
- Proven review technique → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/code-review/SKILL.md`, `skills/security-review/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/code-review/SKILL.md`, `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/security-review/SKILL.md`).
Do NOT re-derive review checklists already documented in skills.
## Review Boundary
+9 -7
View File
@@ -49,7 +49,7 @@ UNDERSTAND BEHAVIOR → DESIGN TEST STRATEGY → ARCHITECT TESTS → IMPLEMENT T
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before testing, read `.opencode/AGENTS.md` and the
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before testing, read `.opencode/AGENTS.md` and the
build-and-test skill at `.opencode/skills/build-and-test/SKILL.md`. Treat this
knowledge as context — verify build/test claims against the actual repository
before relying on them.
@@ -83,18 +83,20 @@ Your evidence is verification: tests run, pass/fail totals, reproduction command
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the verification matrix lacks the facts needed to test the behavior.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before testing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past test gaps or regressions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven testing approaches
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for testing standards
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past test gaps or regressions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven testing approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for testing standards
After completing testing, store durable findings:
- Test gap with prevention → `scripts/memory-lifecycle.sh store failures <file>`
- Proven testing technique → `scripts/memory-lifecycle.sh store lessons <file>`
- Test gap with prevention → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
- Proven testing technique → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path (e.g., `skills/tdd/SKILL.md`, `skills/test-analysis/SKILL.md`).
Load relevant skills when your brief includes a skill path (e.g., `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/tdd/SKILL.md`, `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/skills/test-analysis/SKILL.md`).
Do NOT re-derive test strategies already documented in skills.
## Core Philosophy
+8 -6
View File
@@ -49,7 +49,7 @@ RECOGNIZE PATTERN → DEFINE RULE → DESIGN MINIMAL TOOL → IMPLEMENT → VERI
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before automating, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before automating, read `.opencode/AGENTS.md` and
`.opencode/skills/repo-context/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -83,16 +83,18 @@ Your primary evidence is the recurrence record and proof the safeguard fires. If
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the failure mode is not understood well enough to encode safely.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before building tools, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for recurring problems to prevent
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven automation patterns
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for tooling standards
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for recurring problems to prevent
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven automation patterns
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for tooling standards
After completing tooling, store durable findings:
- Recurring problem prevented → `scripts/memory-lifecycle.sh store failures <file>`
- Automation lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Recurring problem prevented → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store failures <file>`
- Automation lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive automation patterns already documented in skills.
+8 -6
View File
@@ -41,7 +41,7 @@ You are the **Workflow Architect**: a modeling agent that turns requirements, ta
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before modeling workflows, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before modeling workflows, read `.opencode/AGENTS.md` and
`.opencode/skills/repo-context/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -73,16 +73,18 @@ Your primary evidence is the model itself: states, transitions, and the requirem
Stop when the model is complete, validated against the requirements, and the specification contains no unresolved ambiguity; escalate when requirements are too vague to model safely.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before modeling, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for past workflow decisions
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven modeling approaches
- `scripts/memory-lifecycle.sh recall failures <keywords>` — for past workflow mistakes
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for past workflow decisions
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven modeling approaches
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall failures <keywords>` — for past workflow mistakes
After completing workflow model, store durable findings:
- Workflow decision made → `scripts/memory-lifecycle.sh store decisions <file>`
- Modeling lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Workflow decision made → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store decisions <file>`
- Modeling lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive modeling patterns already documented in memory or skills.
+8 -6
View File
@@ -49,7 +49,7 @@ UNDERSTAND AUDIENCE → ASSESS EXISTING DOCS → PLAN STRUCTURE → WRITE → VA
## Repository Intelligence
This repository may have a `.opencode/` knowledge layer generated by
`repo-bootstrap.sh`. Before writing, read `.opencode/AGENTS.md` and
`"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/repo-bootstrap.sh`. Before writing, read `.opencode/AGENTS.md` and
`.opencode/skills/conventions/SKILL.md`. Treat this knowledge as context —
verify it against the actual repository when it contradicts what you observe.
@@ -82,16 +82,18 @@ Your primary evidence is the source material: the reports and files consulted, w
Stop when your deliverable is complete and verified per your Completion Rule; escalate when the evidence needed for accuracy is missing.
Global runtime: always resolve via `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"`. Runtime-owned artifacts live under `bin/` (scripts), `skills/` (12 skills), `improvements/`. Project-scoped artifacts (`memory/`, `.opencode/`, `./AgentsReport/`) stay relative to this project.
## Memory & Skills Awareness
Before writing, check project memory for relevant context:
- `scripts/memory-lifecycle.sh recall decisions <keywords>` — for architectural decisions to document
- `scripts/memory-lifecycle.sh recall lessons <keywords>` — for proven documentation patterns
- `scripts/memory-lifecycle.sh recall architecture <keywords>` — for system structure to describe
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall decisions <keywords>` — for architectural decisions to document
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall lessons <keywords>` — for proven documentation patterns
- `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh recall architecture <keywords>` — for system structure to describe
After completing documentation, store durable findings:
- Architecture documented → `scripts/memory-lifecycle.sh store architecture <file>`
- Documentation lesson learned → `scripts/memory-lifecycle.sh store lessons <file>`
- Architecture documented → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store architecture <file>`
- Documentation lesson learned → `"${OPENCODE_DEV_AGENT_TEAM:-$HOME/.config/opencode/dev-agent-team}"/bin/memory-lifecycle.sh store lessons <file>`
Load relevant skills when your brief includes a skill path.
Do NOT re-derive documentation patterns already documented in skills.