simple_okf
AGENTS.md3 starsChanged 5 months agoMITView on GitHub
This repository is a local Simple OKF template and toolset for maintaining agent-readable knowledge bundles in Open Knowledge Format. Documentation and implementation authority is layered: 1. README.md is the human entry point and quick-start guide. 2. SPEC.md is the repository-level contract for the OKF template and tools. 3. okf/ is the default OKF bundle and the canonical local knowledge corpus. 4. okf_mcp/ is the canonical Python package for OKF MCP tools, CLI fallback tools, and OKF-aware RAG helpers. 5. .agents/skills/okf/SKILL.md…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository5 other files it gives its agents.
- frontend/AGENTS.mdAGENTS.md
- frontend/CLAUDE.mdCLAUDE.md
- 7dSkill
- grillmeSkill
- okfSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
35 rules. About 0 are common, 17 are distinctive, and 18 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 19
When these files disagree, update the canonical owner instead of duplicating the same rule in a secondary location.
- Very specific: line 24
Keep the primary OKF bundle under okf/.
- Very specific: line 25
Keep the MCP server, multi-app CLI, OKF helpers, and RAG implementation under okf_mcp/.
- Very specific: line 26
Do not create alternate local tooling packages or a top-level rag/ directory.
- Very specific: line 27
Keep OKF agent instructions, templates, and references under .agents/skills/okf/.
- Very specific: line 29
Keep 7D lifecycle agent instructions under .agents/skills/7d/.
- Very specific: line 30
Keep canonical CLI app implementation in okf_mcp/cli.py and reusable implementation in okf_mcp/ modules.
- Very specific: line 31
Keep installable console scripts pointed directly at okf_mcp/cli.py.
- Very specific: line 32
Keep local RAG configuration examples under okf_mcp/rag/.
- Very specific: line 33
Keep generated artifacts under repository artifacts/, including artifacts/okf/graph.json, artifacts/okf/graph.html, …
- Very specific: line 36
Never commit local secrets.
- Distinctive: line 51
Write OKF concept and support documentation in English.
- Distinctive: line 54
Use relative Markdown links for internal OKF relationships.
- Distinctive: line 55
Do not invent requirement IDs, schema details, citations, source paths, or domain facts.
- Very specific: line 70
Do not add 7D-specific frontmatter keys such as process, stage, stage_order, artifact_key, gate_decision, or raci solely to support 7D.
- Very specific: line 73
Do not create generic 7D concept types such as Lifecycle Artifact, Lifecycle Check, Role, or Decision Gate when the artifact type is known.
- Very specific: line 75
Use the existing type field as the artifact type, for example PRD, Architecture & NFR, or Test Report.
- Very specific: line 80
Every concept type must be mapped in the registry.
- Very specific: line 83
Keep 7D behavior out of .agents/skills/okf/SKILL.md.
- Very specific: line 111
If MCP is unavailable, use the local multi-app CLI (python3 -m okf_mcp ...) and report that CLI fallback was used.
- Distinctive: line 114
Before broad OKF changes:
- Distinctive: line 119
update related links when moving or renaming concepts.
- Very specific: line 133
Default RAG artifacts belong under artifacts/rag/.
- Distinctive: line 139
Do not treat RAG search results as more authoritative than the source concept files.
- Very specific: line 165
Avoid duplicating core OKF logic in CLI code.
- Distinctive: line 170
Before editing, classify the request:
- Distinctive: line 173
Follow OKF workflows, regenerate indexes/graph when needed, and validate.
- Distinctive: line 184
When classification is unclear, ask a focused clarification question.
- Distinctive: line 188
Use concise Markdown with descriptive headings and short paragraphs.
- Distinctive: line 192
use relative links inside the OKF bundle.
- Distinctive: line 193
prefer exact concept links over broad directory links.
- Distinctive: line 194
keep links stable when possible.
- Distinctive: line 195
do not replace missing exact links with vague links just to silence validation.
- Distinctive: line 200
Before completing repository changes, run the relevant subset:
- Distinctive: line 225
When finishing work, report:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines
Purpose and Authority
This repository is a local Simple OKF template and toolset for maintaining agent-readable knowledge bundles in Open Knowledge Format.
Documentation and implementation authority is layered:
README.mdis the human entry point and quick-start guide.SPEC.mdis the repository-level contract for the OKF template and tools.okf/is the default OKF bundle and the canonical local knowledge corpus.okf_mcp/is the canonical Python package for OKF MCP tools, CLI fallback tools, and OKF-aware RAG helpers..agents/skills/okf/SKILL.mddefines OKF-specific agent workflow rules..agents/skills/7d/SKILL.mddefines 7D lifecycle workflow rules over OKF.AGENTS.mddefines repository-local working rules for coding agents.
When these files disagree, update the canonical owner instead of duplicating the same rule in a secondary location.
Repository Boundaries
- Keep the primary OKF bundle under
okf/. - Keep the MCP server, multi-app CLI, OKF helpers, and RAG implementation under
okf_mcp/. - Do not create alternate local tooling packages or a top-level
rag/directory; this project is standardized onokf_mcp/. - Keep OKF agent instructions, templates, and references under
.agents/skills/okf/. - Keep 7D lifecycle agent instructions under
.agents/skills/7d/. - Keep canonical CLI app implementation in
okf_mcp/cli.pyand reusable implementation inokf_mcp/modules. - Keep installable console scripts pointed directly at
okf_mcp/cli.py. - Keep local RAG configuration examples under
okf_mcp/rag/. - Keep generated artifacts under repository
artifacts/, includingartifacts/okf/graph.json,artifacts/okf/graph.html,artifacts/7d-dashboard.html, andartifacts/rag/*. - Never commit local secrets.
.envis local-only and ignored.
OKF Bundle Rules
- Each concept is one Markdown file under
okf/with YAML frontmatter. index.mdandlog.mdare support files, not concepts.- Required concept frontmatter keys are
typeandstatus. - Allowed
statusvalues are exactlydraft,to-review,not-valid,valid,rejected, andaccepted. statusdescribes document/artifact state, not implementation progress. Recommended transitions are non-blocking guidance only:draft->to-review-> (validornot-valid), then optionallyacceptedorrejected.- Recommended keys are
title,description, andtimestamp. - Preserve unknown frontmatter fields when editing existing concepts.
- Write OKF concept and support documentation in English. Before creating or updating OKF documents from non-English input, translate the content into English while preserving meaning.
- Use relative Markdown links for internal OKF relationships.
- Do not invent requirement IDs, schema details, citations, source paths, or domain facts.
Concept IDs are bundle-relative paths without .md, for example:
requirements/functions/FUNC-001
api/operations/create-project7D Process Rules
7D is a process registry over existing OKF concept types. It does not change the OKF concept format.
- Do not add 7D-specific frontmatter keys such as
process,stage,stage_order,artifact_key,gate_decision, orracisolely to support 7D. - Do not create generic 7D concept types such as
Lifecycle Artifact,Lifecycle Check,Role, orDecision Gatewhen the artifact type is known. - Use the existing
typefield as the artifact type, for examplePRD,Architecture & NFR, orTest Report. - Resolve 7D stage and responsibility from the registry table in
SPEC.mdor the MCP 7D tools, not from per-concept 7D metadata. - Derive a feature's 7D progress from linked artifact concepts and their types.
- Every concept
typemust be mapped in the registry; an unmapped type is a validation error. Missing required lifecycle artifacts are 7D coverage gaps, not OKF format errors. - Keep 7D behavior out of
.agents/skills/okf/SKILL.md; use the dedicated.agents/skills/7d/SKILL.mdworkflow for 7D operations while keepingSPEC.mdas the repository-level source for 7D rules.
OKF Workflows
For OKF content work, prefer the simple-okf MCP server when available:
read_support_file
list_directory
list_concepts
search_concepts
read_concept
write_concept_doc
validate_bundle
seven_d_registry
seven_d_mapping_for_type
list_7d_artifact_concepts
seven_d_stage_report
seven_d_stage_report_markdown
seven_d_dashboard
seven_d_feature_status
validate_7d
generate_indexes
build_graphIf MCP is unavailable, use the local multi-app CLI (python3 -m okf_mcp ...) and
report that CLI fallback was used.
Before broad OKF changes:
- inspect
okf/index.mdor uselist_directory; - find existing concepts before creating new ones;
- preserve stable concept IDs unless the user explicitly asks for a rename;
- update related links when moving or renaming concepts;
- regenerate indexes and graph after concept additions, removals, or renames;
- validate the bundle before finishing.
OKF RAG Rules
The OKF-aware RAG layer is implementation/tooling over the OKF bundle. It does not define canonical knowledge by itself.
- The local RAG environment file is
.env. - The committed example is
.env.example. - MCP server startup requires reachable ClickHouse, OpenSearch, and Qdrant
endpoints from RAG settings. Pure OKF validation/index/graph commands and
rag inspectmust not require live infrastructure. - Default RAG artifacts belong under
artifacts/rag/. - RAG tools must treat OKF concepts as the corpus and exclude
index.mdandlog.md. - RAG parser output must preserve
concept_id,type,status,title,description,tags,requirement_id,resource, andsource_pathwhen present. - RAG answers must cite OKF concepts and line ranges when evidence is available.
- Do not treat RAG search results as more authoritative than the source concept files.
Useful CLI commands:
python3 -m okf_mcp rag inspect --pretty
python3 -m okf_mcp rag refresh --pretty
python3 -m okf_mcp rag retrieve "query" --pretty
python3 -m okf_mcp rag retrieve "query" --answer --prettyCode Ownership
| Area | Owner / contract |
| OKF filesystem model, parser, validator, graph generation | okf_mcp/okf.py |
| FastMCP tool surface | okf_mcp/server.py |
| MCP multi-app entrypoint | okf_mcp/__main__.py, okf_mcp/cli.py |
| Console-script entrypoints | pyproject.toml targets okf_mcp/cli.py |
| OKF-aware local RAG | okf_mcp/rag/ |
| Default knowledge bundle | okf/ |
| Agent OKF skill and templates | .agents/skills/okf/ |
| Agent 7D workflow skill | .agents/skills/7d/ |
| Packaging and console scripts | pyproject.toml, okf_mcp/cli.py |
Avoid duplicating core OKF logic in CLI code. CLI commands should call shared
library code from okf_mcp/okf.py or okf_mcp/rag/.
Change Classification
Before editing, classify the request:
- OKF content change: creates, edits, moves, or deletes concepts in
okf/. Follow OKF workflows, regenerate indexes/graph when needed, and validate. - OKF tooling change: changes
okf_mcp/okf.py, MCP tools,okf_mcp/cli.py,okf_mcp/, or package configuration. Run Python compile checks and relevant CLI smoke tests. - RAG tooling change: changes
okf_mcp/rag/or RAG CLI behavior. Test with an env file and ensure.envremains uncommitted. - Agent instruction change: changes
AGENTS.md,.agents/skills/okf/, or.agents/skills/7d/. Keep rules consistent withREADME.mdandSPEC.md. - Generated-output change: updates graph/index/artifact files. Ensure the generating command is clear and repeatable.
When classification is unclear, ask a focused clarification question.
Writing and Linking
Use concise Markdown with descriptive headings and short paragraphs.
Linking rules:
- use relative links inside the OKF bundle;
- prefer exact concept links over broad directory links;
- keep links stable when possible;
- do not replace missing exact links with vague links just to silence validation;
- report broken or missing knowledge as a gap when the correct target is unknown.
Validation
Before completing repository changes, run the relevant subset:
python3 -m py_compile okf_mcp/*.py okf_mcp/rag/*.py okf_mcp/rag/ingestion/*.py okf_mcp/rag/retrieval/*.py
python3 -m okf_mcp validate okf
python3 -m okf_mcp graph okf --out artifacts/okf/graph.json --html-out artifacts/okf/graph.html
git diff --check
git status --short
git diff --statFor RAG changes, also smoke-test with a local env file. If .env is not
available, either use a temporary env file via --env or report that RAG runtime
validation was skipped because the local env file is absent.
For OKF content additions/removals/renames, also run:
python3 -m okf_mcp indexes okf
python3 -m okf_mcp graph okf --out artifacts/okf/graph.json --html-out artifacts/okf/graph.html
python3 -m okf_mcp validate okfReporting
When finishing work, report:
- files changed;
- commands run and results;
- whether OKF validation passed;
- whether indexes/graph/RAG artifacts were regenerated;
- remaining gaps or follow-up questions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

