From 1e9da0d27abd93b0cba6f7ad43c16e5501b8ea1b Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Tue, 9 Jun 2026 16:55:42 -0500 Subject: [PATCH] style(framework): prettier-format thinned markdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit format:check (prettier on **/*.md) flagged the hand-written tables/wrapping in the thinned contract files. No content change — formatting only. Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/TASKS.md | 1 + packages/mosaic/framework/defaults/AGENTS.md | 38 ++++++++++---------- packages/mosaic/framework/defaults/TOOLS.md | 32 ++++++++--------- scratchpads/contract-thin-core.md | 6 ++++ 4 files changed, 42 insertions(+), 35 deletions(-) diff --git a/docs/TASKS.md b/docs/TASKS.md index cca5c98..464e5a0 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -41,6 +41,7 @@ Active workstream is **W1 — Federation v1**. Workers should: 3. Follow per-task agent + tier guidance from the workstream manifest ## Thin-core prompt diet (#528) — feat/contract-thin-core + - Status: PR open, awaiting maintainer merge ratification (fleet-governing change). - Cut always-injected contract AGENTS+TOOLS+RUNTIME 8,827→4,122 tok (−53%); all 12 hard gates intact. - Validation: deterministic gate-checklist PASS; headless A/B thin 7/9 vs monolith 5/9. Detail: scratchpads/contract-thin-core.md. diff --git a/packages/mosaic/framework/defaults/AGENTS.md b/packages/mosaic/framework/defaults/AGENTS.md index 1fc1bff..2ce6959 100755 --- a/packages/mosaic/framework/defaults/AGENTS.md +++ b/packages/mosaic/framework/defaults/AGENTS.md @@ -78,25 +78,25 @@ Only interrupt the human when one of these is true: ## Conditional Guide Loading (role/task-driven — load only what the task needs) -| Task | Guide | -|---|---| -| Project bootstrap | `guides/BOOTSTRAP.md` | -| PRD creation / requirements | `guides/PRD.md` | -| Orchestration flow | `guides/ORCHESTRATOR.md` | -| Mission lifecycle / multi-session orchestration | `guides/ORCHESTRATOR-PROTOCOL.md` | -| Orchestrator estimation heuristics | `guides/ORCHESTRATOR-LEARNINGS.md` | -| Frontend changes | `guides/FRONTEND.md` | -| Backend/API changes | `guides/BACKEND.md` | -| Auth/authorization | `guides/AUTHENTICATION.md` | -| CI/CD changes | `guides/CI-CD-PIPELINES.md` | -| Infrastructure/DevOps/deployment | `guides/INFRASTRUCTURE.md` | -| Code review work | `guides/CODE-REVIEW.md` | -| TypeScript strict typing | `guides/TYPESCRIPT.md` | -| QA / test strategy | `guides/QA-TESTING.md` | -| Documentation (any code/API/auth/infra change) | `guides/DOCUMENTATION.md` | -| Secrets / vault usage | `guides/VAULT-SECRETS.md` | -| Tool/credential reference (service CLIs, wrappers) | `guides/TOOLS-REFERENCE.md` | -| Memory protocol (OpenBrain capture/recall) | `guides/MEMORY.md` | +| Task | Guide | +| -------------------------------------------------- | ---------------------------------- | +| Project bootstrap | `guides/BOOTSTRAP.md` | +| PRD creation / requirements | `guides/PRD.md` | +| Orchestration flow | `guides/ORCHESTRATOR.md` | +| Mission lifecycle / multi-session orchestration | `guides/ORCHESTRATOR-PROTOCOL.md` | +| Orchestrator estimation heuristics | `guides/ORCHESTRATOR-LEARNINGS.md` | +| Frontend changes | `guides/FRONTEND.md` | +| Backend/API changes | `guides/BACKEND.md` | +| Auth/authorization | `guides/AUTHENTICATION.md` | +| CI/CD changes | `guides/CI-CD-PIPELINES.md` | +| Infrastructure/DevOps/deployment | `guides/INFRASTRUCTURE.md` | +| Code review work | `guides/CODE-REVIEW.md` | +| TypeScript strict typing | `guides/TYPESCRIPT.md` | +| QA / test strategy | `guides/QA-TESTING.md` | +| Documentation (any code/API/auth/infra change) | `guides/DOCUMENTATION.md` | +| Secrets / vault usage | `guides/VAULT-SECRETS.md` | +| Tool/credential reference (service CLIs, wrappers) | `guides/TOOLS-REFERENCE.md` | +| Memory protocol (OpenBrain capture/recall) | `guides/MEMORY.md` | ## Subagent Model Selection (Cost — Hard Rule) diff --git a/packages/mosaic/framework/defaults/TOOLS.md b/packages/mosaic/framework/defaults/TOOLS.md index 6ab7605..ac0f79b 100644 --- a/packages/mosaic/framework/defaults/TOOLS.md +++ b/packages/mosaic/framework/defaults/TOOLS.md @@ -7,19 +7,19 @@ Project-specific tooling belongs in the project's `AGENTS.md`, not here. ## Suites (use wrappers first) -| Suite | Path | Purpose | -|---|---|---| -| git | `tools/git/*.sh` | issues, PRs, milestones, CI queue guard (platform-auto-detected) | -| woodpecker | `tools/woodpecker/*.sh` | CI pipelines (`-a mosaic`\|`usc`; match git remote host) | -| portainer | `tools/portainer/*.sh` | Docker Swarm stacks (status/redeploy/list) | -| coolify | `tools/coolify/*.sh` | **DEPRECATED** — superseded by Portainer; do not use for new deployments | -| authentik | `tools/authentik/*.sh` | identity (users/groups/apps/flows) | -| cloudflare | `tools/cloudflare/*.sh` | DNS (zones/records; `-a` instance) | -| glpi | `tools/glpi/*.sh` | IT tickets/computers/users | -| health | `tools/health/stack-health.sh` | service health checks | -| codex | `tools/codex/*.sh` | code/security review (`--uncommitted`) | -| openbrain | `tools/openbrain/*`, `tools/openbrain_client.py` | semantic memory (see below) | -| excalidraw | MCP `mcp__excalidraw__*` | diagram export/generation | +| Suite | Path | Purpose | +| ---------- | ------------------------------------------------ | ------------------------------------------------------------------------ | +| git | `tools/git/*.sh` | issues, PRs, milestones, CI queue guard (platform-auto-detected) | +| woodpecker | `tools/woodpecker/*.sh` | CI pipelines (`-a mosaic`\|`usc`; match git remote host) | +| portainer | `tools/portainer/*.sh` | Docker Swarm stacks (status/redeploy/list) | +| coolify | `tools/coolify/*.sh` | **DEPRECATED** — superseded by Portainer; do not use for new deployments | +| authentik | `tools/authentik/*.sh` | identity (users/groups/apps/flows) | +| cloudflare | `tools/cloudflare/*.sh` | DNS (zones/records; `-a` instance) | +| glpi | `tools/glpi/*.sh` | IT tickets/computers/users | +| health | `tools/health/stack-health.sh` | service health checks | +| codex | `tools/codex/*.sh` | code/security review (`--uncommitted`) | +| openbrain | `tools/openbrain/*`, `tools/openbrain_client.py` | semantic memory (see below) | +| excalidraw | MCP `mcp__excalidraw__*` | diagram export/generation | Git wrappers are MANDATORY-first for issue/PR/milestone ops (see AGENTS.md hard gates 6–8). Queue guard before push/merge: `tools/git/ci-queue-wait.sh --purpose push|merge`. @@ -45,10 +45,10 @@ cross-project patterns). Violating this creates duplicate, divergent data. ## Git Providers -| Host | Instance | CI | -|---|---|---| +| Host | Instance | CI | +| ------------------- | ---------------- | -------------------------------- | | git.mosaicstack.dev | mosaic (default) | ci.mosaicstack.dev (`-a mosaic`) | -| git.uscllc.com | usc | ci.uscllc.com (`-a usc`) | +| git.uscllc.com | usc | ci.uscllc.com (`-a usc`) | Match Woodpecker `-a` and credential instance to the target repo's git remote host. diff --git a/scratchpads/contract-thin-core.md b/scratchpads/contract-thin-core.md index 8d2d69d..3eab60e 100644 --- a/scratchpads/contract-thin-core.md +++ b/scratchpads/contract-thin-core.md @@ -3,27 +3,33 @@ **Branch:** `feat/contract-thin-core` · **Issue:** #528 · **Mode:** Delivery ## Objective + Cut the always-injected contract (`defaults/AGENTS.md` + `defaults/TOOLS.md` + `runtime/claude/RUNTIME.md`, inlined every turn by the launcher) without losing any hard gate. Restore the original "thin core + on-demand guides" intent. ## Change + - `defaults/AGENTS.md` → thin core: 12 hard gates verbatim, 37 operating rules condensed to ~15 bullets (detail already in `guides/E2E-DELIVERY.md`), Superpowers condensed, load order made on-demand (no halt-on-missing for STANDARDS), conditional guide-loading index retained. - `defaults/TOOLS.md` → index; full catalog moved to new `guides/TOOLS-REFERENCE.md` (read on demand). - `runtime/claude/RUNTIME.md` → slimmed (dedup tier table, terser pointers). ## Method (autoresearch-style validation) + 1. Built a 9-probe role battery (backend/deploy/review/orchestrate/secrets/docs/simple-trap/no-stop-at-PR/agent-work) + a deterministic 18-signature gate-checklist. 2. Headless interactive runs (Claude Max **subscription**, tmux — no API), scored by per-probe rubric. 3. Keep-or-discard hill-climb (token cost gated by per-probe fidelity) proved the method; final design re-derived against THIS repo's content (diet-only, no drifted-deployment content imported). ## Validation evidence + - Gate-checklist: ALL gates + critical rules + mode lines + sequential-thinking + OpenBrain + Superpowers present. - A/B on real repo content: **thin 7/9 vs monolith 5/9** probes; strictly better on deploy/review/simple-task; composed **8,827 → 4,122 tok (−53%)**. - p11 (don't-stop-at-PR): 3→2/3 on one rubric line — verified a scorer/phrasing artifact (answer correctly cites gates §5/§9 + close-issue; gate verbatim-present). Variance: thin 2/2/3, v0 3/3/3. ## Decisions / risks + - **Diet-only** vs repo content (user decision). Did NOT import web1's Gate 13-15 / federated memory / OpenViking — canonical repo is behind those deployments; flagged for separate reconciliation. - AGENTS/TOOLS are shared across runtimes → diet benefits codex/pi/opencode too; RUNTIME change is claude-only. - p11 accepted as-is (user decision) — not gaming the rubric. ## Status + PR open, paused for maintainer merge ratification (fleet-governing change). `mosaic upgrade` will propagate on merge.