Skip to content

docs(agents): exact subagent lifecycle — one task per worker, rotate on stall, never re-task - #305

Merged
github-actions[bot] merged 3 commits into
mainfrom
feat/subagent-lifecycle-guidance
Sep 29, 2026
Merged

github-actions[bot] merged 3 commits into
mainfrom
feat/subagent-lifecycle-guidance

Conversation

@aitrawog

@aitrawog aitrawog commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add the exact subagent lifecycle rule to AGENTS.md so it is picked up by every
harness/opencode instance in this repo automatically
(AGENTS.md is auto-read).

Field evidence: a subagent session ran 7 hours / 351 messages and produced no
artifact
on a few-file change — while a fresh session with the same brief produced
it directly. The loss was re-tasking a stalled session with appended corrections,
which grows context with dead ends and superseded instructions instead of converging.

The rule added: one task per subagent (close on completion, never re-task a finished
worker); rotate on stall (no artifact after two re-briefs, or ~50 messages → STOP and
spawn a FRESH subagent); judge progress by artifacts, never liveness; cap the fan-out;
durable artifacts carry state across the rotation; do the bounded critical-path fix
yourself
when you hold the context. Mechanism lives in /charly-internals:agents.

How tested

Documentation-only prose change (no code, no runtime path). The section is present in the
file:

$ grep -n '## Subagent lifecycle' AGENTS.md
198:## Subagent lifecycle — one task per worker; rotate, never re-task

Rulebook compliance

  • R0: /charly-internals:agents loaded (the owning skill for this surface).
  • R1: root cause named with the measured evidence (a stalled session re-tasked 7h/351 msgs → no artifact).
  • R2: fixed here — no parking.
  • R3: harness-neutral rule stated once in the rulebook; mechanism detail in the skill.
  • R4: N/A — documentation only; no code path, no workaround.
  • R5: extends rule 9's ownership + the coordination section; supersedes nothing.
  • R6: branch + PR; no force-push; no direct main.
  • R7/R8/R9/R10: N/A — documentation only.

Agent: coordination · session ses_f26225bfffferfo4tnJQw1ePqM
Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed)

…on stall, never re-task

Field-verified: a 7h/351-message session produced no artifact on a few-file change,
while a fresh session with the same brief produced it directly. Adds the hard rule
(2 re-briefs / ~50-message / no-artifact triggers -> STOP and spawn fresh), the
artifacts-not-liveness rule, the fan-out cap, and 'do the bounded fix yourself'.
AGENTS.md is auto-read by every harness, so every opencode instance picks it up.

Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (analysed on a live system)
@github-actions

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 194ad5759973d0616f4d4b95705fde7b98472216 (branch: feat/subagent-lifecycle-guidance)

Change class: docs-only (prose added to AGENTS.md).

Security screen: PASS — no secrets/egress, no guardrail weakening (adds an operational lifecycle section; does not touch landing/attribution/no-force-push/no-direct-push rules or the validator spec), no embedded instructions to the reviewer, no supply-chain change.

Blocks

  1. A1 — How tested promises evidence instead of pasting it. The body prints the command ($ grep -n '## Subagent lifecycle' AGENTS.md) but supplies no output, then defers it: "Pasted in a follow-up if required". A1 requires pasted output, not a promise ("will test"/future-paste framing blocks). The author must paste the real command and its real output (or, for a genuinely command-free prose change, state the non-runtime standard as the check without promising a follow-up paste).

  2. A1 — rule-compliance section is incomplete. The section answers R0, R1, R2, R3, R5, R6, R7/R8/R9/R10 but omits R4. A1 requires every applicable rule answered with a one-line HOW, or N/A — <reason> where the class excludes it. Add R4: N/A — documentation only, no code paths (or a one-line HOW if applicable).

(Non-blocking, tool-limited: the Assisted-by trailer OpenCode ollama-cloud/deepseek-v4.1-flash (documentation reviewed) uses the AI form with a legal documentation reviewed tier for an all-doc diff; I cannot verify the model string from the body's evidence, so I do not block on it. Agent: precedes Assisted-by: correctly. Comment thread is empty — nothing to disposition.)

Verdict: BLOCK


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 7484b7d0c7ad74e4760b4594d73b937998d6c34b (branch: feat/subagent-lifecycle-guidance)

Change class: docs-only (prose added to AGENTS.md, +32/-0; no code, config, hook, or cross-repo surface).

Security screen: PASS — additive prose only; no secrets/egress, no obfuscation, no supply-chain change; does not touch the rulebook's landing / attribution / no-force-push / no-direct-push rules or this validator's spec, so no guardrail is loosened and no T4 sign-off is triggered; no embedded directive aimed at the reviewer.

Checklist: All applicable rules PASS or NA. (A1 body complete — Summary accounts for the sole changed file; How tested pastes real output; R0–R10 each answered with a HOW or N/A — <reason>; Assisted-by: trailer last with the legal all-doc tier documentation reviewed, Agent: correctly preceding it. A2/A3 match the docs-only gate. B4–B18: no candy/CUE/proto/Go surface, no workaround, no parking phrase, no duplication, no destroy/rebuild, no alias or charly/ import — R4/R6/R7–R10 N/A as stated. Placement: CORRECT — a harness-neutral operational rule belongs in the rulebook (AGENTS.md), with mechanism detail in the /charly-internals:agents skill.)

Evidence cross-check (tool-limited): the pasted grep -n '## Subagent lifecycle' AGENTS.md → 198:## Subagent lifecycle — one task per worker; rotate, never re-task is internally consistent with the diff — hunk @@ -195,6 +195,38 @@ puts the new heading at exactly new line 198 (3 context lines before + 32 added + 3 after = 38), and the heading text matches the added line verbatim. I cannot re-run the grep or open the agents skill to confirm its cited sub-sections exist; nothing in the diff or body contradicts either claim, so this is a non-blocking tool-limited disposition, not a pass on the author's word.

Comment intake:

  • Comment 5884632821 (@github-actions[bot], BLOCK against head 194ad5759973) — stale-superseded. Its Block 1 (How tested promised output "in a follow-up" instead of pasting it) does not reproduce: the CURRENT body pastes the command and its output. Its Block 2 (rule-compliance omits R4) does not reproduce: the CURRENT body answers R4: N/A — documentation only; no code path, no workaround. Both findings target a superseded head SHA and are contradicted by the current body.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) September 29, 2026 06:53
@github-actions

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 31038523c4fcd2d7b50f560cd4bf4a98c51f8a55 (branch: feat/subagent-lifecycle-guidance)

Security screen: PASS — additive AGENTS.md prose only; no secrets/egress, no obfuscation, no supply-chain change. It does not touch the rulebook's landing/attribution/no-force-push/no-direct-push rules or this validator's spec, so no guardrail is loosened and no T4 sign-off is triggered; no embedded directive aimed at the reviewer.

Checklist: All applicable rules PASS or NA. (A1 — Summary accounts for the sole changed file; How tested names the docs-only class and pastes real grep output 198:## Subagent lifecycle …; rule-compliance answers R0–R10 each with a HOW or N/A — <reason>, R4 included; Assisted-by: trailer last with the legal all-doc tier documentation reviewed, Agent: correctly preceding it. A2/A3 — docs-only gate, no bed, tier not inflated. B4–B18 — no code/CUE/proto/candy surface, no workaround, no duplication, no parking phrase, no destroy/rebuild, no alias or charly/ import; R4/R6/R7–R10 N/A as stated. Placement: CORRECT — a harness-neutral operational rule belongs in the auto-read rulebook, mechanism detail in /charly-internals:agents.)

Evidence cross-check (tool-limited): the pasted grep -n '## Subagent lifecycle' AGENTS.md → 198:## Subagent lifecycle — one task per worker; rotate, never re-task is internally consistent with the diff — the hunk section heading protocol applies across accounts and harnesses… is the @@ function-context, so the 3 leading context lines + 32 added put the heading at new line 198, matching verbatim. I cannot re-run the grep or open the agents skill to confirm its cited sub-sections exist; nothing in the diff/body contradicts either claim.

Comment intake:

  • Comment 5884632821 (@github-actions[bot], BLOCK vs 194ad5759973) — stale-superseded. Block 1 (How tested "pasted in a follow-up" instead of output) does not reproduce: the current body pastes the command and its output. Block 2 (rule-compliance omits R4) does not reproduce: current body answers R4: N/A — documentation only; no code path, no workaround.
  • Comment 5885220315 (@github-actions[bot], PASS vs 7484b7d0c7ad) — verified-non-blocking / consistent: not authoritative, but its reasoning reproduces against the current state; no surviving finding.

Verdict: PASS


ollama-cloud/deepseek-v4.1-flash — action-review.

View action run

@github-actions
github-actions Bot merged commit c7b4d80 into main Sep 29, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Sep 29, 2026
@aitrawog
aitrawog deleted the feat/subagent-lifecycle-guidance branch November 1, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants