agentleFS
cofincofin/flow/skills/okf/SKILL.md

okf

Skill17 starsChanged 2 months agoApache-2.0View on GitHub

Use when creating, editing, validating, or structuring Open Knowledge Format (OKF v0.2) bundle files (.agents/bundles/), YAML frontmatter, or hierarchical knowledge trees.

11 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every optional namespace above is lazy: create its directory only when the first evidence-backed chapter is materialized.

    line 88
  2. Distinctive:

    Every concept document carries a YAML frontmatter block:

    line 96
  3. Very specific:

    Evaluate Taxonomy and Structure: Place files in scope-derived nested directories under knowledge/.

    line 118
  4. Very specific:

    Document lifecycle lives in status:.

    line 124
  5. Very specific:

    Progressive Disclosure: Update local index.md routing tables with concise context pointers (path, type, description, tags) and log updates …

    line 125
  6. Very specific:

    Every non-reserved .md file must have valid YAML frontmatter with a non-empty type:.

    line 129
  7. Very specific:

    Do not create unmanaged flat files at the root of bundles/ or knowledge/.

    line 134
  8. Distinctive:

    Never append chronological sediment to existing chapters.

    line 135
  9. Distinctive:

    Do not create architecture, data, domain, decision, rejection, or archive content from templates alone.

    line 136
  10. Very specific:

    Verify that root index.md carries okf_version: "0.2", markdown files carry valid frontmatter, and all tags are arrays of strings.

    line 145
  11. Very specific:

    After observing src/scheduler.py and its tests, author a project-shaped knowledge/components/scheduler.md concept that records those …

    line 149

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Open Knowledge Format (OKF)

Author, validate, tag, and structure Open Knowledge Format (OKF v0.2) knowledge bundles and hierarchical concept documents.

Materialization Contract

<!-- okf-materialization-contract: start -->
default_scaffold:
  - bundles/index.md
  - bundles/log.md
  - bundles/product/product.md
  - bundles/product/tech-stack.md
  - bundles/knowledge/index.md
  - bundles/knowledge/workflow.md
repository_evidence:
  applies_to: [architecture, data-model, domain, pattern, standard]
  required: [repository_relative_paths, symbols_or_observed_behavior]
decision_evidence:
  applies_to: [decision, rejected-alternative]
  required: [explicit_user_decision, recorded_at, actor]
path_policy:
  shape: repository_derived_hierarchy
  nested_paths: preserve
  unknown_types: tolerate
  rerun: idempotent_without_duplicate_or_overwrite
  links: resolve_before_commit
tags:
  optional_by_okf: true
  required_by_profile: non_empty_lowercase_hyphenated_strings
  empty_list_satisfies_required: false
archive:
  resident_spec_directories: forbidden
  effect: knowledge_synthesis_log_append_and_completed_spec_removal
<!-- okf-materialization-contract: end -->

Setup creates only the default scaffold. Do not pre-create optional namespace directories. Materialize architecture, data-model, domain, pattern, or standard chapters only after inspecting named repository-relative paths and recording the symbols or observed behavior that support each fact. Materialize a decision only from a recorded explicit user decision with its actor and timestamp; record rejected alternatives inside that decision rather than in a separate rejections tree. A placeholder, inferred layering convention, sample schema, invented glossary term, or sample ADR is not evidence.

Materialize reusable conventions at knowledge/patterns/<topic>.md only from the same repository evidence. Continue to tolerate an existing legacy knowledge/patterns.md, but do not create or advertise that catch-all path.

Derive chapter paths from the project rather than a fixed taxonomy, preserve nested paths on reruns, and never replace customized content. Proactively split multi-topic chapters, merge redundant fragments, and reorganize into nested subfolders (domains/<domain>/, architecture/<area>/, patterns/<subsystem>/, testing/<topic>.md, gotchas/<area>.md) whenever a chapter exceeds a single crisp sentence in its frontmatter description. Validate links before committing an index update. Unknown concept type: values remain valid OKF and must be tolerated by consumers.

Hierarchical Layout Standard

OKF bundles under .agents/bundles/ organize knowledge into scope-derived subdirectories:

.agents/bundles/
  index.md                      # Bundle root index with okf_version: "0.2"
  log.md                        # Date-grouped change history (ISO dates)
  product/                      # Identity documents: product.md, tech-stack.md
  knowledge/                    # Evidence-backed, project-shaped knowledge:
    workflow.md                 # Canonical commands and development workflow
    patterns/<topic>.md         # Reusable convention
    architecture/<area>.md      # System boundary or data flow
    domains/<domain>.md         # Domain model and vocabulary
    data-model/<area>.md        # Schema and migration facts
    decisions/<decision>.md     # Decision and rejected alternatives
    standards/<topic>.md        # Repository standard
    testing/<topic>.md          # Verification harness and fixture contract
    gotchas/<area>.md           # Hard-won edge cases and constraints
  research/                     # Pre-PRD technical research notes
  specs/<flow_id>/              # Active Flow specifications and task worksheets

Every optional namespace above is lazy: create its directory only when the first evidence-backed chapter is materialized.

Archive contracts knowledge and removes completed spec directories. It does not create a resident archive/<year>/<flow_id>/ tree.

Frontmatter Schema Standard

Every concept document carries a YAML frontmatter block:

---
type: <non-empty producer-defined concept type>
id: "scope:identifier"          # Optional unique identifier
title: Display Name
description: Single sentence summary
scope: architecture | data-model | domain | lifecycle
domain: core | auth | billing
parent: "parent-doc-id"         # Optional parent hierarchy pointer
supersedes: "old-doc-id"        # Optional replacement pointer for revised knowledge
tags: [tag1, tag2]              # Optional in OKF; non-empty when a profile requires relevance
status: draft | stable | deprecated # OKF document maturity
state: planned | active | completed # Spec workflow state only
# Task state: open | in_progress | closed | blocked | skipped
---

Workflow

  1. Resolve Bundle Layout: Confirm root index.md carries okf_version: "0.2".
  2. Evaluate Taxonomy and Structure: Place files in scope-derived nested directories under knowledge/. Split overgrown chapters (> 200 lines or multi-sentence description) into focused nested files.
  3. Declare Frontmatter: Set non-empty type: and supported metadata. When the active profile requires relevance tags, provide at least one lowercase, hyphenated tag; tags: [] does not satisfy that requirement.
  4. Enforce State vs Status:
    • Task workflow state lives strictly in state:.
    • Document lifecycle lives in status:. Never mix workflow state into status:.
  5. Progressive Disclosure: Update local index.md routing tables with concise context pointers (path, type, description, tags) and log updates in log.md.

Guardrails

  • Every non-reserved .md file must have valid YAML frontmatter with a non-empty type:.
  • Reserved files (index.md, log.md) require no frontmatter.
  • Tags, when present, must be a YAML array of lowercase, hyphenated strings (tags: [auth, jwt]). A policy requiring relevant tags requires a non-empty array.
  • Do not create unmanaged flat files at the root of bundles/ or knowledge/.
  • Never append chronological sediment to existing chapters; rewrite affected sections in place in present tense.
  • Do not create architecture, data, domain, decision, rejection, or archive content from templates alone.

Output

Return created or validated concept documents, frontmatter schemas, applied tags, and validation status.

Validation

Verify that root index.md carries okf_version: "0.2", markdown files carry valid frontmatter, and all tags are arrays of strings.

Example

After observing src/scheduler.py and its tests, author a project-shaped knowledge/components/scheduler.md concept that records those evidence paths, then add a resolving link to knowledge/index.md.

References

  • OKF Specification Reference
  • Frontmatter and Tagging Guide
  • Flow State Contract

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.