Skip to content

docs: v3.0 Phase 0 — behavior governance specifications#2

Merged
luiseiman merged 2 commits intomainfrom
claude/mystifying-nightingale
Apr 13, 2026
Merged

docs: v3.0 Phase 0 — behavior governance specifications#2
luiseiman merged 2 commits intomainfrom
claude/mystifying-nightingale

Conversation

@luiseiman
Copy link
Copy Markdown
Owner

Summary

  • SPEC.md — formal semantics of 5 enforcement levels (silent→nudge→warning→soft_block→hard_block), evaluation algorithm pseudocode, chain rules, output protocol with exact JSON shapes, override protocol, 9 edge cases
  • SCHEMA.md — complete YAML shape for behavior.yaml v1, closed DSL specification (operators + fields), template variables, index.yaml format, validation rules, full examples (search-first + no-destructive-git)
  • RUNTIME.md — state.json schema with concrete example, session lifecycle, counter mechanics, TTL purge protocol, POSIX-portable mkdir locking, concurrency scenarios, error recovery
  • AUDIT.md — overrides.log pipe-delimited format, metrics for /forge audit and /forge behavior status, registry integration, session-report.sh integration, grep one-liners for analysis
  • COMPILER.md — compilation pipeline (YAML→bash), generated hook structure, DSL-to-bash operator mapping, settings.json mutation, shared runtime library signatures, PermissionDenied override audit hook, test patterns
  • DECISIONS.md — aligned warning channel (stderr→stdout JSON) and locking mechanism (flock→mkdir POSIX) with formal specs

Acceptance criterion: another engineer can implement Phase 1 without questions.

Test plan

  • Review SPEC.md evaluation algorithm — verify all conditional branches have defined outcomes
  • Review SCHEMA.md search-first example — verify it passes all validation rules in Section 6
  • Review RUNTIME.md state.json example — verify it matches SPEC.md counter mechanics
  • Review COMPILER.md PermissionDenied hook — verify it covers SPEC.md Section 6 override protocol
  • Cross-reference check: every COMPILER.md reference to SPEC/SCHEMA/RUNTIME/AUDIT points to existing sections

🤖 Generated with Claude Code

luiseiman and others added 2 commits April 13, 2026 08:41
Three pre-spec documents for the behavior-governance milestone:
- DECISIONS.md: closed decisions (enforcement levels, runtime, schema)
- SCOPE.md: v3.0 scope, phases, deliverables, success metrics
- COMPETITIVE.md: competitive map and defensible differentials

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Five spec documents for behavior governance — enforcement semantics,
YAML schema, runtime state, audit trail, and behavior-to-hook compiler.
Aligned DECISIONS.md with formal specs (warning channel, locking mechanism).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@luiseiman luiseiman merged commit 8c5fd16 into main Apr 13, 2026
1 check failed
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.

1 participant