Skip to content

refactor(okf): split skill spec, rename TEMPLATE to SAMPLE, tighten wiki reliability - #879

Merged
yxtay merged 5 commits into
mainfrom
refactor/okf-skill-split-sample
Jul 10, 2026
Merged

refactor(okf): split skill spec, rename TEMPLATE to SAMPLE, tighten wiki reliability#879
yxtay merged 5 commits into
mainfrom
refactor/okf-skill-split-sample

Conversation

@yxtay

@yxtay yxtay commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Splits the okf skill's SKILL.md into a concise overview + steps, with detailed field-level spec pushed to SPEC.md (progressive disclosure)
  • Renames TEMPLATE/ to SAMPLE/ (it's a worked example to copy from, not a fill-in-the-blanks template) and converts its internal cross-links to relative paths, per the skill's own deviation from the OKF spec's bundle-absolute link preference
  • Reworks AGENTS.md's Knowledge Wiki section: adds an explicit write trigger with a concrete example (mirroring the auto-memory system's approach) and a search-before-write rule, since "maintain as you go" alone left write timing to model discretion
  • Grants opencode ~/wiki/ edit + external_directory permission (previously unset, which would prompt on every wiki write since the path sits outside the project directory)

Test plan

  • Verify chezmoi apply renders both SKILL.md/SPEC.md and the updated AGENTS.md/opencode.json templates without errors
  • Confirm okf skill still resolves SAMPLE/, SPEC.md cross-links correctly when invoked
  • Confirm opencode no longer prompts for ~/wiki/ edits

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a formal OKF reference specification covering metadata, concept files, indexes, logs, citations, and versioning.
    • Added sample table and playbook documentation with navigable indexes and update history.
    • Enabled editing and external access for wiki content under ~/wiki/.
  • Documentation

    • Updated knowledge-management guidance to use the wiki workflow.
    • Clarified OKF maintenance and conformance requirements.
    • Corrected sample documentation links and formatting.

yxtay added 3 commits July 10, 2026 21:47
…to SAMPLE

Keeps SKILL.md focused on overview/usage; detailed frontmatter fields,
index.md/log.md structure, citations, and versioning now live in SPEC.md,
loaded only when needed. TEMPLATE/ renamed to SAMPLE/ since it's a worked
example to copy from, not a fill-in-the-blanks template; its internal
cross-links now use relative paths, matching the skill's own guidance to
deviate from the spec's bundle-absolute link preference.
…to ~/wiki

Renames the section for clarity and switches the durable-knowledge bundle
path from ~/.okf/ to ~/wiki/, since the directory holds a wiki of knowledge,
not just OKF tooling. Skill reference uses the \okf invocation form.
AGENTS.md's Knowledge Wiki section only said "maintain as you go," which
left write timing to model discretion. Adds a concrete write trigger with
example (mirroring the auto-memory system's approach) and a search-first
rule to avoid near-duplicate concepts.

opencode had no permission entry for ~/wiki/, so every write would have
prompted via its external_directory "ask" default since the path sits
outside the project directory. Claude Code's equivalent Edit permission
already exists locally; kept out of this template since that file's allow
list isn't otherwise tracked in the repo.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a3d9900-188a-4c0d-83c5-0b22f1a2af00

📥 Commits

Reviewing files that changed from the base of the PR and between 93ff884 and 5b97e7b.

📒 Files selected for processing (12)
  • chezmoi/.chezmoitemplates/AGENTS.md
  • chezmoi/.chezmoitemplates/opencode.json
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/index.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/log.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/playbooks/data-freshness-alert.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/playbooks/index.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/tables/customers.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/tables/index.md
  • chezmoi/private_dot_agents/skills/okf/SAMPLE/tables/orders.md
  • chezmoi/private_dot_agents/skills/okf/SKILL.md
  • chezmoi/private_dot_agents/skills/okf/SPEC.md
  • chezmoi/private_dot_agents/skills/okf/TEMPLATE/log.md

📝 Walkthrough

Walkthrough

The PR defines an OKF specification, updates its sample bundle, and changes agent guidance and permissions to support durable knowledge stored in ~/wiki/.

Changes

OKF knowledge wiki

Layer / File(s) Summary
OKF specification and skill guidance
chezmoi/private_dot_agents/skills/okf/SKILL.md, chezmoi/private_dot_agents/skills/okf/SPEC.md
Adds the OKF specification and condenses skill guidance around conformance and bundle maintenance.
Worked OKF bundle
chezmoi/private_dot_agents/skills/okf/SAMPLE/*
Adds bundle indexes and log content, updates relative links, and formats the sample schema documentation.
Wiki workflow and permissions
chezmoi/.chezmoitemplates/AGENTS.md, chezmoi/.chezmoitemplates/opencode.json
Replaces the global knowledge workflow with ~/wiki/ guidance and permits editing and external-directory access for that path.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • yxtay/dotfiles#876: Updates the same agent guidance area with OKF durable-memory and memsearch workflow instructions.

Suggested labels: feature

Poem

A rabbit hops through wiki halls,
Where tidy knowledge softly calls.
OKF pages bloom in rows,
With linked-up paths and logs that grow.
“Write it down!” the bunny sings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/okf-skill-split-sample

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the Open Knowledge Format (OKF) durable knowledge directory from ~/.okf/ to ~/wiki/, updates permissions in opencode.json, and updates the sample files to use relative links instead of bundle-absolute links. It also refactors SKILL.md by extracting detailed specifications into a new SPEC.md file. The review feedback highlights a typo in AGENTS.md where the okf skill is incorrectly referenced with a backslash as \okf.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread chezmoi/.chezmoitemplates/AGENTS.md Outdated
@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH shfmt 3 0 0 0 0.02s
✅ JSON prettier 5 0 0 0 0.32s
✅ MARKDOWN markdownlint 13 0 0 0 0.5s
✅ MARKDOWN markdown-table-formatter 15 2 0 0 0.15s
✅ YAML prettier 10 0 0 0 0.44s

MegaLinter failed because of FAIL_IF_UPDATED_SOURCES=true

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_SHFMT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,YAML_PRETTIER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@github-actions

Copy link
Copy Markdown
Contributor

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH bash-exec 3 0 0 0.02s
✅ BASH shellcheck 3 0 0 0.12s
✅ REPOSITORY checkov yes no no 26.35s
✅ REPOSITORY devskim yes no no 2.29s
✅ REPOSITORY dustilock yes no no 0.03s
✅ REPOSITORY gitleaks yes no no 1.87s
✅ REPOSITORY grype yes no no 54.0s
✅ REPOSITORY kingfisher yes no no 9.57s
⚠️ REPOSITORY osv-scanner yes 1 no 0.16s
✅ REPOSITORY secretlint yes no no 2.26s
✅ REPOSITORY syft yes no no 2.32s
✅ REPOSITORY trivy yes no no 11.75s
✅ REPOSITORY trivy-sbom yes no no 0.11s
✅ REPOSITORY trufflehog yes no no 5.1s

Detailed Issues

⚠️ REPOSITORY / osv-scanner - 1 error
Scanning dir .
Starting filesystem walk for root: /
End status: 47 dirs visited, 160 inodes visited, 0 Extract calls, 3.671908ms elapsed, 3.672129ms wall time
No package sources found, --help for usage information.

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.5.0 --custom-flavor-setup --custom-flavor-linters BASH_EXEC,BASH_SHELLCHECK,REPOSITORY_CHECKOV,REPOSITORY_DEVSKIM,REPOSITORY_DUSTILOCK,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,REPOSITORY_KINGFISHER

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@yxtay
yxtay merged commit f487126 into main Jul 10, 2026
17 of 18 checks passed
@yxtay
yxtay deleted the refactor/okf-skill-split-sample branch July 10, 2026 14:15
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
putComment timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant