Skip to content

spec: Exceptions concept + EX-CLOUD-LLM (reference design: fellows_local_db)#8

Merged
richbodo merged 3 commits into
mainfrom
spec/exceptions-concept
May 31, 2026
Merged

spec: Exceptions concept + EX-CLOUD-LLM (reference design: fellows_local_db)#8
richbodo merged 3 commits into
mainfrom
spec/exceptions-concept

Conversation

@richbodo
Copy link
Copy Markdown
Owner

What

Introduces the Exceptions concept to the PNA spec, with fellows_local_db as the demonstrating reference design. Reference-driven per CONTRIBUTING.md — the spec change rides along with working code (shipped in fellows_local_db #226/#230).

An Exception (EX-*) is a stable-ID'd condition under which a PNA deliberately departs from a baseline guarantee (a named AC, or the PNA definition). Modeled on software exceptions: raised by a user action, must be caught (never silent), handled by a defined solution. Raising one exits PNA mode; an app stays conformant in non-PNA mode iff every active exception is handled to contract. This reframes conformance from "never deviates" to "catches and handles every deviation honestly."

Artifacts

  • spec/exceptions.md (new) — concept, validation-not-certification stance, scope discipline (Goal-anchored + composition-not-enumeration), the RFC-2119 handler contract EX-H1EX-H8, the Relaxes: / Reversible: / Stresses: header conventions, the per-dimension strength-profile vocabulary, and the first registry entry EX-CLOUD-LLM (with its strength profile + origin note).
  • spec/PNA_Spec.md — one-line pointer from vocab-pna (no AC rows changed; lint stays green).
  • tools/lint-spec-ids.py — extended to trace EX-* IDs, validate every Relaxes: token (AC / EX / PNA-DEFINITION), check Reversible: well-formedness (+ Reversal: when yes), and validate strength-profile columns against the fixed vocabulary. Shape/presence only; behavioral correctness stays the evaluate flow's job. No-ops when exceptions.md is absent.
  • pna-build-eval-contrib/SKILL.md — Evaluate flow gains a "Detect and verify Exceptions" step (caught/handled, reversibility, consent-to-human, strength accuracy, undeclared-deviation backstop); report keyed by AC or EX ID.
  • reference_designs/fellows_local_db/ — backfilled record (the Exceptions originating contribution) + an Architecture.md copy carrying the full AC attestation table and the EX-CLOUD-LLM exception attestation.

Verification

  • python tools/lint-spec-ids.pyOK (25 AC IDs, 12/12 contracts, 1 exception ID).
  • The lint's new checks were negative-tested (flag bad strength classes, unknown Relaxes: tokens, malformed Reversible:).
  • The fellows handler is covered by test_pna_exception_mode.py, test_mcpb_settings.py, and the two MCP instructions tests (see the Architecture copy's attestation rows).

Versioning & process notes

  • Minor bump per CONTRIBUTING.md (additive: new concept, new sub-contracts, new lint check; no AC semantically altered).
  • SWHID stays pending — recorded by the maintainer post-merge via Save Code Now, per CONTRIBUTING.md § Acceptance.

Follow-ups (separate PRs, by design)

  • PR 2 — toolkit DX/process: per-repo skill-install docs, validation-not-certification framing promotion, prior_art.md "behavioral exceptions & consent propagation" survey.
  • PR 3 — version the toolkit as a unit anchored to the spec version (root VERSION, per-artifact headers, lint enforcement).

🤖 Generated with Claude Code

richbodo and others added 3 commits May 31, 2026 21:42
New spec/exceptions.md defines Exceptions (stable EX-* conditions under
which a PNA deliberately departs from a baseline guarantee): the
raise/catch/handle model, PNA mode vs non-PNA mode, the RFC-2119 handler
contract (EX-H1..EX-H8), the Relaxes:/Reversible:/Stresses: header
conventions, the per-dimension strength-profile vocabulary, and the first
registry entry EX-CLOUD-LLM (demonstrated by fellows_local_db).

Reference-driven per CONTRIBUTING; the lint extension, PNA_Spec pointer,
SKILL evaluate-flow step, and design-record backfill follow in this PR.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…bility

Collects EX-* registry IDs from spec/exceptions.md; verifies every
'Relaxes:' token resolves to a known AC, EX, or the PNA-DEFINITION
sentinel; checks 'Reversible:' is well-formed (yes|no, with a 'Reversal:'
field when yes); and validates any strength-profile column carries only
the fixed strength classes (EX-H8). Shape/presence only — behavioral
correctness stays the LLM evaluate flow's job. No-ops cleanly when
exceptions.md is absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…fellows record

- PNA_Spec.md vocab-pna: one-line pointer to exceptions.md (raising an
  Exception exits PNA mode; conformant only while handled to contract).
- SKILL.md Evaluate flow: new 'Detect and verify Exceptions' step
  (caught/handled, reversibility, consent-to-human, strength accuracy,
  undeclared-deviation backstop); report keyed by AC or EX ID.
- reference_designs/fellows_local_db: backfill the Exceptions originating
  contribution + bring in the Architecture.md copy (AC attestation table +
  EX-CLOUD-LLM exception attestation). SWHID stays pending (maintainer,
  post-merge).

Lint green: 25 AC IDs, 12/12 contracts, 1 exception ID.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@richbodo richbodo force-pushed the spec/exceptions-concept branch from c87dfb0 to 0f0081a Compare May 31, 2026 09:43
@richbodo richbodo merged commit 42b6ca5 into main May 31, 2026
2 checks passed
@richbodo richbodo deleted the spec/exceptions-concept branch May 31, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant