CRISPI spec-definition enforcement (trk-13e39042)#86
Merged
Conversation
…e (feat-79f41c6d)
…rom-slice skill (feat-0fd7c8bc)
…verride (feat-0fd7c8bc)
…-skip override (feat-0fd7c8bc)
… regenerate plugin trees (feat-0fd7c8bc)
- HIGH: WriteNodeHTML now preserves <section class="spec"> and <section class="compliance-findings"> across status transitions, so marking a feature done no longer deletes its spec or compliance findings. - MED: LockFeatureForWrite acquires both an in-process mutex and a cross-process advisory file lock (syscall.Flock on a sidecar .lock file) so concurrent htmlgraph CLI processes can't lose feature HTML updates. - MED: planyaml.Save is now atomic (temp file + rename) and serialised by a per-plan in-process mutex; elicitDecisionsForSlice holds the lock across its load → modify → save window via planyaml.SaveLocked. - MED: htmlgraph tdd extractFromSpecSection routes through parseCriteria, unwrapping the <pre> wrapper, so OpenSpec-formatted specs (Requirement / Scenario) are recognised in addition to legacy numbered checkboxes. Adds regression tests: - TestSpecSectionSurvivesStatusWrite — guards the HIGH fix. - TestTDDExtract_OpenSpecRequirements / _LegacyCheckboxes / _HybridSpec / _EmptySpec / _NoSpecSection — guard the tdd parser switchover.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
htmlgraph spec generate --insert(non-destructive, refuse-with-diff by default;--forceto overwrite); extractworkitem.LockFeatureForWriteshared bycompliance autoand the new spec writer.8e90c55d) — ExtendparseCriteriato recognise both legacy[ ]/[x]and OpenSpec### Requirement:formats with first-heading-match scoping; revive the dead[F]/[f]failed status path.DecisionsNotesslice field; cross-harnesshtmlgraph plan elicit-decisionsCLI; Claude convenience skillhtmlgraph:spec-from-slice; opt-inspec_enforcement.{promote_slice,feature_complete}gates with--allow-spec-skipaudited override.<section class="spec">and<section class="compliance-findings">across status writes (HIGH); add cross-process flock toLockFeatureForWrite(MED); makeplanyaml.Saveatomic + per-plan mutex (MED); routehtmlgraph tddthroughparseCriteriaso it recognises OpenSpec specs (MED).Closes the spec-definition gap in CRISPI: 0 of 117 done features previously had a
<section class="spec">block. New plan slices now arrive with structured Requirement/Scenario specs thathtmlgraph compliancecan parse andcompliance auto(OODA track) can grade. Backfill of the existing 117 spec-less features is explicitly out of scope per the plan's non-goals.Test plan
htmlgraph build && go vet ./... && go test ./...— all greenTestSpecGenerate_OpenSpecFormat,TestSpecGenerate_Insert_NewSection/_NonClobber/_Force/_AtomicAndLocked,TestSpecGenerate_DecisionsRendered/_DecisionsAbsent,TestSpecGenerate_FlagsMutex,TestThirdPartyNotices_HasOpenSpec,TestSpecInsertAndComplianceAutoConcurrentTestParseCriteria_OpenSpecFormat/_LegacyChecks/_FailedStatus/_NoFalsePollution/_StatusFromScenario_*/_HybridDocument,TestComplianceCommand_OpenSpecSpecTestSliceSchema_DecisionsNotesField/_NoDecisionsNotes,TestElicitDecisions_FlagsForm/_StdinForm/_AllEmpty/_AtomicWrite,TestPromoteSliceGate_Disabled/_EnabledNoNotes/_EnabledWithNotes/_AllowSkip,TestFeatureCompleteGate_Disabled/_EnabledNoSpec/_EnabledEmptySpec/_EnabledWithRequirement/_EnabledWithLegacyCriterionTestSpecSectionSurvivesStatusWrite(HIGH regression guard),TestTDDExtract_OpenSpecRequirements/_LegacyCheckboxes/_HybridSpec/_EmptySpec/_NoSpecSectionhtmlgraph plugin build-ports6cf934ddand review closedhtmlgraph plan elicit-decisions <plan-id> <slice-num> --scope X --decisions Y --context Zand verifydecisions_notesround-trips through plan YAMLhtmlgraph spec generate <feature-id> --insertagainst an existing feature; verify section appears and--insertwithout--forcerefuses on re-runspec_enforcement.feature_complete=truein a project'sconfig.jsonand confirmhtmlgraph feature complete <id>refuses on a feature with no spec sectionNotes
false.DecisionsNotesis free text; the original typedDecisions []SliceDecisionwas dropped per sonnet HIGH critique (YAGNI).THIRD-PARTY-NOTICES.mdadded at repo root for the OpenSpec MIT template.b39e2945,c05835bc— chore commits in.htmlgraph/); these will merge cleanly.🤖 Generated with Claude Code