Borrowing it
Nothing to install: this file belongs to hraness/kb. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/hraness/kb/main/AGENTS.mdgit clone --depth 1 https://github.com/hraness/kbWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/hraness/kb/agents-md)<a href="https://agentmods.dev/instructions/hraness/kb/agents-md"><img src="https://agentmods.dev/badge/instructions/hraness/kb/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/hraness/kb/agents-md"><img src="https://agentmods.dev/badge/instructions/hraness/kb/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03974 | $0.03974 |
| Opus 5.5 | $0.01590 | $0.01590 |
| Sonnet 5.5 | $0.00795 | $0.00795 |
| Haiku 4.5 | $0.00397 | $0.00397 |
Grade A, and why
kb AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Contents
src/– deterministic Markdown graph and attachment analysis, typed metadata and exact repository-scope queries, local hybrid retrieval, bounded Git provenance, code-mode sessions and DAG workflows, frozen-corpus evaluation authoring and execution, safe single-note authoring, percolation, repository-memory routing and audits, the advisory source inbox, structural navigation, initialization, CLI, capture, URL intelligence, and diagnostic code with colocated tests.src/workflows/– reusable code-mode decision-context, change-explanation, and plan-radar workflows with bounded parallel execution.dist/– committed Bun-targeted ESM entrypoints plus the compiled Defuddle worker.skills/kb/– the single public Agent Skill for querying, capturing into, planning in, percolating, refreshing, and validating a hraness/kb vault, with focused workflow references loaded on demand..agents/skills/– internal plan authoring, phased execution, implementation, and independent review workflows.kb/– this source repository's authored rationale, maintained synthesis, and implementation plans; it is separate from the package's graph implementation and fixtures.WRITING.mdandSTYLE.md– internal and public prose contracts.docs/– design, capture, and agent-workflow documentation..github/workflows/– read-only branch validation, canonical attested immutable GitHub Releases and optional stage-only npm mirrors.portfolio-inventory.json,scripts/check-portfolio-inventory.ts, andscripts/check-installed-command-docs.ts– canonical public package inventory and standalone public-command consistency gates.README.md,CONTRIBUTING.md,SECURITY.md, andLICENSE– public usage, project policy, threat model, and terms.package.json,tsconfig.json, andbun.lock– standalone package and frozen verification configuration.
Guidelines
- Use Bun 1.3.14 for repository commands and keep the authored Markdown compatible with Obsidian and ordinary text tooling.
- Follow
WRITING.mdfor internal prose andSTYLE.mdfor public prose. - Follow the shared Hraness README guidelines for the README trust path and its website projection. Adapt the structure to KB's local-data and Agent Skill boundaries instead of copying a fixed template.
- Apply unreasonably robust programming when agent work is cheap. Model invalid states out of existence, parse every foreign value from
unknown, and pair readable deterministic regressions with property tests for parsing, resolution, ordering, path confinement, and round trips. - Treat a stable package or release version as exactly three canonical decimal components in the inclusive range
0..Number.MAX_SAFE_INTEGER. Reject larger components at selection, package preparation, artifact verification, attestation verification, and release ordering boundaries. - Deliver changes to
mainthrough a current-head pull request. Keep the stableRequiredCI job green, resolve every review thread, and serialize merges. Human approval stays optional while one regular maintainer would otherwise self-review. Never force-push or bypass the gate. - Pin Hraness dependencies to reviewed immutable releases or full commits. Never connect repositories through sibling paths, Git submodules, or coordinated
mainassumptions; upgrade each consumer independently. - Extract a shared package only after two concrete consumers require the same stable interface. Keep every shared package product-neutral and free of product imports.
- Keep this package headless. It must not depend on
@hraness/uior@hraness/design-kit; consumers own any accessible primitives, stable visual composition, product layout, and content layered over KB data. - Keep Direct deterministic compositions and adapters development-only and outside every production dependency graph, packed file set, and public export.
- Freeze public CLI, metadata, graph, and workflow interfaces before parallel lanes begin. Give package manifests, lockfiles, committed
dist/, skill mirrors, and other convergence surfaces one owner while lanes edit disjoint paths. - Keep mandatory rules in the closest
AGENTS.md, current procedures indocs/, executable contracts in types and tests, and pull-based rationale, evidence, synthesis, and plans in this repository'skb/vault. - Treat this repository as the complete project. Files and Git prose may use only its public names, paths, commands, and examples; do not refer to or infer a non-public source repository.
- Keep Markdown authoritative and graph maintenance deterministic and local-first. Derive focused metadata, backlink, traversal, and percolation views directly from the current files; never commit a second graph database, event log, or generated fact file.
- Keep concepts as ordinary
type: conceptnotes and source-owned typed relationships as compact frontmatter. Never write reciprocal, inferred, transitive, or similarity-derived edges into notes. - Keep QMD state optional, local, dynamically loaded, and rebuildable from Markdown. The default hybrid path may combine local full-text and vector ranks, but query expansion and reranking remain opt-in costs. Join every match to current authored metadata and graph state.
- Pin required QMD compatibility behavior to an immutable public Hraness fork commit. Verify the installed bytes in focused tests and update or return to upstream only when equivalent store-local model behavior is published.
- Keep exact matches and QMD results inspectable as separate retrieval evidence. Return graph neighbors and Git history as context and provenance, not silent relevance boosts, authored links, or inferred facts.
- Keep
@hraness/kb/evaluation-builderas the cohesive public boundary for frozen-corpus authoring, evidence compilation, implementation commitments, seal validation, and v2 evaluation mechanics. Keep repository-specific corpora, configurations, retriever descriptors, and promotion expectations in the consumer. - Treat a code-mode session as a read-only snapshot that shares one vault scan. Reopen it after Markdown changes. Validate workflow DAGs before execution, cap nodes and concurrency, serialize QMD nodes, and bound Git workers below the global limit.
- Keep bundled workflows free of hidden writes and process-global state. Require explicit vault and repository inputs and return structured results that agents can inspect or compose.
- Keep
AGENTS.mdnormative and always loaded for ownership, prohibitions, required commands, invariants, and gates. Optionaltype: agent-contexthubs underscopes/are pull-based rationale, history, examples, evidence, and links; they cannot override a guide or become the sole home of a load-bearing edit rule. - Derive every scope-hub identity from the full exact repository-relative directory scope, with
.for the root, and require one reciprocalkb:contextmarker before the mapped guide's headings. Unmapped guides remain valid; moving a scope changes identity. - Confine repository-context lookup and agent-guide audits to the selected repository. Require real scope directories and regular guide files, reject collisions and symlinked mappings, skip generated or vendor directories, and never follow symbolic-link directories.
- Treat
repository_scopesas exact case-sensitive authored paths. Match directories lexically to descendants, match files only to themselves, report existence separately from validity, and never infer or rewrite scopes from Git history. - Treat agent-guide length, long-bullet, inherited-chain, and exact-duplicate audit findings as deterministic advisories rather than correctness. Keep required edit-time rules in the guide even when they exceed a suggested budget.
- Derive backlinks from explicit wikilinks and typed relationships. Keep both authored and managed front doors navigational, never inject reciprocal links, and leave title, alias, inbox, and percolation candidates advisory until their evidence is reviewed.
- Keep parallel note edits sharded by source file. Serialize same-note local writers, make replacements atomic and revision-checked, let edit lanes check graph policy without refreshing a catalog, and reserve the single managed catalog write for integration. An authored catalog mode must never rewrite the front door.
- Restrict generated edits to marked, tool-owned regions; preserve concurrent authored changes when refreshing; and fail closed on malformed markers, unsafe paths, or invalid local attachments.
- Treat capture inputs and outputs as hostile. Keep network, browser, subprocess, byte, item, depth, path, credential, and terminal boundaries bounded and covered by named regressions.
- Keep
skills/kb/as the only public Agent Skill and byte-identical between the repository and packed package. It remains inert after installation and must be usable fromnode_modules/@hraness/kb/skills/kb/without a source checkout. Mark repository-only skills with supported internal metadata so public discovery omits them. - Keep Archive.today-family discovery read-only and exactly bound to the requested source URL at every redirect hop. Preserve useful structured provider results ahead of archive fallback, and keep search-derived metadata in a separately owned sidecar with categorical provenance and failure states. Resolve fixed search-engine hosts through the public-network boundary, disable redirects, serialize engines, and confine the helper's process memory.
- Keep security-sensitive runtime forks pinned to immutable commits and exercise their behavior through the standalone install gate.
- Keep
portfolio-inventory.jsonbyte-canonical and consistent with the public package identity, version, repository, direct@hraness/*dependency edges, and Hraness-owned dependencies pinned by exact immutable GitHub specifiers. - Pair concrete behavior tests with property tests for parsing, resolution, ordering, path confinement, and round-trip laws.
- Run
bun test src/benchmark.test.ts src/evaluation.test.ts src/evaluation-kb.test.ts src/search.test.ts src/sdk.test.tswhen changing rank fusion, retrieval defaults, frozen-corpus execution, or built-in evaluation adapters. The six-case synthetic rank-fusion fixture is a deterministic regression, not a retrieval-quality or performance benchmark. Keep real-corpus manifests versioned, judgments independent of rankings, raw lane evidence intact, and performance claims tied to named hardware and measured runs. Runbun run checkbefore handing off a change; it must leave committeddist/andbun.lockunchanged. - Follow
docs/publishing.mdfor canonical GitHub Releases and optional npm mirrors. Keep the package name, CLI names, exports, rootDISCLOSURE, andcontentPolicy.class=dual-use. Canonical publication must not depend on npm availability, npmlatest, or staged promotion. Preserve old npm versions and immutable tags. - Use two exact active rulesets matching
refs/tags/v*: Immutable version tags restricts update and deletion with an empty bypass list; Release tag creation restricts creation and has ownerUserID894119as its sole always-bypass actor. Never grant generic GitHub Actions integration ID15368, an administrator, repository role, team, or other integration this bypass. Never combine creation with update/delete, move a tag, or create probe tags. Create the exact annotated stable package tag on reviewedmainafter its required checks pass. The protected tag workflow must bind the actor and event sender to ownerUserID894119and public repository ID1308971873before checkout. - Run release verifiers from exact current
main, build and smoke exact tagged source, and revalidate the complete verifier closure immediately before each release mutation. Keep source verification read-only and isolated from attestation credentials. The source-free attestation job must reauthorize the exact run/attempt and both actors before requesting credentials, bind the handoff to verified hashes, and sign the archive, packing receipt, manifest, and checksums. Require cryptographically verified hosted-run certificate identity, exact repository/owner IDs, tagged source/workflow/ref, run/attempt, and subject hashes before release publication or npm mirroring. - Publish exactly the canonical tarball,
npm-pack.json, strictrelease-manifest.json,SHA256SUMS, andprovenance.jsonl. Verify exact Actions-bot creator ID41898282, title/body/source/run, complete asset names/sizes/digests, immutable publication, stable ordering, and GitHub Latest. Prepare a draft, upload only missing matching files, then publish it; never overwrite assets, delete/recreate a release, or relabel an earlier attempt's provenance. A conflicting or cross-attempt partial release fails closed for exact reconciliation. No second stable release may start before the first completes. - Trust only
.github/workflows/npm-stage.ymlwithnpm stage publishpermission bound to the exactnpm-stageenvironment. Keep that environment restricted solely to selected default branchmain, administrator bypass disabled, no required deployment reviewers, and no secrets. Optional mirrors are intentional current-main dispatches; only booleanpublish_to_npm=truemay admit the source-free staging job withactions: read,contents: read, andid-token: write. Reauthorize the current run attempt, both owner actors, active workflow, public repository, main, and verified source. Download and verify the exact canonical GitHub artifact rather than rebuilding mirror bytes. - Preserve npm's safe packed-configuration, clean default
latest, strictly increasing version, and durable unresolved-intent guards. Reject top-leveltagand noncanonicalpublishConfig. Record a successful intent step immediately before mutation, inspect terminal writes before job names, require its immediately preceding safe positive Actions step number, and scan every retained attempt. npm's short-lived trust assertion cannot list stages. Resolve provider state out of band; exceptionalresolved_stage_versionclears only its exact rejected stage after provider resolution. Prior npm latest must retain its annotated tag, immutable Actions-authored release, and main ancestry; GitHub Latest may be newer. Accept zero-asset prior releases only for the enumerated, source-bound legacy tagsv0.19.0,v0.19.1, andv0.19.2; other prior versions require the canonical five assets and must be at least0.19.4. Disallow traditional publishing tokens. Public promotion remains human-gated by two-factor authentication until npm approves a classification change; do not claim this workflow prevents out-of-band stages.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +8 lines · +513 tokens per session 70ca34928b53
- 1mo ago Changed · +1 lines · +423 tokens per session 4589ccacdd2b
- 1mo ago Changed · +3 lines · +226 tokens per session dd308a269bc8
- 1mo ago Changed · +8 lines · +318 tokens per session 4e9982a477c6
- 1mo ago First seen · 56 lines · 2,494 tokens per session scan A 05c2be76a8ec
kb AGENTS.md is an instructions file published in the GitHub repository hraness/kb (13 stars, last pushed 1mo ago), licensed MIT. It adds 3,974 tokens to every session, about $0.0159 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode copilot-instructions.md
Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).
deno copilot-instructions.md
Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.