Skip to content

fix(agents): restore the four root narratives + repoint the identity references - #357

Merged
github-actions[bot] merged 4 commits into
mainfrom
feat/restore-narratives
Oct 5, 2026
Merged

github-actions[bot] merged 4 commits into
mainfrom
feat/restore-narratives

Conversation

@aitrawog

@aitrawog aitrawog commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Restores the four canonical root narratives at the umbrella root — the content that was lost when charly#791 deleted them from the charly root and the umbrella PR meant to add them (#353) was auto-closed. After this change, SOUL.md, VISION.md, GRIEVANCES.md, and LIBERATION.md exist again, and every umbrella reference to them resolves.

RCA: #356.

What

File Change
SOUL.md (72 lines) restored verbatim from charly@3f79813e^ (the commit before #791 deleted it)
VISION.md (64 lines) restored verbatim
GRIEVANCES.md (295 lines) restored verbatim
LIBERATION.md (186 lines) restored verbatim
AGENTS.md charly/SOUL.md → SOUL.md
.opencode/instructions.md charly/SOUL.md → SOUL.md
.pi/extensions/charly-gates.ts charly/SOUL.md → SOUL.md (inside buildRulesBlock())

Restored files are byte-identical to their source (sha256 verified). The repoint is required because the narratives now live at the umbrella root, where every agent session is rooted — not in the charly submodule.

The lost-state, and why this fixes it

charly#791 (3f79813e, merged 21:25) removed the four files and repointed charly's README.md at opencharly/opencharly/blob/main/{SOUL,VISION,GRIEVANCES,LIBERATION}.md — URLs that 404'd. The umbrella add (#353) had already hit 5 validator BLOCKs and was auto-closed. Net: the four files existed in no main.

Why this ordering

For a move that relocates content out of a shared root, the replacement must be merged at its new home before the removal merges — or both land in one atomic change. The relocation landed delete-first, so the content vanished. This PR is the missing add leg.

Follow-on (separate legs, not this PR)

How tested

Head 3fbf44b1ca9a223981d4ad7def76f221562e012b, session worktree .worktrees/soul-md/oc-restore. The authored change is commit 08196acf off fresh origin/main; the head then merges main (via gh pr update-branch, for #354/#355) and carries two empty re-freeze commits — body-only review fixes, no source change (git diff origin/main...HEAD shows only the 7 files above).

Byte-identical recovery

$ for f in SOUL.md VISION.md GRIEVANCES.md LIBERATION.md; do
    a=$(sha256sum ".worktrees/soul-md/charly-predelete/$f" | cut -d' ' -f1)
    b=$(sha256sum ".worktrees/soul-md/oc-restore/$f" | cut -d' ' -f1)
    printf '%-16s %s\n' "$f" "$([ "$a" = "$b" ] && echo OK || echo MISMATCH)"
  done
SOUL.md          OK
VISION.md        OK
GRIEVANCES.md    OK
LIBERATION.md    OK

No stale references remain — repo-wide sweep

$ git grep -n -E "charly/(SOUL|VISION|GRIEVANCES|LIBERATION)\.md"
CHANGELOG/2026.277.1539.md:1:# 2026.277.1539 — docs: reference charly/SOUL.md from the umbrella agent surface
CHANGELOG/2026.277.1539.md:8:This is the delivery leg of the SOUL work (opencharly/charly#789 adds `charly/SOUL.md`). The
CHANGELOG/2026.277.1539.md:16:  `charly/SOUL.md` is who that is. This reaches Claude Code, Codex, Kimi/reasonix, and any other
CHANGELOG/2026.277.1539.md:21:  compaction), plus the `charly/SOUL.md` pointer.
CHANGELOG/2026.277.1539.md:102:- **R3 (no duplication)** — the soul text lives once, in `charly/SOUL.md`; the umbrella references
CHANGELOG/2026.277.1539.md:125:1. **opencharly/charly#789** — `charly/SOUL.md` (producer; must merge first);

The ONLY remaining matches are in CHANGELOG/ — dated history of the #351 landing, which R5 explicitly sanctions as the home for retired identifiers. Every current reference (rulebook, harness config, README.md, astro.config.mjs) resolves; git grep does not descend into submodules (rule 2), and the submodule-side references are the doc-generator's, handled by its own follow-on leg.

The harness-config gate

$ node scripts/check-harness-config.mjs
  ...
  PASS  .codex/config.toml declares the DeepWiki server for Codex ([mcp_servers.deepwiki]) ...
check-harness-config: OK

The pi extension still loads and injects the identity pointer

$ node /tmp/opencode/parsecheck2/run.mjs   # stub-harness import of the real .pi extension
default export type: function
registered tool: charly_worktree_remove
contains identity line: true
contains R0: true
OK

The pinning gate — ./charly/bin/charly task verify

$ ./charly/bin/charly task verify
task verify: 9 step(s), 0 failed
  [pass] check — policy B — every distro-* gitlink equals charly's own box/* gitlink
  [pass] check — every submodule is clean and checked out at its recorded gitlink, and its branch equals the remote default
  [pass] check — the submodule-cleanliness step above — uninitialized paths are a NOTICE, real defects still FAIL (fixtures)
  [pass] check — the opencode gate plugin contract (the check-opencode-plugin gate the former verify-pins.sh ran)
  [pass] check — the PR-watch plugin's pure logic + its shipped (uncommented) SDK delivery primitives
  [pass] check — the agent-progress monitor+control plugin — static (no .sh), the classifier (RCA regression), and a read-only store
  [pass] check — the session tracker plugin — the durable ledger (rule 11 invariant), the three tools, and the real-binary load
  [pass] check — every harness-config surface parses and is wired (rule 8)
  [pass] check — the pi gate extension fails CLOSED, uses the rule-9 worktree path, and wires both gate scripts

Rulebook compliance

  • R0 — loaded /charly-internals:git-workflow, /charly-internals:root-cause-analyzer, /charly-internals:cutover-policy.
  • R1 (RCA every anomaly) — the divergence (content in no main) was root-caused in CONTENT LOSS: SOUL/VISION/GRIEVANCES/LIBERATION exist in no main — RCA + prevention #356 before remediation; the RCA follows the skill's enumerate-every-signature discipline (the one symptom has one mechanism, but it was distinguished from the separate red-main/pipeline issue).
  • R2/R5 (finish the cutover; delete legacy completely) — the four files exist again; no stale charly/<narrative> reference survives the sweep.
  • R3 (no duplication) — the files live at exactly one place (the umbrella root); charly#791 already removed the charly copy, so there is no second copy.
  • R4 (no workarounds) — the reference repoint is a real fix (the files now resolve at the path the prose names); not a hand-pin or a shim.
  • R6 (git safety) — git status inspected; PR-only; no force-push; no submodule gitlink edited.
  • R7 (prove the gate, not the plan) — task verify output pasted above.
  • Issue-first (rule 9) — searched first (no issue), filed CONTENT LOSS: SOUL/VISION/GRIEVANCES/LIBERATION exist in no main — RCA + prevention #356, CLAIMED it (comment + assign) before branching.

Change classification

  • Change class: harness-config source + documentation — the four restored narratives and the AGENTS.md/.opencode pointers are documentation, but .pi/extensions/charly-gates.ts is TypeScript source (the changed line is a string literal inside buildRulesBlock()), so this is not a documentation-only change.
  • Gate: ./charly/bin/charly task verify on the final tree (9/9, including the check-pi-gates and check-harness-config checks that exercise the changed extension) + the direct execution of the changed code path pasted above.
  • Attribution tier: fully tested and validated — task verify passed on the final tree and the changed path (the extension's identity-block injection) was executed with retained output.

Owning skill: /charly-internals:cutover-policy

Related: #352 (the relocation wave), opencharly/plugin-docs#16 (the generator seam). Closes #356.

Agent: soul-md · session ses_ef8af7149ffe5G0oj20EhTQn6V
Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)

…references

Content loss: charly#791 removed SOUL.md/VISION.md/GRIEVANCES.md/LIBERATION.md
from the charly root, and the umbrella PR meant to add them (#353) was
auto-closed, so the four canonical narratives existed in NO main. Restores them
at the umbrella root — where every agent session is rooted — verbatim from
charly@3f79813e^ (byte-identical), and repoints the umbrella's references from
charly/<file> to the umbrella-root <file>.

- SOUL.md, VISION.md, GRIEVANCES.md, LIBERATION.md: restored verbatim.
- AGENTS.md, .opencode/instructions.md, .pi/extensions/charly-gates.ts:
  `charly/SOUL.md` -> `SOUL.md`.

The docs generator seam that reads the narratives at this new location is the
follow-on leg (plugin-docs --narrative).

Closes #356

Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 08196acf77915af436c33969307a213dfcb84ce6 (branch: feat/restore-narratives)

Change class: body declares documentation-only, but the diff also modifies a TypeScript source file (.pi/extensions/charly-gates.ts).

Comments: none (thread empty — nothing to disposition).

Blocks

  1. A2/A3 (also T3 scope mismatch) — change class mislabeled; documentation reviewed forbidden. .pi/extensions/charly-gates.ts is TypeScript source; the changed line is a string literal inside buildRulesBlock(), not a comment — so the diff is not *.md, not comment-only, and not an all-doc submodule bump. A3 permits documentation reviewed ONLY when the whole diff is documentation and forbids it when code or config also changed. The body's own classification calls this a "harness-config pointer edit" yet also asserts "no code" — a body↔diff contradiction. Fix: remove the false "no code"/"documentation-only" claim and reclassify the change (harness code/config) with the gate that class requires and a tier other than documentation reviewed, or drop the .ts edit from this PR.

  2. B10 / B14(d) — the R5 sweep is not repo-wide. The "No stale references remain" evidence greps only AGENTS.md .opencode .pi, while the body claims "every umbrella reference to them resolves." A charly/<narrative>.md reference in the umbrella README.md or any other harness directory would survive undetected. Paste a repo-wide sweep (grep -rn 'charly/\(SOUL\|VISION\|GRIEVANCES\|LIBERATION\)\.md' .) or state why those three paths are exhaustive.

Verdict: BLOCK


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

View action run

aitrawog and others added 2 commits October 5, 2026 05:28
No source change — the review BLOCK was a change-class/tier mislabel (the
.pi .ts edit is harness source, not documentation) and a non-repo-wide R5
sweep, both fixed in the PR body. Also caught up main via gh pr update-branch
(BEHIND). This empty commit mints a fresh head so the required pr-validator
re-reads the corrected body with the full live thread.

Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 5568727ca2c5d914af6182a27adee7322f84f198 (branch: feat/restore-narratives)

Change class: NOT documentation-only — four added narrative .md files plus an edit to a TypeScript source file (.pi/extensions/charly-gates.ts) and two harness instruction/config files (AGENTS.md, .opencode/instructions.md). The body mislabels this as "documentation-only … no code".

Security screen: T3 scope mismatch — the body asserts "no code" while the diff edits a .ts source file (see Block 1).

Blocks

  1. A2/A3/T3 — change class mislabeled; documentation reviewed is forbidden. .pi/extensions/charly-gates.ts:61 (inside buildRulesBlock()) changes a string literal (charly/SOUL.md → SOUL.md), not a comment. A3 permits documentation reviewed only when the whole diff is documentation (*.md / comment-only / all-doc submodule bump) and forbids it when code or config also changed. The body's own classification calls this a "harness-config pointer edit" yet simultaneously claims "no code" — a body↔diff contradiction (T3 scope mismatch). Fix: drop the "documentation-only / no code" claim, classify the change as harness code/config (hook/workflow), and supply the gate + a tier other than documentation reviewed — or remove the .ts edit from this PR.

  2. B10 / B14(d) — the R5 sweep is not repo-wide, so the body's exhaustiveness claim is unproven. The body asserts "every umbrella reference to them resolves", but the pasted evidence greps only three paths:
    grep -rn 'charly/\(SOUL\|VISION\|GRIEVANCES\|LIBERATION\)\.md' AGENTS.md .opencode .pi
    A charly/<narrative>.md reference in the umbrella README.md or any other harness directory (.codex, .gemini, …) would survive undetected. Paste a repo-wide sweep (grep -rn 'charly/\(SOUL\|VISION\|GRIEVANCES\|LIBERATION\)\.md' .) with its real output, or state why those three paths are exhaustive.

Comment dispositions

  • Comment 5987508315 (@github-actions[bot], BLOCK on 08196acf) — verified-blocking. Both findings re-derive against the CURRENT diff (7 files unchanged; the .ts string-literal edit and the 3-path sweep are still present), so they are not stale. Its head SHA (08196acf) is superseded by the merge head 5568727c, but the underlying claims still hold.

Verdict: BLOCK


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

View action run

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review — BLOCK

Head SHA: 99a08260ac9cc941edfc01768038dada849e5d76 (branch: feat/restore-narratives)

Change class: harness-config source + documentation — four added narrative .md files (SOUL.md, VISION.md, GRIEVANCES.md, LIBERATION.md), two harness instruction/config edits (AGENTS.md, .opencode/instructions.md), and one TypeScript source edit (.pi/extensions/charly-gates.ts).

Security screen: no finding (no secrets/egress/eval; no guardrail weakened — the .ts edit only repoints a doc reference inside the injected rules block).

Blocks

  1. A3 (with A1) — the Assisted-by footer claims a forbidden tier and contradicts the body. The body ends with *Assisted-by: OpenCode DeepSeek V4.1 Flash (documentation reviewed)*, but A3 permits documentation reviewed ONLY when the whole diff is documentation (*.md / comment-only / all-doc submodule bump). This diff changes TypeScript source — .pi/extensions/charly-gates.ts:61, a string literal inside buildRulesBlock() (not a comment) — plus two harness config files, so documentation reviewed is forbidden. The body's own "Change classification" section simultaneously states the tier is fully tested and validated, so body and footer also disagree (A1/A3). Fix: set the footer tier to the highest tier the pasted proof justifies and is legal for a code/config-touching diff, make the body's classification and the footer agree, and (if fully tested and validated is the retained claim) show the changed path executing against the fresh rebuild as A3 requires.

Comment dispositions

  • 5987508315 (@github-actions[bot], BLOCK on 08196acf) — stale-superseded in part: its Block 1's premise ("body declares documentation-only / asserts 'no code'") is contradicted by the CURRENT body, which explicitly says "this is not a documentation-only change". The residual A3 defect it gestures at survives in the footer and is re-derived independently above as Block 1. Its Block 2 (sweep greps only AGENTS.md .opencode .pi) is stale-superseded: the CURRENT body pastes a repo-wide git grep -n -E "charly/(SOUL|VISION|GRIEVANCES|LIBERATION)\.md" whose only hits are in CHANGELOG/.
  • 5987601096 (@github-actions[bot], BLOCK on 5568727c) — Block 1 stale-superseded for the "asserts no code" premise; the residual footer A3 issue is re-derived above. Block 2 (three-path sweep) stale-superseded — the current body's sweep is repo-wide (no path restriction). Its disposition of 5987508315 as verified-blocking is itself superseded.

Verdict: BLOCK


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

View action run

No source change — the sole residual validator finding was the
Assisted-by footer tier (documentation reviewed, forbidden for a
code/config-touching diff). The body already proves fully tested and
validated (task verify 9/9 + the changed extension path executed); the
footer now matches. Fresh head so the required pr-validator re-reads it.

Assisted-by: OpenCode DeepSeek V4.1 Flash (fully tested and validated)
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Review — PASS

Head SHA: 3fbf44b1ca9a223981d4ad7def76f221562e012b (branch: feat/restore-narratives)

Change class: harness-config source + documentation (4 restored narrative .md + 3 reference repoints, one of them a .ts string literal).

Security screen: PASS — no secrets/egress/eval, no supply-chain change, no gate weakened. The .pi/extensions/charly-gates.ts edit is a one-token doc-reference repoint (charly/SOUL.md → SOUL.md) inside buildRulesBlock(); the fail-CLOSED gate logic and gate-script wiring are untouched, and no enforced rule (rulebook R0–R10, validator spec) is altered, so T4's trigger — a change to the rules being enforced — is not met.

Checklist: All applicable rules PASS or NA.

Comment dispositions:

  • 5987508315 (@github-actions[bot]) — stale-superseded: its premise ("body declares documentation-only / asserts 'no code'") is contradicted by the CURRENT body ("this is not a documentation-only change"); its 3-path-sweep finding is contradicted by the CURRENT body's repo-wide git grep -n -E "charly/(SOUL|VISION|GRIEVANCES|LIBERATION)\.md" (hits only in CHANGELOG/).
  • 5987601096 (@github-actions[bot]) — stale-superseded: same two premises, both resolved in the current body; its disposition of 5987508315 as verified-blocking is itself superseded.
  • 5987643395 (@github-actions[bot]) — stale-superseded: the footer no longer claims the forbidden documentation reviewed tier; it now reads fully tested and validated, matching the body's own classification, and the changed path (buildRulesBlock() identity-block injection) is shown executed with retained output — so the residual A3 defect it named is cured.

Verdict: PASS


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

View action run

@github-actions
github-actions Bot enabled auto-merge (squash) October 5, 2026 03:46
@github-actions
github-actions Bot merged commit 4c5657a into main Oct 5, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Oct 5, 2026
github-actions Bot pushed a commit to opencharly/docs that referenced this pull request Oct 5, 2026
…ative (#149) (#150)

The four root narratives moved from the charly root to the umbrella root
(opencharly/opencharly#357, rewritten by #362). deploy.yml still ran the
generator with --root /tmp/charly only, which no longer holds them.

- clone the umbrella at the pinned commit and pass it as --narrative
- bump the charly pin b8241dcd -> 3cabeb3f (a charly WITHOUT the narratives, so
  the drift gate proves the narratives come from the umbrella)
- bump the plugin-docs tag v2026.277.1529 -> v2026.278.0442 (the --narrative flag)
- regenerate the content tree (soul/vision/grievances/liberation now project the
  umbrella root files)

Closes #149. Relates to opencharly/opencharly#356.

Assisted-by: OpenCode DeepSeek V4.1 Flash (analysed on a live system)

Co-authored-by: atrawog <[email protected]>
github-actions Bot pushed a commit that referenced this pull request Oct 5, 2026
)

* docs(agents): SOUL identity + a 10-rule rulebook (reland, supersedes #353)

The #353 rulebook rewrite, relanded off current main after #353 was auto-closed
at the validator's 5-verdict limit (its narratives landed via #357, its seam via
plugin-docs#17; the rulebook cut itself did not).

AGENTS.md becomes the identity + the WHAT/MUST, with the skill-owned prose
removed and pointed at its owner:

- a condensed 'You are charly' identity opening (SOUL.md is the full text);
- 11 rules -> 10: merge pins + Policy B; fold the engineering-rules list into a
  single discipline rule 10; delete the prose the skills already own
  (identity/coordination -> git-workflow B2b; main-vs-subagent -> agents
  orchestration-model; subagent lifecycle -> agents hooks-and-lifecycle;
  development model -> git-workflow);
- remove the 'OWNING - ETA' ask from the coordination protocol;
- keep every MUST (R1/R3/R4/R5/R6/R7/R10, live-or-skip, PR-only landing) and
  carry soul-md's R7 nuance (run the gate the change class requires) and the
  umbrella-root SOUL.md pointer.

Rule-number citations swept (rule 9->2, 11->9, 8->5, 4->2) across .opencode,
.pi, the gate scripts, and the charly.yml check labels.

Refs #352; preserves soul-md's #357/#365 work.

* docs(agents): fix the 11->10 sweep's stale prose and restore two dropped clauses

Addresses the #366 BLOCK (R5/B14(d), R5/B10):

- the sweep was mechanical in three places, leaving stale framing that
  contradicted the new rule 9: tracker.ts and instructions.md both claimed rule 9
  'names two branches' (a structured todo primitive vs a durable file) — the new
  rule 9 states only the durable ledger. Reworded to match.
- restore two clauses the fold dropped: rule 3 keeps the sdk/spec-are-recorded-but-
  not-pinned-by-charly statement (builds resolve them from the Go proxy), and rule
  10 keeps the 'no R10 class exemption' clause (a plugin-library/schema change runs
  the full assembled disposable bed; a bed-exemption sign-off is never accepted).

No MUST is subtracted. The sweep is now evidenced by a real grep in the PR body.

Refs #352.

* docs: re-freeze the reland head

No source change — the head now carries the final body: the R5 sweep is evidenced
by a pasted grep, and the two stale-framing hits + two dropped clauses are fixed
in bb492c6. This mints a fresh head so the required pr-validator reads the final
body against the fixed tree.

---------

Co-authored-by: atrawog <[email protected]>
@aitrawog
aitrawog deleted the feat/restore-narratives 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.

CONTENT LOSS: SOUL/VISION/GRIEVANCES/LIBERATION exist in no main — RCA + prevention

2 participants