Commit Graph

14 Commits

Author SHA1 Message Date
rUv 0d5eeeae0c Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: claude/guidance-control-plane-uhmR3
- Timestamp: 2026-02-02T03:52:19Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 03:52:19 +00:00
rUv 89342d8ae8 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: claude/guidance-control-plane-uhmR3
- Timestamp: 2026-02-02T03:52:12Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 03:52:12 +00:00
rUv 15eaaf8022 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: claude/guidance-control-plane-uhmR3
- Timestamp: 2026-02-02T03:52:09Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 03:52:09 +00:00
Claude 3e5f92ef8b security: eliminate hardcoded HMAC keys, fix timing attacks, remove command injection
- Remove hardcoded DEFAULT_SIGNING_KEY from proof.ts, artifacts.ts, evolution.ts
  Constructors now require explicit signingKey (fail-closed)
- Add timingSafeEqual() XOR-based constant-time comparison to proof.ts,
  artifacts.ts, authority.ts (prevents HMAC timing side-channels)
- Fix command injection in headless.ts: replace execFile('sh', ['-c', cmd])
  with direct arg-array execFile('claude', ['-p', prompt, ...])
- Fix command injection in analyzer.ts: same shell-free pattern
- Remove dead code: unused toLowerCase() in analyzer.ts extractMetrics
  and scoreCompleteness
- Hoist gates.ts GATE_DECISION_SEVERITY to module-level constant
- Add ConformanceRunner signingKey parameter for explicit key propagation
- Update tests: 3 new "should throw without key" assertions
- Add flight build report (docs/reports/flight-build-report.md)

1,331 tests passing.

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-02 01:51:26 +00:00
Claude 671831dacd feat: add A/B benchmark harness with 20 tasks, gate simulation, and composite scoring
Implements the Measurement Plan: Config A (no control plane) vs Config B
(Phase 1 guidance) across 20 representative tasks from Claude Flow repo
history spanning 7 task classes (bug-fix, feature, refactor, security,
deployment, test, performance).

KPIs: success rate, tool calls, token spend, violations, human
interventions. Composite score formula:
score = success_rate - 0.1*cost - 0.2*violations - 0.1*interventions

Category shift detection: B beats A by ≥0.2 on composite across ≥3 task
classes. Gate simulation detects destructive commands, hardcoded secrets,
force push, unsafe types, skipped hooks, missing tests, policy violations.

1,328 tests passing across 26 files (38 new AB benchmark tests).

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 22:22:17 +00:00
Claude 2810c8bdc4 docs: update README and API reference with generators, analyzer, and validation suite
Add documentation for all features built in recent sessions:
- Generators module (generateClaudeMd, scaffold, skills, agents)
- Analyzer module (6-dimension scoring, autoOptimize, optimizeForSize)
- Headless benchmarking (claude -p integration with proof chain)
- Empirical validation (validateEffect with Pearson r, Spearman rho,
  Cohen's d, content-aware executors, multi-trial support)
- Update test count: 1,290 tests across 26 files
- Update module count: 31 modules across 9 layers
- Add generators and analyzer to API quick reference import map
- Add full API reference tables for both modules

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 21:54:54 +00:00
Claude e06f273a1b feat: add CLAUDE.md generators, analyzer, and auto-optimizer
Generators (src/generators.ts):
- generateClaudeMd() - structured CLAUDE.md from project profile with
  language-specific invariants (TS, JS, Python, Rust, Go, Java) and
  framework rules (React, Next.js, Express, Django, etc.)
- generateClaudeLocalMd() - CLAUDE.local.md for personal overrides
  with machine notes, editor prefs, and experimental rules
- generateSkillMd() - Claude Code skills with YAML frontmatter
- generateAgentMd() - Agent definitions with YAML frontmatter
- generateAgentIndex() - Agent index.yaml grouped by category
- scaffold() - Full .claude/ directory structure generation

Analyzer (src/analyzer.ts):
- 6-dimension scoring (0-100 each, weighted composite):
  Structure (20%), Coverage (20%), Enforceability (25%),
  Compilability (15%), Clarity (10%), Completeness (10%)
- benchmark() - before/after comparison with per-dimension deltas
- autoOptimize() - iteratively applies high-priority suggestions
  with concrete patches, re-scores to verify improvement
- formatReport() / formatBenchmark() - human-readable output

Analysis of existing CLAUDE.md files:
- Root CLAUDE.md: 73/100 (C) -> 77/100 after optimization
- v3/CLAUDE.md: 64/100 (D) -> 78/100 after optimization
- Key findings: low rule density, oversized constitution section,
  missing Architecture section

Tests: 141 new tests (68 generators + 73 analyzer), 1229 total passing

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 20:48:36 +00:00
Claude e5ca9411cd docs: add comprehensive user documentation with guides, tutorials, and diagrams
Ground README and guides in how Claude Code actually loads memory:
- CLAUDE.md as team-shared, committed guidance
- CLAUDE.local.md as private, machine-specific overrides
- Upward directory search and monorepo layering
- @import pattern for git worktree compatibility
- /memory command for verification
- Optimizer lifecycle: local experiments promote to root

README additions:
- "How Claude Code Memory Works" section with audience table
- "How CLAUDE.md Becomes Enforceable Policy" mermaid diagram
- "What Goes Where" section with concrete examples
- Updated test count to 1,088 across 24 files

Getting-started additions:
- Background section explaining memory file loading
- Both files in minimal setup example
- Detailed CLAUDE.md vs CLAUDE.local.md guidance
- @import worktree pattern
- Optimizer promotion workflow
- Verification steps with /memory command

Architecture additions:
- "Starting Point" section explaining the gap raw text leaves
- File discovery diagram showing upward search + @import
- Annotated compile/run/evolve lifecycle

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 20:23:48 +00:00
Claude 176f6ad235 docs: add comprehensive user documentation with guides, tutorials, and diagrams
13 documentation files covering all 20+ modules:

Guides:
- Getting Started: installation, setup, core loop
- Architecture Overview: 7-layer design with mermaid diagrams
- Multi-Agent Security: threats, collusion, quorum, trust
- Capabilities and Trust: permission algebra, trust tiers, authority
- Knowledge Management: uncertainty, temporal, truth anchors
- WASM Kernel: building, using, benchmarking

Tutorials:
- Enforcement Gates: wire gates into hooks
- ContinueGate: prevent runaway agent loops
- Proof & Audit Trail: tamper-evident chains
- CI/CD & Headless Testing: automated compliance

Reference:
- API Quick Reference: all exports, methods, types

Diagrams:
- 10 mermaid diagrams: system overview, enforcement pipeline,
  decision trees, trust flow, capability delegation, memory
  security layers, knowledge stack, proof chain, meta-governance
  lifecycle, compile-retrieve-gate sequence

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 19:55:55 +00:00
Claude 2dd2bb891f feat: add Rust WASM policy kernel with SIMD128 acceleration
Two-layer architecture: Layer A (Rust→WASM kernel for pure functions) +
Layer B (Node host bridge with transparent JS fallback).

Kernel modules:
- proof: SHA-256, HMAC-SHA256, content hashing, chain verification
- gates: secret scanning (8 patterns), destructive command detection (12 patterns)
- scoring: shard relevance scoring with domain/risk/keyword bonuses
- batch: 9-operation batch API to minimize WASM boundary crossings

Performance (SIMD128 enabled, 10k events):
- SHA-256 throughput: 1.80x faster (910k/s vs 505k/s)
- Secret scan (dirty): 1.96x faster (362k/s vs 185k/s)
- Secret scan (clean): 1.68x faster (676k/s vs 402k/s)
- Proof chain: 1.25x faster (61ms vs 76ms)

Includes:
- Pre-built wasm-pkg/ with SIMD+O2 optimization
- 15 acceptance tests (parity + 10k throughput benchmarks)
- ADR-G025 documenting architecture and performance
- README updated with WASM kernel docs and KPIs
- Wired exports into index.ts and package.json

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 17:44:35 +00:00
Claude a57ea60aab feat: add ContinueGate, wire all exports, rewrite README
- Add ContinueGate (ADR-G024): step-level gate that evaluates whether
  long-running agents should continue, using budget slope detection,
  rework ratio tracking, and coherence/uncertainty thresholds
- Wire 5 missing wave 3 module exports into index.ts (trust,
  truth-anchors, uncertainty, temporal, authority)
- Add 8 missing sub-export paths to package.json (trust, truth-anchors,
  uncertainty, temporal, authority, adversarial, meta-governance,
  continue-gate)
- Rewrite README with product-oriented introduction, mermaid architecture
  diagram, 28-module reference table, ship phases, acceptance tests,
  decision matrix, and failure modes

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 17:05:45 +00:00
Claude ff4a4b5fd1 docs: add wave 3 ADRs G017-G023 and update README index
- G017: Trust Score Accumulation (tiers, decay, 5:1 penalty/reward)
- G018: Truth Anchor System (immutable HMAC-signed facts, conflict resolution)
- G019: First-Class Uncertainty (confidence intervals, evidence, contested detection)
- G020: Temporal Assertions (bitemporal windows, supersession, reasoning)
- G021: Human Authority and Irreversibility (escalation hierarchy, proof levels)
- G022: Adversarial Model (threat detection, collusion, memory quorum)
- G023: Meta-Governance (constitutional invariants, amendments, optimizer bounds)

README ADR index updated from Proposed to Accepted with file links.

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 16:29:38 +00:00
Claude ee3c182b79 feat: complete wave 2 with conformance kit, exports, ADRs, and README
- Add conformance-kit.ts: Memory Clerk acceptance test with SimulatedRuntime,
  MemoryClerkCell, and ConformanceRunner for replay verification
- Add manifest-validator.test.ts: 59 tests for fails-closed admission
- Add conformance-kit.test.ts: 42 tests for cell runtime and replay
- Wire all wave 2 modules into index.ts (capabilities, conformance-kit,
  proof, memory-gate, coherence)
- Add 8 new export paths to package.json (proof, memory-gate, coherence,
  artifacts, capabilities, evolution, conformance-kit)
- Write ADR-G010 through G016 covering capability algebra, artifact ledger,
  manifest validator, evolution pipeline, conformance kit,
  coherence-driven throttling, and agentic container integration
- Add package README with quantified impact, API reference, tutorials,
  architecture diagram, and full test matrix
- 639 tests passing across 17 test files

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 12:04:55 +00:00
Claude 0add23b8d7 docs: add ADR-G001 through G005 for guidance control plane
Architecture Decision Records for core design decisions:
- G001: Why a separate control plane beside Claude Code
- G002: Constitution/shard split for token-efficient retrieval
- G003: Weighted pattern matching for intent classification
- G004: Four enforcement gates (destructive, allowlist, diff, secrets)
- G005: Cryptographic proof envelopes for run auditing

Remaining ADRs (G006-G009) in progress.

https://claude.ai/code/session_01HLi9WmfvFgkDLJxLKGAUTf
2026-02-01 11:32:56 +00:00