From 314b1a7695dc8215f82e8e79b44959d600e19408 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sat, 20 Jun 2026 20:37:16 -0500 Subject: [PATCH] docs(design): durable resume state for session restart Full mission status: open PRs (#543, #570), locked decisions, P0-P6 phase status, drift re-grounding, and the step-by-step RESUME PROCEDURE. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/design/framework-constitution/MISSION.md | 87 ++++++++++++------- 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/docs/design/framework-constitution/MISSION.md b/docs/design/framework-constitution/MISSION.md index b8a76c9..ec1ddd1 100644 --- a/docs/design/framework-constitution/MISSION.md +++ b/docs/design/framework-constitution/MISSION.md @@ -1,44 +1,65 @@ # Mission — Mosaic Framework Constitution & Public Sanitization (Alpha) -**Branch:** `feat/framework-constitution-alpha` (off `main` + #543 agency patterns) -**Repo:** `mosaicstack/stack` → `packages/mosaic/framework/` -**Mode:** Orchestrator (autonomous loop to alpha release) +**Repo:** `mosaicstack/stack` → `packages/mosaic/framework/` · **Mode:** Orchestrator (autonomous loop to alpha) +**Working copy:** `/home/jwoltje/src/_ms_stack` (fresh clone of `mosaicstack/stack`) +**Last updated:** session pause for restart (2026-06-20) -## Objective +## ▶ RESUME PROCEDURE (read this first on a fresh session) -Re-architect the public framework so universal **Constitution** law is cleanly -separated from per-user **customization** (agent persona, operator profile, -preferences); sanitize all personal data from the public package; make -customization upgrade-safe; keep it robust across Claude/Codex/Pi/OpenCode; ship -a solid alpha. +1. `cd /home/jwoltje/src/_ms_stack && git fetch origin --prune` +2. Read `DESIGN.md` (canonical design) + `PRD.md` (requirements, P0–P6 plan) + this file. +3. **Check the two open PRs' CI** (the repo's `pr-ci-wait` reports `state=unknown` — use Woodpecker directly): + `~/.config/mosaic/tools/woodpecker/pipeline-list.sh | grep -E 'docs/framework-agenc|feat/p0-license'` + - If a PR's pipeline is **success** → `~/.config/mosaic/tools/git/pr-merge.sh -n -m squash`, then `issue-close.sh -i `. + - If **failure** → diagnose (`pipeline-status.sh `), fix on the branch, re-push. (Last failure was a prettier `*x*`→`_x_` md fix — see #543 history.) +4. After P0 (#570) merges → start **P1** off fresh `origin/main` (see PRD §5 / DESIGN §6). +5. Continue P1→P6 autonomously. Bring the operator in only for a genuine new fork (all `OPEN-QUESTIONS.md` are resolved — see Decisions below). + +## Open PRs / issues / branches (all pushed to origin — verified via ls-remote) + +| Branch | SHA | PR | Issue | State | +|--------|-----|----|----|-------| +| `docs/framework-agency-patterns` | `d91d910` | **#543** | #542 | Agency patterns (7), rebased onto current main, independent-review APPROVED. CI was running at pause → check & merge, close #542. | +| `feat/p0-license-leak-sanitize` | `010bd11` | **#570** | #569 | **P0**: MIT LICENSE + cred-path + OpenBrain soft-degrade. Independent-review APPROVED. CI running at pause → check & merge, close #569. | +| `feat/framework-constitution-alpha` | `2c29349` | (none) | — | Design record (DESIGN/PRD/MISSION/BRIEF/OPEN-QUESTIONS/synthesis/debate). **Do NOT open a feat→main PR as-is** — it also carries #543's commit and would conflict. Land design docs via cherry-pick of the docs-only commits onto a later phase branch, or a fresh branch off main. | + +Note: a background pipeline watcher (`b7ns5b20d`) was running at pause — it dies on restart; just re-check CI directly per step 3. + +## Operator decisions (LOCKED — do not re-ask) + +| Ref | Decision | +|-----|----------| +| Q1 License | **MIT**. LICENSE holder currently "Mosaic Stack" (operator may change to legal name — flagged, non-blocking). | +| Q10 Persona | **Neutral example only.** PDA/accommodation content stays in operator's private init-generated SOUL/USER, never in public package. | +| Q9 Pi | **Maintainer-internal** for alpha (public matrix = Claude/Codex/OpenCode). | +| Q7 OpenBrain hook | **Soft-degrade** (block the write; only nudge to OpenBrain if `OPENBRAIN_URL` set). | +| Q2/Q3/Q5/Q6/Q8 | Proceed on DESIGN provisional defaults. | +| Q4 CI authority | Woodpecker, config at repo-root `.woodpecker/` (`ci.yml`: install→typecheck→{lint,format,test+pg}). New gates add steps here. | ## Phase status -| # | Phase | State | Artifact | -|---|-------|-------|----------| -| 0 | Land agency patterns (#543) | ⏳ CI running, auto-merge on green | PR #543 / issue #542 | -| 1 | Ground + brief panel | ✅ done | `BRIEF.md` | -| 2 | Expert conference (debate→synthesis→redteam→design) | ⏳ running (wf_eecc3723-36b) | `debate/`, `synthesis-v1.md`, `DESIGN.md`, `OPEN-QUESTIONS.md` | -| 3 | Author PRD from DESIGN.md | pending | `docs/PRD.md` (mission) | -| 4 | Implement (sanitize + constitution split + upgrade-safe customization) | pending | framework files | -| 5 | Independent review + remediate | pending | — | -| 6 | Alpha release (PR → CI green → squash-merge → tag) | pending | `mosaic-vX.Y.Z-alpha` | +| Phase | Scope | State | +|-------|-------|-------| +| Conference + DESIGN + PRD | design of record | ✅ done (`DESIGN.md`, `PRD.md`) | +| #543 agency patterns | predecessor | ⏳ CI → merge, close #542 | +| **P0** legal + executable leaks | MIT license; 3 cred sites→`~/.config/mosaic`; OpenBrain soft-degrade | ⏳ #570 reviewed-APPROVE, CI → merge, close #569 | +| P1 sanitization CI gate | `verify-sanitized.sh` (2-class, self-tested) wired blocking in `.woodpecker/`; build goes red = P2 worklist | ⬜ next | +| P2 sanitize tree to green | purge 31 contaminated files; delete `defaults/SOUL.md` + `jarvis-loop.json`; relocate AUDIT; `examples/*` (neutral persona); `rails/`→`tools/` in both template families; the 4 tool READMEs + `agent-lint.sh:7` comment | ⬜ | +| P3 extract Constitution | `defaults/CONSTITUTION.md` by subtraction; gut `AGENTS.md`→~50-line dispatcher; `constitution/LAYER-MODEL.md`; strip restated policy from STANDARDS + 4 RUNTIME files; capability-verb sequential-thinking | ⬜ | +| P4 upgrade-safe migration | split seed lists (FRAMEWORK_OWNED overwrite vs USER_SEEDED); remove AGENTS/STANDARDS from PRESERVE_PATHS; snapshot→sync→restore; v2→v3 migration; `FRAMEWORK_VERSION=3`; non-interactive fail-closed persona; **5-fixture matrix both installers — GATES TAG** | ⬜ | +| P5 overlay composer + cross-harness | `mosaic compose-contract `; per-tier anchor + Tier-3 byte-equality test | ⬜ | +| P6 docs + tag | `CONTRIBUTING.md` + compliance matrix; resident line-count ceiling; **tag `mosaic-vX.Y.Z-alpha`**; reconcile `aiguide` | ⬜ | -## In-flight / background +## Drift re-grounding (vs current `main` @ `e834bbb`, 14 commits past the design base) -- `bhssrdyef` — PR #543 CI wait. On green → merge squash, close #542. -- `w2gklkvrg` / `wf_eecc3723-36b` — expert conference. On done → read DESIGN.md, author PRD. +- Phase 0 cred-fix simplified: #551 kept the `jarvis-brain` fallback; fix = drop it, default `~/.config/mosaic/credentials.json` (done in P0). +- `launch.ts` anchors shifted: `checkSoul` :63, `buildPrompt` reads AGENTS.md :334, `--append-system-prompt` :649/:682. +- `install.sh`, `file-adapter.ts`, `mosaic-init`, `prevent-memory-write.sh`, `stack-health.sh` UNCHANGED → P3/P4 design holds. +- `TOOLS.md` rewritten (#554); contamination now **31 files** (new: `systemd/user/README.md`, `tools/git/test-issue-create-body-safety.sh`, `tools/bootstrap/agent-lint.sh`, `tools/{coolify,glpi}/README.md`). +- **Active concurrent fleet dev on main** → keep phase PRs small; rebase + re-verify anchors immediately before each phase's edits. -## Known facts (ground truth) +## Standing guardrails -- 29 public files contain personal-identity strings (jarvis/jason/woltje/PDA). -- `defaults/SOUL.md` hardcodes "Jarvis" + PDA; `runtime/claude/settings-overlays/jarvis-loop.json`; stray `defaults/AUDIT-2026-02-17-*.md`. -- A `templates/` layer with `{{PLACEHOLDER}}` tokens already exists but is under-used. -- Deployed `~/.config/mosaic` has drifted ahead of source (extra SOUL guardrails) — reconciliation needed. - -## Decisions / guardrails for this mission - -- Do NOT weaken existing hard gates; this is about *where rules live* + *how they customize*. -- Public package: zero PII/secrets. Personal data lives only in user-generated (init-time) files, gitignored or outside the package. -- aiguide repo (`mosaicstack/aiguide`) may be updated in parallel as the narrative "why"; keep consistent with Constitution. -- Every change lands via reviewed PR + green CI (author≠reviewer). +- Do NOT weaken existing hard gates; this re-architecture is about *where rules live* + *how they customize*. +- Public package: zero PII/secrets. Every phase lands via reviewed PR (author≠reviewer) + green CI. +- `aiguide` (`mosaicstack/aiguide`) may be updated as the narrative "why"; keep consistent with the Constitution.