skip to content
Case study · self-discovery

The first estate CAS governed was its own

Every architecture tool sounds convincing on a codebase you cannot inspect. So the honest version of this page is the run the platform executed against itself — the findings, the gaps it raised against its own source, and the score it published while two of its controls were not enforced.

repository
ideas-to-life/cas-system
language
Python
run
2026-09-28
output
ARCHITECTURE.md
method
positive evidence only
The estate

One repository, one cycle, no preparation

Nothing was annotated for the run and nothing was tidied first. The numbers below are the ones the cycle wrote out, including the ones that do not flatter it.

214
files scanned
38 modules across the package
20
components reconstructed
in 1 deployable container
48
flows catalogued
CI workflows, CLI entrypoints and declared flows
120
evidence items
25 published in the ledger
governance
87/ 100

6 of 8 controls enforced

control coverage
86/ 100

weighted by evidence behind each control

evidence strength
94/ 100

how much of the model is anchored to files

drift index
14/ 100

distance between declared and discovered

Headline, as the run wrote it
  • 1 container and 20 components reconstructed from source with high confidence
  • 48 executable flows catalogued across GitHub Actions, CLI and the step registry
  • 6 controls enforced in CI across prevent, generate and correct; detect is advisory only
  • 120 evidence items anchor every claim; 50 candidate gaps stay visible instead of hidden
What it found

Four findings, and what each one cost

A finding is only useful if it changes a decision. Each of these did, and each one resolves to files in the repository you can open.

01

The model was rebuilt from files, not from the wiki

What the run recorded
20 components across 4 layers, 20 of them at high confidence, every one carrying the source path it was reconstructed from. 48 executable flows were catalogued across CI workflows, the CLI and the step registry, anchored by 120 evidence items.
What it refused to do instead
A diagram maintained by hand would have described the single deployable and stopped there — the layers below it are the part that moves every week.
The decision it forced
The reconstruction, not the drawing, became the reference model. Anything the repository implies but no file proves stays out of it.
02HighDetect

Declarations it could not resolve were reported, not filled in

What the run recorded
11 declared flows held a value the extractor could not resolve into an executable step list, across 4 modules — architecture_work_assessment, governance_action_service, proposal_projection and flow_extractor. A further 3 step expressions could not be resolved to an identifier. Each one is recorded against the module that declares it, with an empty sequence.
What it refused to do instead
A generator optimising for a complete-looking document would have inferred a plausible sequence from the surrounding code, and the diagram would have been wrong in the one place nobody would think to check.
The decision it forced
Flow Step Resolution runs at src/cas_runner/steps/forensic/flow_extractor.py with 62% coverage as a detective control — which is the reason these declarations are visible at all instead of silently absent.
03HighDetect

A capability of its own was recorded as degraded

What the run recorded
Reasoning engine unavailable; recommendations lack expert semantic reviews. Expert Semantic Review is carried as a control with an enforcement point and no coverage, rather than left out of the model because it was not running.
What it refused to do instead
A self-report that only listed what worked would have shown a governance surface with nothing missing, and the missing review would have been discovered by whoever trusted a recommendation.
The decision it forced
The finding is a high-severity candidate against src/cas_runner/llm/mock_client.py, and the governance score is published with it included.
04DetectDetect

It published the score it actually earned

What the run recorded
The run raised 50 candidate gaps against the platform's own codebase — 15 of them published in this console with their source files — and scored governance 87, coverage 86, evidence 94 and drift 14. 6 of 8 controls are enforced in CI.
What it refused to do instead
Rounding the two unenforced controls away would have produced a clean sheet, and the document would have stopped being worth reading the day someone checked one of the numbers.
The decision it forced
The artefact ships in the repository at that score. Every figure on this page is read from the same run, and the gap register is the part worth arguing with.
The loop that keeps it true

6 controls enforced, 2 reported as not

The same workflows CAS installs on a customer repository run on its own. A control is either enforced with measured coverage, advisory, or a rule with no enforcement point — there is no fourth state where everyone assumes it is working.

Enforced in CI

Blocking or generating on every pull request, with coverage read from evidence.

6 enforced
  • Managed Steering SyncCorrect

    Only CAS may write managed steering sections; drift outside the managed block is rejected before merge.

    94% coverage
    .github/workflows/cas-managed-steering-sync.yml
  • Governance Portal PublishGenerate

    Portal content is regenerated from the knowledge layer; hand-edited portal pages cannot reach Pages.

    100% coverage
    .github/workflows/cas-portal-publish.yml
  • Continuous Architecture LoopPrevent

    Every pull request re-runs evaluation and reconciliation; unreconciled architecture work blocks the merge.

    88% coverage
    .github/workflows/cas-continuous-architecture.yml
  • Build & Contract ValidationPrevent

    Runs the governance validator alongside build and contract validation as a required status check.

    97% coverage
    .github/workflows/cas-build-validation.yml
  • Governance ValidationPrevent

    Validates the governance substrate itself and publishes a governance health report per event.

    91% coverage
    .github/workflows/governance-validation.yml
  • Build Steering ProjectionPrevent

    Steering projections must be built deterministically and uploaded with a captured projection ID.

    100% coverage
    .github/workflows/cas-build-steering-projection.yml

Not enforced, and said so

Carried in the model with an enforcement point and the coverage they actually have.

2 open
  • Expert Semantic ReviewDetectGap

    Reasoning-layer review of recommendations. Currently degraded: the mock client is active, so recommendations ship without semantic review.

    src/cas_runner/llm/litellm_client.py · 0% coverage
  • Flow Step ResolutionDetectAdvisory

    Detects declared flow values that cannot be resolved into an executable step list and raises them as candidate gaps.

    src/cas_runner/steps/forensic/flow_extractor.py · 62% coverage

Both open controls are detective: they report deviation rather than block a merge. That is the reason the governance score is 87 and not 100 — a number that moves when the pipeline changes is worth more than one that cannot go down.

Check it yourself

Every number on this page has a file behind it

The console holds the same run. The document view serves the unedited output from the repository next to the generated one, so you can read the source of each figure rather than take it from a slide.

The run output

The ARCHITECTURE.md this cycle wrote, served exactly as it sits in the repository, alongside the generated twelve-section document.

Open the document view

The evidence ledger

25 of 120 evidence rows with their file paths and kinds, plus the 15 published candidate gaps and what raised each one.

Open the ledger

Two cycles, diffed

The same repository one cycle earlier, regenerated and diffed line by line, so you can see which findings arrived and which closed.

Open the cycle diff

The two other repositories in the console switcher are illustrative, built to show how the same views read for a codebase you do not already know. Only ideas-to-life/cas-system is a real discovered estate.

The interesting run is the one against your repository

A first discovery run installs nothing and writes nothing. It produces the model and its gap register, and the conversation starts from findings with file paths attached — the way this page did.