Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 2.15 KB

File metadata and controls

40 lines (30 loc) · 2.15 KB

AGENTS

Compatibility entrypoint for runtimes that auto-detect AGENTS.md.

CRITICAL: You MUST read and follow KNOWNS.md in the repository root before doing any work. It is the canonical source of truth for all agent behavior in this project.

Canonical Guidance

  • Knowns is the repository memory layer for humans and the AI-friendly working layer for agents.
  • The source of truth for repo-level agent guidance is KNOWNS.md.
  • Read KNOWNS.md first whenever the runtime supports reading repository files.
  • Load behavior, memory policy, and workflow rules from KNOWNS.md; treat this file only as a compatibility entrypoint.
  • If this file and KNOWNS.md differ, follow KNOWNS.md.

Minimum Rules

  • Use Knowns as the canonical system for tasks, docs, templates, and workflow state.
  • Never manually edit Knowns-managed task or doc markdown.
  • Search first, then read only relevant docs and code.
  • Use search for discovery; use MCP retrieve tool when a workflow needs structured context with citations. Fall back to CLI knowns retrieve if MCP is unavailable.
  • For code context retrieval, prefer MCP tools over CLI: use code({ action: "search" }) first, then code({ action: "symbols" }), then code({ action: "deps" }). Treat CLI knowns code ... as fallback for manual inspection or debugging.
  • Plan before implementation unless the user explicitly overrides that workflow.
  • Validate before considering work complete.
  • Use memory tools: memory({ action: "list" }) at session start, memory({ action: "add" }) after tasks for reusable knowledge.
  • Proactively capture durable memory based on KNOWNS.md memory rules; do not wait for an explicit user instruction to save memory when scope and durability are clear.

Quick Reference

knowns doc list --plain               # List docs
knowns task list --plain              # List tasks
knowns task <id> --plain              # View task
knowns doc "<path>" --plain --smart  # View doc
knowns search "query" --plain        # Search docs/tasks
knowns retrieve "query" --json      # Retrieve structured context pack (CLI fallback)