midi2-gpu-fabric.git · FCIS_AUDIT.md
midi2-gpu-fabric.git / FCIS_AUDIT.md
revision 97ad12bbc865c77ee72321f2581b21c2cc278e17 · complete file
# FCIS_AUDIT.md
Audited against **FCIS v1.1.0** (RFC 0001 four-layer architecture + adopted standards: FCIS-AIC-Preflight, **FCIS-AX**, FCIS-VRT). Date: 2026-07-31.
## Executive Summary
Status: **PARTIALLY COMPLIANT** — compliant on RFC 0001 layering; **FCIS-AX remediation is complete for the Chapter 36 uncertainty navigator and remains in progress for the broader UI sweep**. The core opaque-surface gap is closed (Phase 1).
**Scope correction (synced to governance ch.17 "The Score" + live-code reachability, 2026-07-24):** the initial pass over-counted "11 custom views" as if each needed heavy `NSAccessibility` work. Grounding in ch.17 and instantiation reachability, the picture is:
- **The one truly-opaque, custom CALayer-drawn beat surface that ships is `StorifyTimelineChartView`** — the Score's timeline lens, and the exact surface of the "64 beats" failure. **Phase 1 exposed it to the accessibility tree (commit `dab07878`); the core FCIS-AX gap is closed** and verified by an AX-driven harness.
- **`CutBoardNSView` / `CutBoardView` / `CutBoardCanvas` are RETIRED** by ch.17 (decision 5 + "What is retired": the free-2D patch-graph canvas is deprecated and removed as a surface) and have **0 live references**. They must be **deleted**, not made accessible — making them accessible was wasted effort and was reverted.
- The remaining live views are **NSTextView-backed editors** (`FountainEditorPage`, `BaselineDualEditorView`, `StudioMonospaceTextEditor`, `StorifySourceTextView`, `WritingToolsTextView`) which **inherit NSTextView's rich text accessibility** (gap = identifiers/labels, FCIS-AX-06), and **SwiftUI/PDFKit** surfaces (`ScoreStageView`, `SemanticScoringView`, `FountainRenderOverlayView`) whose content is accessible by default (gap = grouping/labels). None is an opaque custom-drawn beat surface.
Top findings:
- RFC 0001 layers (AGENTS / PLANS / Skills / MCP) remain orthogonal and present — PASS.
- **Opaque beat surface — FIXED (Phase 1):** `StorifyTimelineChartView` exposes every beat and gap as an accessible element (role/label/value/id/press), proven by `StorifyTimelineAccessibilityTests` through the accessibility tree.
- **Demonstrated harm that motivated it (FCIS-AX-03/04):** in a live drive on 2026-07-24 the Copilot reported "Read 64 passages into 64 beats" while the BEATS lane — and the accessibility tree — presented none; undetectable except by eyeballing pixels. Phase 1 removes this on the timeline.
- **Verification method (FCIS-AX-05):** an AX-driven harness now exists (Phase 1); wiring it into `Scripts/verify` and grounding the Copilot's claims in it are Phase 3.
## Repository Inventory
- Root AGENTS: `AGENTS.md` (now carries the FCIS-AX invariant).
- Nested AGENTS: `apps/modernization-studio/AGENTS.md` (now carries an "Accessibility (FCIS-AX)" section + AX-driving in "THE WAY"), `apps/stage-native/AGENTS.md`, `apps/teatro-stage-web/AGENTS.md`.
- PLANS: `PLANS.md` present.
- Skills: `.codex/skills/**/SKILL.md` present (add-instrument, modernization-studio-ops, ollama-eval, repo-ops, teatro-stage-web-dev).
- UI under audit for FCIS-AX: `apps/modernization-studio/Sources/ReframeApp/` (57 SwiftUI view files; 11 custom/AppKit views).
## Compliance Matrix
| Requirement ID | Requirement (short) | Status | Evidence | Fix recommendation |
| --- | --- | --- | --- | --- |
| FCIS-AGENTS-1 | AGENTS declarative (invariants/routing only) | PASS | AGENTS files are scope/invariants/routing; runbooks live in skills. | Keep runbooks in skills. |
| FCIS-PLANS-1 | PLANS.md exists and AGENTS requires it | PASS | `PLANS.md` present; AGENTS route multi-step/high-risk work to it. | Keep references consistent. |
| FCIS-SKILLS-1 | Skills carry runbooks (purpose/when/steps/output) | PASS | `.codex/skills/**/SKILL.md` present. | Add skills for new runbooks. |
| FCIS-LAYERS-1 | Orthogonality across layers | PASS | Procedures in skills; AGENTS declarative; PLANS holds intent. | Do not reintroduce procedures in AGENTS. |
| FCIS-MCP-1 | MCP capability only; no MCP dependence | PASS | No MCP config; AGENTS state MCP optional. | Keep MCP out of repo. |
| **FCIS-AX-01** | Every view exposes content to the AX tree | **PARTIAL→PASS (live surfaces)** | Opaque beat surface FIXED (Phase 1); editors expose text + now identity; Score Text-lane beats identified + count anchor (Phase 2, `6510daf3`). Broad SwiftUI chrome labeling ongoing. | Continue incidental labeling as touched. |
| **FCIS-AX-02** | Custom-drawn views implement platform accessibility | **PARTIAL** | The one opaque CALayer beat surface, `StorifyTimelineChartView`, now exposes beats/gaps as `NSAccessibilityElement`s (commit `dab07878`). `CutBoardNSView`/`CutBoardView` are RETIRED (ch.17) → delete, do not implement. `FountainRenderOverlayView` is SwiftUI+PDFKit (PDFView carries AX). The editors are `NSTextView`-backed (inherited text AX). | Delete retired board; add identifiers to editors. |
| **FCIS-AX-03** | Pixel parity (surface shows N → N queryable) | **PARTIAL** | Timeline: PASS — `StorifyTimelineAccessibilityTests` asserts N accessible beats == reported count through the AX tree. Other surfaces pending the sweep. | Extend parity assertions in the sweep. |
| **FCIS-AX-04** | Agent may not claim what AX tree lacks | **PASS** | The Copilot's settled structural claim ("Read N passages into M beats") is read from one accessor (`storifySettledStructureCounts`); `Scripts/verify` asserts `claimBeats == beats produced/accessible` and PASSES (claim=1, timeline AX=1, production=1) — commit `4ca9967b`. A claim exceeding the surface now FAILs verify. | Extend claim-grounding to further agent reports as surfaces gain AX. |
| **FCIS-AX-05** | Verification is AX-driven, not pixel-driven | **PASS** | Unit AX harness (`StorifyTimelineAccessibilityTests`) + running-app self-check: the app walks its own AX tree at settle (`[VERIFY-AX]`), `Scripts/verify` asserts `timelineBeats == beats` and PASSES green (commits `5375b35b`/`6c88f55c`/`2e6194fb`). Caught + localized a real ghost-model harness bug via introspection. | Extend the assertion to further surfaces as they gain AX. |
| **FCIS-AX-06** | Stable targeting identifiers | **PASS (live surfaces)** | Timeline beats/gaps `beat.<i>`/`gap.<line>` (Phase 1); five editors `editor.*` + Score beats `scorebeat.<n>` + `score.structure` (Phase 2, `6510daf3`). | Add to further interactive elements as touched. |
| **FCIS-AX-07** | Done = accessible AND AX-driven-tested | **PARTIAL** | The timeline meets both; adopted as definition-of-done going forward. | Apply to swept surfaces. |
| **FCIS-AX-CH36** | Addressed uncertainty navigator exposes rack/map/inspector parity | **PASS (library + adapter)** | `UncertaintyScoreKit` `v0.8.3` owns `UncertaintyAddress`, navigation, rack/map/inspector AX IDs, inspector content, and drag seam; Reframe binds typed host context by the same address. Local kit tests, Reframe ledger tests, and the governed running-app drive pass. | Extend the broader UI sweep as touched. |
| FCIS-VRT-01 | If VRT implemented, declare mode + baselines | PARTIAL/N-A | Repo has VRT render tests (`*VRTTests`); a formal FCIS-VRT declaration is not consolidated. | Add a short FCIS-VRT declaration (separate track). |
| FCIS-AIC-* | Apple Intelligence preflight compliance | N/A (this audit) | Not in scope of the AX-triggered pass. | Audit separately. |
## Orthogonality Violations
- None in AGENTS/PLANS/Skills layering.
## Risks / Drift Vectors
- **Verification blindness (primary):** while surfaces are AX-blank, every UI claim (by a human report, an agent, or CI) is a pixel guess — the failure that motivated FCIS-AX. Highest-severity drift vector.
- **Agent dishonesty by omission:** the copilot can assert state no one can see or query; FCIS-AX-04 is unenforceable until the surfaces are exposed.
- Reintroducing procedures into AGENTS during the AX work (keep any how-to in a skill).
## Remediation
See `FCIS_COMPLIANCE_PLAN.md`. Phase 1 (the beat surfaces — `StorifyTimelineChartView`) is the pattern-setting slice and the first thing this audit obligates.