Skip to content

Add architecture-evaluation and criterion-strength to SpecReview analysis enum - #98

Merged
kreneskyp merged 1 commit into
mainfrom
fix/ir-40-plat-837-analysis-enum
Sep 21, 2026
Merged

kreneskyp merged 1 commit into
mainfrom
fix/ir-40-plat-837-analysis-enum

Conversation

@kreneskyp

Copy link
Copy Markdown
Contributor

Summary

  • Adds architecture-evaluation and criterion-strength to the SpecReview.analysis enum (AnalysisKind in semantic/main.tsp, regenerated schemas/AnalysisKind.json, and the handwritten schemas/spec-review-frontmatter.schema.json), plus the FR-002 spec prose and TC-027's fixture list (tests/test_manifest.py). Logged as FR-002 CR-064 in spec/log.md.
  • IR-40 (agent-ix/quire-contract-ir#134): SpecReview SR-539 declared analysis: architecture-evaluation, which this enum didn't admit, so quire validate failed structural validation. This is not a one-document gap — a sweep of spec/reviews/*.md frontmatter across every checkout under ~/dev found 18 documents already declaring this value, across quire-protocol and quire-specification (and their worktrees).
  • PLAT-837: the criterion-strength spec-review lens is blocked on exactly this value, per its own acceptance criteria (spec/reviews/criterion-strength.md, analysis: criterion-strength) and its stated blocking text: "a selected analysis absent from the installed SpecReview.analysis schema is an unavailable dependency, not permission to emit an invalid review document."
  • SpecReview.json's data_schema.digest in manifest.yaml is unchanged — it only $refs AnalysisKind.json and doesn't inline the enum, confirmed via make manifest-digests (no-op).

Owning repo and how it was determined

SpecReview's frontmatter and semantic schemas are owned by agent-ix/spec-artifacts-process, not by any consumer. Established by reading ~/.ix/filament/registry.json, which pins the installed spec-artifacts-process Filament module to this repo (git-subdir, path spec_artifacts_process) at a specific sha — the installed copy under ~/.ix/filament/modules/spec-artifacts-process is a pinned snapshot of this source, not itself editable durably. This PR edits only the source: spec_artifacts_process/semantic/main.tsp (TypeSpec — the actual source of truth for AnalysisKind/SpecReview.json, regenerated via make schemas) and the separately handwritten spec_artifacts_process/schemas/spec-review-frontmatter.schema.json (excluded from TypeSpec generation by scripts/generate.mjs).

Before/after evidence for IR-40

quire-contract-ir's own origin/main (fe400d8) no longer reproduces IR-40's quoted error today: its SR-539 was re-typed from analysis: architecture-evaluation to analysis: scope-boundary in agent-ix/quire-contract-ir@a5154d3 (landed 2026-09-16), so quire validate on that document now passes. make spec on that repo is still red, but from an unrelated quire coverage --strict gap (16 unbacked matrix rows) — out of scope for this schema PR.

To demonstrate the actual fix (isolated from that repo's unrelated coverage gap, and from a concurrent, unrelated reinstall of the shared ~/.ix/filament module registry that happened mid-session), I re-created IR-40's exact scenario against controlled module copies:

Beforequire validate --module <origin/main spec-artifacts-process, unfixed> against a copy of SR-539 with analysis: architecture-evaluation restored:

.../reviews/2026-09-14-temporal-ecosystem-model-architecture.md: [SpecReview] frontmatter:
  "architecture-evaluation" is not one of ["base","failure-domain","integrity","dependency",
  "evidence","risk-complexity","scope-boundary","gap-analysis","ears-conformance","code-review",
  "spec-correctness"] (at analysis) [frontmatter]
1/1 docs grammar-clean (100%); 0 grammar finding(s): none
1 document(s) failed structural validation

(exact match to IR-40's quoted error)

After — same document, quire validate --module <this branch's spec-artifacts-process>:

1/1 docs grammar-clean (100%); 0 grammar finding(s): none

No document(s) failed structural validation line.

What consumers must do to pick this up

This PR fixes the source only. ~/.ix/filament/modules/spec-artifacts-process (and any repo's installed copy) stays pinned to its old sha until someone runs a module reinstall (quoin module install / quoin plugin install) against a release that includes this commit. quire-contract-ir's red make spec will not turn green from this PR landing alone — even after reinstall, that repo's gate is red for the unrelated coverage reason above, and its own SR-539 document no longer even declares architecture-evaluation (it was retyped to scope-boundary). The 18 documents in quire-protocol / quire-specification that still declare architecture-evaluation will start validating clean once each of those repos reinstalls this module. PLAT-837's Jev lens work (in progress elsewhere, quoin repo) can emit analysis: criterion-strength once its consuming repo reinstalls at a sha including this change.

Additional enum values found in use

A sweep of analysis: frontmatter across every spec/reviews/*.md in ~/dev (repo clones and worktrees) found no third missing value beyond the two named in this ticket. Everything else in use already exists in the enum (base, dependency, failure-domain, ears-conformance, scope-boundary, integrity, risk-complexity, evidence, code-review, gap-analysis, spec-correctness). Broader ungrounded greps also turned up security and adoption-analysis strings, but neither appears as an actual SpecReview frontmatter analysis: value when restricted to spec/reviews/*.md frontmatter — they're incidental matches elsewhere (comments/other fields), not undeclared enum values in use. No ruling needed; nothing added beyond the two named.

Test plan

  • make lint (ruff, black, schemas-check — TypeSpec projection matches committed schemas/*.json)
  • make test — 296 passed, 1 skipped, 2 xfailed; the same 2 tests fail both before and after this change (test_the_measurement_can_fail, test_tc047_adoption_is_optional), confirmed pre-existing and unrelated (environment/engine-version mismatches unrelated to the analysis enum) via git stash/baseline rerun
  • tests/test_manifest.py::test_spec_review_analysis_admits_both_review_families (TC-027) extended and passing with both new values
  • Before/after quire validate evidence above

🤖 Generated with Claude Code

…ysis enum

FR-002 CR-064. IR-40 (agent-ix/quire-contract-ir#134): SpecReview SR-539
declared `analysis: architecture-evaluation`, which the enum did not admit,
failing `quire validate`. An org-wide sweep of spec/reviews/*.md frontmatter
found 18 documents across quire-protocol and quire-specification already
declaring this value, so it is not a one-document gap.

PLAT-837: the criterion-strength spec-review lens is blocked on this exact
value being installed before it can emit a valid SpecReview document, per
the ticket's own acceptance criteria (spec/reviews/criterion-strength.md,
analysis: criterion-strength).

Both values are added to AnalysisKind (semantic/main.tsp), regenerated into
schemas/AnalysisKind.json via `make schemas`, mirrored into the handwritten
schemas/spec-review-frontmatter.schema.json, and added to FR-002's Behavior
prose and TC-027's fixture list (tests/test_manifest.py). SpecReview.json's
digest is unchanged since it only $refs AnalysisKind.json.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kreneskyp
kreneskyp requested a review from a team as a code owner September 21, 2026 02:20
@kreneskyp
kreneskyp merged commit a4fb5f3 into main Sep 21, 2026
3 checks passed
@kreneskyp
kreneskyp deleted the fix/ir-40-plat-837-analysis-enum branch September 21, 2026 02:21
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