SuperAPI AI Directory

okf-wiki-query

Writing & research

View repository

Updated 10-15 23:42

About this skill

Query the wiki

Treat wiki/ as an OKF v0.2 bundle. Query is a permissive consumer: answer from whatever pages resolve, tolerate missing optional metadata, unknown types, and broken links, and surface gaps without discarding usable knowledge. Lint remains the producer gate; do not refuse a bundle because optional fields are absent, a type is unknown to local taxonomy, or a link is broken.

Read wiki/governance/policy.md before answering. Honor sensitivity_levels and default_sensitivity; do not surface confidential material outside the scope authorized by the user.

Retrieval

  1. Read wiki/index.md first and identify relevant concepts.
  2. Read the smallest useful connected set of pages, following standard Markdown links and # Relations as needed.
  3. When a link is broken, note it and continue with pages that do resolve. Do not treat a broken link as grounds to stop.
  4. When frontmatter omits optional OKF v0.2 families (generated, sources, status, verified, stale_after), read the body and proceed. Note which families were absent; never invent metadata.
  5. Consult source concepts, then immutable sources/, only when the wiki does not answer the question sufficiently.

Read references/consumer-guidelines.md for permissive retrieval rules. Read references/trust-and-staleness.md before assessing freshness or trust.

Answering

Every answer must separate material claims into the four evidence classes defined in references/evidence-classes.md:

  1. Sourced fact — directly supported by a cited wiki concept or source.
  2. Interpretation — your reading of sourced material; cite what you read.
  3. Contradiction — unresolved conflicting positions; cite each side.
  4. Inference — your conclusion beyond what sources state; label explicitly.

Additional rules:

  • Cite each material factual assertion with a Markdown link to its wiki concept (or source when consulted).
  • Assess staleness and trust from declared metadata and attributable body evidence only. Apply the transparent tiers in references/trust-and-staleness.md. Never invent a missing signal; report trust as undetermined only when the remaining evidence cannot support a tier.
  • Call out status: draft, status: deprecated, past-stale_after dates, and missing or negative verified signals.
  • Consult references/cited-answer-examples.md when an answer needs a concrete format for contradictions, inferences, or coverage gaps.

Durable synthesis (explicit approval only)

Answering and persisting are separate steps. Read references/synthesis-persistence.md for the full gate sequence.

  1. Answer first without writing to wiki/.

  2. Do not offer to save proactively. Start persistence only when the user explicitly requests saving a synthesis.

  3. Read wiki/governance/profiles/synthesis.md. If the profile is absent, route profile creation to okf-wiki-governance; do not invent an ad-hoc shape.

  4. Inspect processing state:

    python3 scripts/save_synthesis.py status --vault <path> --slug <slug>
    
  5. Build a JSON proposal with slug, title, and complete Markdown content under wiki/synthesis/<slug>.md. Follow the synthesis profile: OKF v0.2 generated, structured sources, footnotes whose labels match sources[].id, required profile sections, and an empty # Human Notes section for new pages. Preserve existing # Human Notes verbatim on update.

  6. Show the operator the exact path (wiki/synthesis/<slug>.md), title, and # Summary excerpt. Wait for explicit approval of that draft.

  7. Apply only after that approval, passing --approve-synthesis:

    python3 scripts/save_synthesis.py apply --vault <path> \
      --proposal <proposal.json> --approve-synthesis
    # For a previously saved synthesis:
    python3 scripts/save_synthesis.py apply --vault <path> \
      --proposal <proposal.json> --approve-synthesis --update
    
  8. The helper rejects unapproved writes and unsafe overwrites, preserves Human Notes, updates wiki/index.md, inserts a newest-first dated section in wiki/log.md, and records wiki/synthesis-state.json. It journals multi-file writes and restores an interrupted commit on the next status or apply command. Report its result, then run okf-wiki-lint for the full audit. Do not commit vault changes.

Never write a query result to wiki/ automatically.