facts

作者 av已验证

Antidote for fluffy specs, a toolkit for fact-driven development with AI agents

182
Stars
7
Forks
Rust
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/av/facts

快速入门

使用 facts 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

facts

https://github.com/user-attachments/assets/80981efb-8bab-47ee-a567-3eb6071321ad

Read your entire project spec in 30 seconds. Verify it in one command.

MIT License Release

Your project has 48 facts, 31 of them implemented: code-backed, verified by command. 12 are specs your agent is working through. 5 are rough drafts you'll refine later. You know all of this because you ran facts check.

# auth
- users authenticate via OAuth2 @implemented
- sessions expire after 24 hours @implemented
- failed logins rate-limited to 5 per minute @spec
- label: bcrypt password hashing with cost factor 12
  command: grep -q 'bcrypt.*12' src/auth.ts

# data
- all timestamps stored in UTC @implemented
- soft deletes only, no rows dropped @spec
- PII encrypted at rest @draft

# api
- REST with versioned endpoints @implemented
- rate limiting on all public routes @spec
- structured error responses with error codes @spec

That's a .facts file, where each line is one atomic claim about your project. Tags track where each fact is in its lifecycle: @draft (rough idea), @spec (precise, ready to build), @implemented (true, code-backed). Your agent manages the transitions. The format is a flat list of claims: short enough to read in full, structured enough to manage, and when a fact has a shell command, the machine verifies it so the agent doesn't have to.

Install

Give your agent the facts skill:

npx skills add av/facts

Then ask it to Init facts. It detects your stack, creates a .facts file with initial project truths, and sets up the full workflow.

Manual install
curl -fsSL https://av.codes/facts.sh | sh
npm install -g @avcodes/facts        # or npm
pipx install facts-cli               # or pipx

It's a single Rust binary with two dependencies, running on Linux, macOS, and Windows.

Then scaffold your project:

cd your-project
facts init              # scaffold .facts + install skills
facts init api          # create api.facts instead
facts check

Agent skills

Four skills ship with every install. Your agent uses them to manage the full lifecycle without you directing every step.

SkillWhat it does
factsCore operations: read the spec, check it, add and edit facts
facts-discoverScan the codebase, classify every fact by lifecycle stage, add missing truths
facts-refinePick up @draft facts, sharpen them into precise @spec facts with you
facts-implementPick up @spec facts, build them in code, verify, tag @implemented

The workflow is a loop: you write rough ideas as @draft. The agent refines them into specs. Then it implements them, runs facts check, and tags what it built. You see the progress in the fact sheet, right there in the spec itself.

@draft → @spec → @implemented

Every fact moves through this pipeline. At any point you can run facts check and know exactly where your project stands: what's done, what's in progress, and what's still just an idea.


How it works

1. Describe

Describe what should be true by writing claims as plain strings, one fact per line. Use # headings to organize by domain, tag each fact with its lifecycle stage, and for facts the machine can verify, add a command that exits 0 when the claim holds.

2. Verify

Verify your facts with facts check, which lints all files and runs every command-fact. Manual facts stay as ? unless you opt in with --agent. Use --agent claude (or any preset: codex, pi, droid, opencode, mi), bare --agent to use facts config set agent …, or a custom template with %p. It exits 0 when everything passes, non-zero when anything fails. Plug it into CI or let your agent run it after every change.

3. Implement

Implement against the spec: your agent reads the fact sheet to understand the project, picks up @spec facts, builds them, and runs facts check to verify its own work. When a fact passes, it tags @implemented, and the spec updates itself as the project evolves.


The format

A .facts file is valid Markdown and valid YAML per section.

# section
- a plain string fact @tag
- label: a fact with a check command
  command: test -f src/main.rs
  tags: [core, mvp]
KeyRequiredPurpose
labelyesThe claim
commandnoShell command, exit 0 = true
tagsnoFreeform tokens for filtering
idnoOverride the auto-generated ID

Tags filter with boolean expressions: --tags "core and not blocked". Three well-known tags (@draft, @spec, @implemented) drive the lifecycle, but any tag works.

Files: .facts is the default. Additional sheets use semantic names (cli.facts, api.facts). All *.facts files in the project root are discovered automatically. The --file flag accepts subdirectory paths (e.g. --file src/api) — subdirectory files are only visible when explicitly targeted.

Sections use Markdown headings. Nesting creates hierarchy addressable by path (api/auth). Created when you add to them, removed when empty.

IDs are short hashes of the label, stable as long as the label doesn't change.


Commands

Common short aliases (all extra args are passed through to the real command):

  • ll = list --light  ls = list
  • rm = remove
  • at <id> <tag> = edit <id> --add-tag <tag>  rt <id> <tag> = edit <id> --remove-tag <tag>
facts                                    # list all facts (default)
facts ll                                 # list in markdown-like skim format
facts ll --tags "draft"                  # combine alias + filter
facts check                              # command-facts only; manual facts stay ?
facts check --agent                      # also verify manual facts (uses .config agent)
facts check --agent claude               # verify manual facts with Claude
facts check --id abc --agent claude      # verify one fact with the agent
facts check --tags "mvp and not blocked" # filter by tag expression
facts check --section api/auth           # filter by section path
facts check --search "auth and rate"     # full-text search filter
facts check --file api.facts             # filter to one file
facts check --has-command                 # check only facts with commands
facts check --manual --agent claude      # check only manual facts with agent
facts check --depth 2                    # limit section nesting depth
facts check --timeout 30                 # per-command and per-batch timeout
facts check --strict                     # fail on unverified manual facts (CI)
facts check -q                           # quiet: exit code only (for CI)
facts check -v                           # verbose: show agent prompts/output
facts config set agent claude            # persistent agent for checks
facts config set batch-size 5            # facts per agent batch
facts config show                        # view all config
facts config get agent                   # read a config value
facts config rm agent                    # remove a config key
facts add "claim" --section api          # add a fact
facts at <id> spec                       # quick tag add (or use the full edit form)
facts rt <id> draft                      # quick tag remove
facts edit <id> --remove-command         # convert to manual fact (remove command)
facts remove <id>                        # remove a fact
facts get <id>                           # look up a single fact
facts move <id> --section new/path       # relocate a fact
facts list --section api/auth            # filter by section
facts lint                               # validate structure
facts fmt                                # normalize all files
facts init                               # scaffold .facts + install skills
facts init api                           # create api.facts instead
facts add "claim" --file src/api         # add to a subdirectory file
facts uninit                             # remove facts from project

Wiki

Extended documentation and the full article index live in the facts GitHub wiki:

The Home page and sidebar index every guide.


Dogfooding

This repo uses a .facts file to describe itself: 224 facts, 154 verified by command, none failing.

$ facts check
...
154 passed, 0 failed, 70 manual

Clone the repo, install facts, and run facts check to see it work on itself.


License

MIT

常见问题

What is facts?

facts is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by av. Antidote for fluffy specs, a toolkit for fact-driven development with AI agents. It has 182 GitHub stars.

Is facts safe to use?

Yes. facts passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install facts?

Clone the repository with "git clone https://github.com/av/facts" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is facts written in?

facts is primarily written in Rust. It is open-source under av on GitHub, so you can review or fork the full source.

Are there alternatives to facts?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh facts against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情