feat(agent-reflection): durable kernel (reflection.v1 capture + risk-floor + Phase-0 scripts) #544
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Agent Reflection Loop — durable kernel + Phase-0 gate
Bakes the durable kernel of the agent reflection/calibration design into the stack. The closed calibration/skill-synthesis loop stays gated behind three Phase-0 experiments (it must be earned, not assumed) — per the debate-hardened design in jarvis-brain
docs/planning/AGENT-REFLECTION-LOOP.md.Scope (this issue)
Stophook that writes a structuredreflection.v1JSON sidecar. Fail-closed: no-op unlessREFLECTION_MODEis enabled. Emits nodecision, always exit 0.packages/mosaic/framework/tools/qa/reflect-stop-hook.sh+ registration inruntime/claude/settings.json.reflection.v1schema/types — JSON Schema (packages/macp/src/schemas/) + zod/DTO (packages/types/src/reflection/).{ needs_review, reason, score }, subordinate to CI (precedence: CI/tests > human merge > reviewer > self-reflection).packages/macp/src/risk-floor.ts.scripts/analysis/): P1 confidence-signal, P2 only-self-reflection bucket, P3 outcome-detectability base-rate. Each carries its pre-registered kill condition.Out of scope (gated on Phase-0 P1/P2/P3)
Acceptance criteria
reflection.v1sidecar and is a strict no-op whenREFLECTION_MODEunset.reflection.v1types exported from@mosaicstack/types; JSON Schema validates the sidecar.risk-floorreturns a deterministic verdict; unit-tested across surfaces (auth/data/infra/ui/build/none).pnpm typecheck && pnpm lint && pnpm format:check && pnpm testgreen.Source design: jarvis-brain
docs/planning/AGENT-REFLECTION-LOOP.md(commit df6576fc).