fix(extract): archive-path source markers + knowledge new-file parity#10
Open
BeArchiTek wants to merge 1 commit into
Open
fix(extract): archive-path source markers + knowledge new-file parity#10BeArchiTek wants to merge 1 commit into
BeArchiTek wants to merge 1 commit into
Conversation
…+ add knowledge new-file branch Phase 4 archives the spec to specs/archive/<spec-name>, but the knowledge and guideline source markers still referenced specs/<spec-name>, leaving broken references after extraction. Align them with the ADR rule. Also add a "create a new one if needed" branch to the Knowledge updates section for parity with Guidelines updates, so newly-approved knowledge files (allowed in Phase 1) have a creation path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 task
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.
Two genuine bugs in the
/extractcommand, surfaced during a downstream vendoring review in opsmill/infrahub-ansible#356. Both are cosmetic-to-minor and the change is minimal.Fix A — archive-path source markers (
commands/extract.md)Phase 4 archives each processed spec to
specs/archive/<spec-name>. The ADR section already writes itsSource:marker against the archive path, and the Behavior Rules section codifies this ("ADRSourcepaths must reference the archive location ... since the spec will be moved there").But the Knowledge updates and Guidelines updates sections wrote their source markers against the pre-archive path:
After extraction that path no longer exists, so every knowledge/guideline marker becomes a broken reference. This aligns both markers with the ADR rule:
Fix B — Knowledge new-file creation parity (
commands/extract.md)The Guidelines updates section reads the target file "or create a new one if needed" and provides a new-file skeleton. The Knowledge updates section only said "Read the full target file" with no create-new-file branch — even though Phase 1 explicitly allows proposing brand-new knowledge files. A newly-approved knowledge file therefore had no creation instruction.
Added a parallel "or create a new one if needed" branch plus a skeleton consistent with the Guidelines pattern (using
# <Topic>rather than# <Topic> Guidelines).Fix C (minor, included) — prep Phase 5a threshold (
commands/prep.md)Phase 5a's "run the check" rule triggers on PRD-like input ">~400 chars", while the "skip" rule covers "one-line / vague / empty" — leaving a gray zone for substantive but sub-400-char unstructured descriptions. Added a one-line judgment qualifier to the skip rule so genuinely substantive short input is treated as a PRD under rule 2 rather than skipped. No restructuring.
Both extract fixes are low-risk: the markers are HTML comments, and the new-file branch is a parity/robustness gap rather than a behavioral break. Found via downstream review of the vendored speckit commands in opsmill/infrahub-ansible#356.