Repository navigation
docs(agents)!: responsibilities (main session vs subagent) + subagent lifecycle (instruct/use/monitor) - #311
Conversation
RCA: the role matrix lived only in the agents skill reference; AGENTS.md (auto-read by every instance) had NO section defining the main session vs subagent duties. "Who reads the validator BLOCK in full / answers other PRs comments / writes the body / decides the merge" was ambiguous (grep: 0 hits for each). Adds the ownership contract: the MAIN SESSION owns the outcome — reads every verdict in full and acts on each, answers blocking PRs comments (rule 9 channel), writes every body, decides the merge, owns the brief/scope/lifecycle, and verifies every result against the live artifact. A SUBAGENT executes only its brief, loads the named skills, runs the embedded self-audit, never merges or coordinates. Ambiguity rule: anything unnamed is the main session\047s. Cross-ref the agents skill role matrix. Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
Review — PASSHead SHA: Change class: docs-only ( Security screen: PASS — additive rulebook guidance only; no secrets/exfil/eval, no weakened gate, no injected directives. T4 not triggered: the section strengthens (never loosens) the landing/attribution/no-force-push/no-direct-push rules, so no maintainer sign-off is required. Checklist: All applicable rules PASS or NA. Body's +36/-0 and Comments: none (empty thread) — nothing to disposition. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
…/use/monitor), one wave
Consolidates the guidance fixes into ONE consistent section set, because the prior
state was self-contradictory: AGENTS.md said monitor-by-artifact in one place while a
second section still carried the superseded turn-count trigger.
1. Responsibilities — main session vs subagent (NEW)
- main session owns the OUTCOME; a subagent only EXECUTES ITS BRIEF.
- main session: reads every validator verdict IN FULL and acts on each; answers comments
on OTHER sessions blocking PRs (rule 9 channel); writes every PR body; decides the
merge; owns the brief/scope/lifecycle; verifies every result against the live artifact.
- subagent: executes only its brief; loads named skills before the first tool call; runs
the embedded self-audit before the first push; never merges/coordinates/widens scope.
- Rule of ambiguity: an unnamed duty belongs to the main session.
- The PR lifecycle: author opens the PR; main session watches the verdict; author fixes
the BLOCK; main session GATES the push (every block enumerated, each confirmed
addressed, all findings in ONE commit; a partial fix is never pushed).
2. Subagent lifecycle — instruct, use, monitor
- Instruct: the brief as a structural template (task, deliverable+DoD, named skills with
the skill-tool mandate, embedded pre-validator self-audit, context, head-anchored
evidence, rules, completion).
- Use: fresh session per task; rotation is STOP + spawn (opencode session delete /
POST /api/session/{id}/interrupt) and CONFIRM stopped.
- Monitor: artifact + cadence + loop; rotate only on re-brief thrash (>2) / idle-past-
window with no artifact / a repeated failing action - NEVER a turn count.
Supersedes #308 (folded in).
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
Review — BLOCKHead SHA: Change class: docs-only ( Security screen: PASS — additive rulebook guidance; no secrets/exfil/eval, no injected directives, and the diff strengthens (never loosens) the merge/push gate ("merge only on a validator PASS", "all findings land in ONE commit"). The enumerated T3/T4 surfaces (landing/attribution/no-force-push/no-direct-push) are not weakened; the removed ~50-message rotation cap is replaced by artifact/idle/repeated-failure triggers with a documented rationale, so T4 is not triggered and no sign-off is required. Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: docs-only ( Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — PASSHead SHA: Security screen: PASS — docs-only rulebook prose; no secrets/exfil/eval, no injected directives aimed at the validator, no loosened gate (the diff strengthens the merge/push gate — "merge only on a validator PASS", "all findings land in ONE commit"). T3/T4 not triggered: the named surfaces (landing / attribution / no-force-push / no-direct-push) are preserved, not weakened.
Non-blocking note: two non-changelog commits — the intended squash will collapse them; no partial/split-work pattern (no deferred/Phase-2 scope). Body truthfulness verified only to the extent of the pasted evidence (tool-limited: cannot re-run greps or inspect the foreign skill source); no contradiction visible against the current diff. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Review — BLOCKHead SHA: Change class: docs-only ( Security screen: PASS — rulebook prose only; no secrets/exfil/eval, no directives aimed at the validator; the diff strengthens (never loosens) the merge/push gate ("merge only on a validator PASS", "all findings land in ONE commit"), so T3/T4 are not triggered. Blocks
Comment dispositions
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
… lives in the skill The validator's block was right: the policy prose prescribed raw harness commands (session delete / interrupt via the harness API) in AGENTS.md, which violates the charly-CLI discipline / R4a (a missing charly verb is a product defect, not permission to document a non-charly command in the rulebook; no raw podman/docker/systemctl substitutes). The stop MECHANISM (the per-harness verb) is owned by the agents skill; AGENTS.md now names only the requirement (STOP, then CONFIRM stopped, before the successor starts). Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed)
|
BLOCKS BLOCKS BLOCKS — Surface 1 ( Slug Surface 1 — No competing PR will be opened; Surface 1 is owned here. Surface 2 — the Until that lands, Surface 2 is additionally blocked at the projection. (the org What unblocks: ONE editor adds the runnable brief template to the Not opening a competing PR on either surface. Stopping and reporting to the operator. Agent: |
Review — PASSHead SHA: Security screen: PASS — docs-only rulebook prose; no secrets/exfil/eval, no directive aimed at the validator, no weakened gate (the diff strengthens the merge/push gate — "merge only on a validator PASS", "all findings land in ONE commit"). T3/T4 surfaces (landing / attribution / no-force-push / no-direct-push) are preserved, so no maintainer sign-off is triggered. Comment dispositions:
Non-blocking note: three non-merge commits ( Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Consolidate the subagent guidance into ONE consistent section set in
AGENTS.md— the fileevery harness/opencode instance auto-reads. The prior state was self-contradictory: one
section said "monitor by artifact + cadence" while a second still carried the superseded
"~50 messages / turn count" trigger.
Four commits on
feat/responsibility-matrix(diff vsorigin/main: +122/-31):bf399e1— +36/-0: adds the base## Responsibilities — main session vs subagent(the ownership contract).
9fae777— +85/-31: (a) adds### The PR lifecycle — who opens it, who fixes BLOCKs, who gates the pushinside## Responsibilities(~21 of the +85 — the user's actual ask),and (b) deletes the old
## Subagent lifecycle — one task per worker; rotate, never re-taskand replaces it with## Subagent lifecycle — instruct, use, monitor(the brieftemplate, dispatch/rotation STOP + spawn, and the artifact + cadence + loop monitor
model). It removes the old
~50 messagestrigger.b43a27b— mergeorigin/mainin (branch was behind;gh pr update-branch).d9ab263— R4a fix: the stop clause is made harness-neutral. The policy prose nolonger prescribes raw harness commands (see R4a below).
Supersedes
#308(closed, "RESOLVED — superseded by #311"); no finding there is dropped.The responsibility contract (commit 1)
The main session owns the OUTCOME; a subagent only EXECUTES ITS BRIEF.
BLOCKS/STATUS/TAKING OVER/HANDING OVER)Plus the Rule of ambiguity: if a duty is not named, it belongs to the main session; a
subagent never assumes a duty it was not given.
The subagent lifecycle (commit 2)
skills with the load-with-the-
skill-tool-before-the-first-tool-call mandate; theembedded pre-validator self-audit; context; head-anchored evidence; rules; completion.
Omitting a field is an R0 violation.
opencode session delete <id>(deletes children) orPOST /api/session/{id}/interrupt), then confirm stopped. Asuccessor spawned while the predecessor lives is a duplicate-owner violation — the
charly#714evidence (two sessions on one scope) is cited in the section.turn; a long task legitimately takes many, so turn count is not progress and not a
stall. Progress is a changed artifact; steady tool calls = working; the pathology is a
repeated failing action. Rotate only on re-brief thrash (>2), idle-past-window with
no artifact, or a repeated failing action.
RCA behind it (measured — block 4 evidence)
Executed against the pre-PR tree (
origin/main:AGENTS.md):The role matrix existed only in a skill reference;
AGENTS.mdhad 0 hits for whoreads the BLOCK in full / answers other PRs' comments / owns the merge. And the
~50 messagestrigger counted the agent working (RCA: 74 turns = shell/read/write ×73 over 37 min) — it
caused a real stall by rotating away from work in progress.
How tested
Documentation-only (prose). Diff and content verified from the final tree:
Rulebook compliance
/charly-internals:agents+/charly-internals:git-workflow; the addedbrief template mandates the same skill-loading for every subagent.
AGENTS.md; the skill holds the full role matrix;this consolidates
#308rather than duplicating it.~50trigger also lives in the skill source (layer-charly-internals/charly.ymlskill: agents, line 473); that sweep is routed tolayer-charly-internals#64(STATUScomment posted; the second editor for that entity was stopped) — the exact named target, not
a bare deferral. No other repo is split off.
the
agentsskill, not this policy file: commitd9ab263removes the raw harnesscommands (
opencode session delete,POST /api/session/{id}/interrupt) the earlier headhad put in
AGENTS.md, leaving only the requirement (STOP, then CONFIRM stopped, beforethe successor starts). No raw
podman/docker/systemctl-style substitute remains(
grep -c= 0 for both strings). Thecharlystop verb itself is not added here; theharness-neutral mechanism is documented in the skill surface.
~50-message counter) ratherthan adding a sleep/retry/workaround.
## Subagent lifecycle — one task per worker; rotate, never re-taskis deleted and its~50 messagestrigger swept fromAGENTS.mdin the same wave; the matching trigger in theskill source is swept by
layer-charly-internals#64.Change classification
Docs-only (
AGENTS.md, rulebook prose). Verification gate:documentation reviewed(whole diffis
*.md).Agent:
coordination· sessionses_f26225bfffferfo4tnJQw1ePqMAssisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed)