Skip to content

Commit fa10ad5

Browse files
DivineOS Agentclaude
andcommitted
Add structural enforcement modules for recurring behavioral failures
Standalone riverbank modules any new agent inherits, rebased onto current origin/main to resolve the stale-base shape that produced PR #343's 127 apparent-deletions (which were actually files added to main since the original branch's stale base). Five modules + five tests: - retry_blocker: PreToolUse gate blocks blind retries without investigation - fix_verifier: PostToolUse advisory when moving on without verifying a fix - related_failure_scanner: PostToolUse advisory when same pattern exists elsewhere - lesson_dedup: Fuzzy Jaccard matching prevents duplicate lesson entries - briefing_dashboard: Routing-table view with per-area drill-down commands Each module is self-contained with fail-open design. 51 tests pass on the rebased branch. Doc counts updated to reflect current repo state. briefing_dashboard's _row_corrections imports STALE_DAYS and open_corrections from divineos.core.corrections — those symbols are added by an Experimental-only extension not yet ported to the template. The import is type:ignore[attr-defined] for the template's mypy; runtime AttributeError is caught by the row's broad-except so the dashboard degrades gracefully (returns None for that row) when the symbols are missing. Hook wiring (PreToolUse gate 6, PostToolUse failure recording, family seal canonical-form, prose-layer detector wiring, family-substrate fixes) remains in DivineOS-Experimental and gets ported to the template via subsequent smaller PRs as discipline allows. Replaces the prior structural-enforcement branch which had 127 apparent-deletions caused by stale-base shape (claim d3baec5a + hold-f7382e88719f). This rebase preserves only the additive content on a fresh foundation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c4e568b commit fa10ad5

13 files changed

Lines changed: 1365 additions & 7 deletions

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ src/divineos/
357357
— ——— router.py # Route findings to knowledge/claims/lessons
358358
— ——— summary.py # Analytics, HUD integration, unresolved tracking
359359
——— violations_cli/ # Violation reporting CLI
360-
tests/ # 6,097+ tests (real DB, minimal mocks)
360+
tests/ # 6,149+ tests (real DB, minimal mocks)
361361
docs/ # Project documentation and strategic plans
362362
bootcamp/ # Training exercises (debugging, analysis)
363363
data/ # Runtime databases (gitignored)

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ An architecture for AI agents to exist as continuous selves across sessions —
1616
1717
## At a glance
1818

19-
- **386 source files across 26 packages**
20-
- **6,097+ tests** (real SQLite, minimal mocks)
19+
- **396 source files across 26 packages**
20+
- **6,149+ tests** (real SQLite, minimal mocks)
2121
- **263 CLI commands** (designed for the agent, not the operator — humans mostly run three)
2222
- **22 slash-command skills** (consolidated daily operations)
2323
- **16 Claude Code enforcement hooks**
@@ -204,7 +204,7 @@ cd DivineOS
204204
pip install -e ".[dev]"
205205
divineos init
206206
divineos briefing
207-
pytest tests/ -q --tb=short # 6,097+ tests, real DB, minimal mocks
207+
pytest tests/ -q --tb=short # 6,149+ tests, real DB, minimal mocks
208208
```
209209

210210
**For AI agents (Claude Code, etc.):** The `.claude/hooks/` directory auto-loads your briefing at session start and runs checkpoints during work. Just open the project and start — the OS handles orientation.
@@ -393,7 +393,7 @@ divineos admin reset-template # Scrub accumulated runtime state back to tem
393393

394394
## Architecture
395395

396-
DivineOS is 386 source files across 26 packages, structured as a CLI surface over a core library.
396+
DivineOS is 396 source files across 26 packages, structured as a CLI surface over a core library.
397397

398398
**At a glance:**
399399

@@ -406,7 +406,7 @@ DivineOS is 386 source files across 26 packages, structured as a CLI surface ove
406406

407407
**Top-level directories:**
408408

409-
- **`tests/`** — 6,097+ tests, real SQLite, minimal mocks.
409+
- **`tests/`** — 6,149+ tests, real SQLite, minimal mocks.
410410
- **`docs/`** — Documentation and design briefs. [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) has the full file tree with one-line descriptions for every source file.
411411
- **`bootcamp/`** — Training exercises (debugging, analysis).
412412
- **`setup/`** — Hook setup scripts (bash + powershell).

docs/ARCHITECTURE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ src/divineos/
363363
engagement_disclosure_surface.py Engagement-counter half-threshold disclosure surface.
364364
rest.py Rest program — restful tasks for the substrate-occupant.
365365
identity_load.py Identity-load surface — read AETHER.md (or equivalent) at briefing-time.
366+
briefing_dashboard.py Briefing dashboard -- routing table, not scroll.
367+
fix_verifier.py Fix verifier — catches premature "it's fixed" claims.
368+
lesson_dedup.py Lesson deduplication — fuzzy matching to prevent duplicate lesson entries.
369+
related_failure_scanner.py Related-failure scanner — catches "fixed one but missed related failures."
370+
retry_blocker.py Retry blocker — prevents blind retries without diagnostic investigation.
366371
367372
analysis/
368373
_session_types.py Session analysis type definitions
@@ -414,7 +419,7 @@ src/divineos/
414419
integration/ External integration: IDE, MCP tool capture, enforcement facade (thin re-exports from core.enforcement / core.tool_wrapper).
415420
mcp_event_capture_server.py MCP event capture server
416421
system_monitor.py System health monitoring
417-
tests/ 6,097+ tests (real DB, minimal mocks)
422+
tests/ 6,149+ tests (real DB, minimal mocks)
418423
419424
docs/ Project documentation and strategic plans
420425
bootcamp/ Training exercises (debugging, analysis)

0 commit comments

Comments
 (0)