Skip to content

Refactor governance to post-session review model#26

Merged
tikazyq merged 1 commit intomainfrom
claude/refactor-governance-behavior-PSfsX
Mar 19, 2026
Merged

Refactor governance to post-session review model#26
tikazyq merged 1 commit intomainfrom
claude/refactor-governance-behavior-PSfsX

Conversation

@tikazyq
Copy link
Contributor

@tikazyq tikazyq commented Mar 18, 2026

Summary

This PR refactors the governance protocol from an intrusive, inline evaluation model to a non-intrusive, post-session review model. Governance no longer wraps agent execution or injects feedback during sessions. Instead, it analyzes output (git diffs) after sessions complete and generates governance logs for learning and rule crystallization.

Key Changes

  • HARNESS.md (v0.1.0 → v0.2.0): Complete protocol redesign

    • Replaced three-layer evaluation model (Static Rules → AI Judge → Human Escalation) with two-layer model (Static Rules → AI Judge)
    • Removed intrusive checkpoint protocol (evaluate() with Allow/Deny/Modify responses)
    • Introduced post-session review protocol (review() that analyzes diffs and produces governance logs)
    • Eliminated rework loops, max-rework limits, and execution-time escalation
    • Simplified checkpoint placement: removed post-production, pre-delivery, and rework-limit checkpoints; replaced with post-session and pre-merge reviews
    • Updated governance persistence model: manifests are now per-review (not per-rework-attempt), governance logs remain cross-review and append-only
    • Clarified that governance is non-blocking and non-intrusive — findings inform future sessions, not the current one
  • specs/048-post-session-governance/README.md (new): Implementation specification

    • Documents rationale for moving away from intrusive governance loop
    • Specifies new harness review subcommand interface
    • Defines governance log schema changes (source, status, issues fields)
    • Outlines removal of agent-wrapping code and rework configuration
    • Provides implementation plan and test cases

Notable Details

  • The refactoring preserves Layer 1 and Layer 2 evaluation logic — only the wrapping/looping mechanism is removed
  • Rule crystallization pipeline (Layer 2 feedback → GovernanceLog → Pattern Detection → Rule Synthesis) remains unchanged
  • Skills (factory, fractal) may still have their own inline governance; this spec covers only the harness CLI command
  • Governance logs continue to feed the learning substrate for future rule crystallization
  • Human review is now asynchronous and non-blocking — governance findings surface for human attention at their own pace

https://claude.ai/code/session_01655ZJtGHr213QepuyYdht7

Add spec 048-post-session-governance defining the shift from intrusive
inline governance (agent wrapping + rework loops) to non-intrusive
post-session review. Update HARNESS.md v0.2.0 to reflect the new model:
- Two-layer evaluation (static + AI judge) run after session completes
- No agent wrapping, no rework loops, no feedback injection
- review() protocol replaces evaluate() with rework semantics
- Simplified checkpoint placement (post-session, pre-merge, periodic)

Code implementation deferred to avoid conflicts with other branches.

https://claude.ai/code/session_01655ZJtGHr213QepuyYdht7
Copilot AI review requested due to automatic review settings March 18, 2026 23:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Synodic governance protocol documentation to shift from inline, session-wrapping evaluation toward a post-session review model, and adds a new spec describing the intended implementation of harness review.

Changes:

  • Redesigns HARNESS.md from a 3-layer checkpoint-based protocol to a 2-layer post-session review protocol (with asynchronous human review).
  • Adds a new spec (specs/048-post-session-governance) documenting the rationale, CLI interface, schema changes, and migration plan.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
specs/048-post-session-governance/README.md New LeanSpec-style spec for post-session governance and harness review implementation plan.
HARNESS.md Protocol rewrite to a non-intrusive, post-session governance review model and updated persistence/logging guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +117 to +122
### Tier 1 — Manifest (per-review, local)

- Location: `.factory/{work-id}/manifest.json` or `.fractal/{work-id}/manifest.json`
- Content: full run state, attempt history, checkpoint results
- Lifecycle: created at run start, finalized at run end, gitignored
- Purpose: operational state for the current run
- Location: `.harness/.runs/{review-id}/manifest.json`
- Content: review results, L1/L2 reports, diff snapshot
- Lifecycle: created at review start, finalized at review end, gitignored
- Purpose: detailed record of a single review
Comment on lines +1 to +11
---
status: in-progress
created: 2026-03-18
priority: high
tags:
- harness
- governance
- refactor
created_at: 2026-03-18T23:27:23.203961706Z
updated_at: 2026-03-18T23:27:23.203961706Z
---
Comment on lines +19 to +22
Governance is **non-intrusive**. It does not wrap, interrupt, or inject feedback
into agent sessions. Instead, it runs **after** a session completes, analyzing
the output (diffs, logs) and producing governance records that feed into rule
crystallization.
@tikazyq tikazyq merged commit 052773c into main Mar 19, 2026
6 checks passed
@tikazyq tikazyq deleted the claude/refactor-governance-behavior-PSfsX branch March 19, 2026 00:21
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.

3 participants