Repository navigation
GH-40: write org knowledge as markdown sections - #41
Merged
Merged
Conversation
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
Issue #40 had two parts. Part 1 (only
architecture.md/review.mdindexed) was already fixed by GH-36 / PR #39, so this PR hardensOrgKnowledgeFilesto index only regular files and pins it with a test. Part 2 is implemented here:write_knowledgeandupdate_knowledgenow accept org roots and store knowledge as markdown sections.Changes
knowledge/org.go:AppendOrgSection,ReplaceOrgSection,OrgSectionBody, and atomicSaveText, with sentinel errors for existing, missing, and duplicate sections.tools/org.go: org write/update handlers, bare-filename validation,org-<file>::<heading>id parsing, andSource:line folding/preservation.write_knowledgeon an org root gains an optionalfileargument:summarybecomes the##heading,detailthe body, andsourcea trailingSource:line. A missing file lists the available files, a bare new*.mdname creates it, a heading collision points atupdate_knowledge, andruleis rejected.update_knowledgeon an org root takesorg-<file>::<heading>; onlydetailapplies, the heading is immutable, the oldSource:line is preserved, and the file must already exist.categoryis now schema-optional and required only for project stores.OrgKnowledgeFilesskips directories, broken symlinks, and other non-regular files while following symlinks to regular files.sub-003,dec-006) updated.Verification
gofmt -lcleango vet ./...cleango build ./...cleango test ./...9/9 packagesgo test ./... -race -count=19/9 packagesmake eval-mockall PASSgo run . debug --project .->findings: ok none, doc count 12, zero warningsCloses #40