Skip to content

GH-40: write org knowledge as markdown sections - #41

Merged
blainemotsinger merged 1 commit into
mainfrom
GH-40
Oct 27, 2026
Merged

blainemotsinger merged 1 commit into
mainfrom
GH-40

Conversation

@blainemotsinger

Copy link
Copy Markdown
Member

Summary

Issue #40 had two parts. Part 1 (only architecture.md/review.md indexed) was already fixed by GH-36 / PR #39, so this PR hardens OrgKnowledgeFiles to index only regular files and pins it with a test. Part 2 is implemented here: write_knowledge and update_knowledge now accept org roots and store knowledge as markdown sections.

Changes

  • knowledge/org.go: AppendOrgSection, ReplaceOrgSection, OrgSectionBody, and atomic SaveText, with sentinel errors for existing, missing, and duplicate sections.
  • tools/org.go: org write/update handlers, bare-filename validation, org-<file>::<heading> id parsing, and Source: line folding/preservation.
  • write_knowledge on an org root gains an optional file argument: summary becomes the ## heading, detail the body, and source a trailing Source: line. A missing file lists the available files, a bare new *.md name creates it, a heading collision points at update_knowledge, and rule is rejected.
  • update_knowledge on an org root takes org-<file>::<heading>; only detail applies, the heading is immutable, the old Source: line is preserved, and the file must already exist.
  • category is now schema-optional and required only for project stores.
  • OrgKnowledgeFiles skips directories, broken symlinks, and other non-regular files while following symlinks to regular files.
  • README, registry descriptions, install skill, examples, and the repo's own store entries (sub-003, dec-006) updated.

Verification

  • gofmt -l clean
  • go vet ./... clean
  • go build ./... clean
  • go test ./... 9/9 packages
  • go test ./... -race -count=1 9/9 packages
  • make eval-mock all PASS
  • go run . debug --project . -> findings: ok none, doc count 12, zero warnings

Closes #40

@blainemotsinger
blainemotsinger merged commit 2acc10d into main Oct 27, 2026
2 checks passed
@blainemotsinger
blainemotsinger deleted the GH-40 branch October 27, 2026 00:46
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.

Org knowledge: only architecture.md and review.md are indexed; writes to org roots are refused

1 participant