# Runner Project Stats Report

> Generated by: runner  
> Task ID: c4c7de4e  
> Date: 2026-04-28

---

## 1. Test Suite Results

Command: `pytest tests/ -v --tb=short`

| Metric | Value |
|--------|-------|
| **Total Tests** | 141 |
| **Passed** | 141 |
| **Failed** | 0 |
| **Errors** | 0 |
| **Warnings** | 1 (RequestsDependencyWarning: urllib3/chardet version mismatch) |
| **Duration** | ~6.41s |

**Result: All tests pass.**

---

## 2. Project Code Statistics

| Category | Files | Total Lines |
|----------|-------|-------------|
| **All Python files** | 44 | 31,140 |
| **Test files only** | 11 | 3,237 |
| **All Markdown files** | ~200+ | 115,220 |

*Note: Line counts measured via PowerShell `(Get-Content).Count` aggregation.*

---

## 3. Skills Directory (`skills/`)

| Skill File | Primary Responsibility |
|------------|------------------------|
| `aitp-push-after-feature.md` | Mandates git commit + push after every feature/sub-feature in this repo before saying "done" |
| `skill-continuous.md` | Resume mode — restore workflow after session break or context compaction |
| `skill-discover.md` | Discover posture — find, evaluate, and register sources before reading; checks L2 knowledge base first |
| `skill-frame.md` | Frame posture — lock conventions, anchors, and contradictions before derivation |
| `skill-init.md` | First-run setup — ask user where to store topics and save workspace config |
| `skill-librpa.md` | Domain skill for ABACUS+LibRPA topics — workflow lanes, domain invariants, smoke tests |
| `skill-l3-analyze.md` | L3 Derivation — execute derivations, trace source derivations, run calculations; supports `derive` and `trace-derivation` activities |
| `skill-l3-distill.md` | L3 Distillation — extract final claims from integrated results; obligation backflow check before candidate submission |
| `skill-l3-gap-audit.md` | L3 Gap Audit — find hidden assumptions, approximation regimes, correspondence checks, prerequisite gaps |
| `skill-l3-ideate.md` | L3 Ideation — generate/research ideas and decompose source papers into atomic claims/concepts |
| `skill-l3-integrate.md` | L3 Integration — combine analysis into findings; claim readiness assessment (blocked/qualified/stable) |
| `skill-l3-plan.md` | L3 Planning — design derivation route from idea; mandatory execution environment section for numeric lanes |
| `skill-promote.md` | Promote mode — guide validated candidates through L2 promotion gate (human approval required) |
| `skill-read.md` | Read posture — build source basis with mechanical TOC extraction; skim-all-before-deep-read workflow |
| `skill-validate.md` | Validate mode — adversarial L4 review; SymPy verification, devil's advocate, six outcomes |

*Additional runtime skill:*  
- `research/adapters/openclaw/plugin/aitp-openclaw-runtime/skills/aitp-runtime/SKILL.md` — Enter the local AITP kernel from OpenClaw for auditable, resumable, conformance-checked runs.

---

## 4. Test Files and Module Coverage

| Test File | Tests Count | Module Scope |
|-----------|-------------|--------------|
| `test_e2e_scenario_a.py` | 11 | **E2E Scenario A — Formal Theory (Chern-Simons anomaly)**. Full golden-path L0→L1→L3(ideate→plan→derive→integrate→distill)→L4(pass)→L2(promotion). Covers bootstrap, source registration, convention snapshot, activity traversal, candidate submission, L4 review, promotion, and verification checkpoints. |
| `test_e2e_study_l2.py` | 3 | **E2E Study Workflow (QHO)**. Complete research lifecycle: L0→L1→L3→L4→promote→L2 graph. Covers L2 node/edge creation, conflict detection on promotion, trust evolution (source_grounded → multi_source_confirmed → validated → independently_verified). |
| `test_foundation_safety.py` | 10 | **Foundation safety**. Topics directory resolution (nested vs flat), slug validation (traversal, empty, multi-component rejection), safe topic-root resolution, atomic write semantics (replace, append, concurrent), promotion gate lifecycle (pending→approve→promote vs reject), stop-hook scoping (only updates active topic). |
| `test_io_contracts.py` | 21 | **I/O contracts across all layers**. L0 bootstrap/gate/transition, L1 gate/artifacts/semantic blocking/L1→L3 transition, L3 subplane start/activity switch/template headings, L4 gate/candidate requirement/devil's advocate blocking, L2 node creation/edge dangling rejection, execution brief structure (no duplicate keys), flow notebook generation, doctor validation (state.md health), conflict resolution (accept_new/defer), L3→L0 evidence request callback, order-of-magnitude estimation, LaTeX semantic search, scratch-to-candidate promotion. |
| `test_knowledge_base_ops.py` | 6 | **Knowledge-base surface operations**. Topic runtime index/log materialization, global L2 index/log materialization, L2 index grouping by family/regime/warning/negative. |
| `test_l3_subplanes.py` | 7 | **L3 subplane gates and skills**. New L3 starts in ideate, any activity switch allowed (v4), required active artifact per activity, activity switch sequence, backedge from derive to ideate allowed, invalid activity rejection, session_start hook mentions L3 skill. |
| `test_l4_l2_memory.py` | 8 | **L4 physics adjudication and global L2 memory**. Six L4 outcomes (pass, partial_pass, fail, contradiction, stuck, timeout), physics check fields, promote writes to global L2 root, conflict detection on repeat promotion, version receipt on repeat promotion, 2D trust classification (trust_basis + trust_scope). |
| `test_state_model.py` | 6 | **State model and gates**. Topic root resolution (direct vs repo-root topics dir), bootstrap L1 scaffold creation, execution brief blocks on missing L0 field, execution brief turns ready after all L1 artifacts filled, hook outputs (session_start/compact print stage/posture/skill). |
| `test_study_l2_graph.py` | 16 | **L3 workspace + L2 knowledge graph (v4 API)**. L3 activities defined, artifact names, advance to L3, activity switch, any activity allowed, invalid rejection, L3 info in brief, L2 node creation (all types), source_ref requirement, node update, merge preserves trust, edge creation (all types), dangling rejection, graph query by text/type/from_node, merge delta creates/updates nodes, negative_result/falsifies types. |
| `test_visualization.py` | 15 | **Visualization tools**. EFT tower (basic, correspondence, not-found, empty, node title lookup), derivation chain (basic, steps in body, edges, non-derivation error, nonexistent), knowledge graph (empty, nodes, edges, type filter, center_node depth, missing correspondence detection, no-missing when limits exist, type icons, trust markers). |

**Test methodology breakdown:**
- **E2E tests**: 14 (Scenario A + Study L2)
- **Unit/contract tests**: 127 (foundation, io, kb ops, L3, L4, state model, study graph, visualization)
- **Total**: 141

---

*End of report.*
