agentleFS
u9401066u9401066/nsforge-mcp/AGENTS.md

nsforge-mcp

AGENTS.md4 starsChanged 11 months agoApache-2.0View on GitHub

Workspace instructions for autonomous agents (Copilot, Cline, Codex, OpenHands, Hermes, …) working in the Neurosymbolic Forge (NSForge) repository. Help build and operate NSForge — an MCP server that turns concepts into verifiable, traceable entities (symbols → derivations → algorithms). The AI orchestrates; deterministic tools reify. See docs/reification-ladder-direction.md for the north star. Every symbol / equation / value / line of code in a final result must have a tool call as its "birth certificate" (provenance). The AI must not hand-derive…

The file

We split this AGENTS.md into the rules it gives an agent

10 rules. About 0 are common, 3 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Use Traditional Chinese unless the user asks otherwise.

    line 23
  2. Distinctive:

    Prefer exact file paths, command output summaries, and verification results.

    line 24
  3. Very specific:

    When changing behavior, add a focused regression test under tests/.

    line 27
  4. Distinctive:

    Before and after changes, verify against the green baseline:

    line 31
  5. Very specific:

    Keep src/nsforge/domain free of I/O and infrastructure imports.

    line 62
  6. Very specific:

    Do not weaken mypy strict or skip gates just to make checks pass.

    line 63
  7. Very specific:

    Prefer uv run ... so tools use the project venv.

    line 64
  8. Very specific:

    Avoid destructive git ops (reset --hard, clean -fdx) unless asked.

    line 65
  9. Very specific:

    Never commit secrets or generated outputs (dist/, .venv/, data/).

    line 66
  10. Very specific:

    After adding/removing an @mcp.tool, regenerate the manifest: python scripts/gen_capabilities.py.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “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
AGENTS.md

NSForge Agent Harness

Workspace instructions for autonomous agents (Copilot, Cline, Codex, OpenHands, Hermes, …) working in the Neurosymbolic Forge (NSForge) repository.

Goal

Help build and operate NSForge — an MCP server that turns concepts into verifiable, traceable entities (symbols → derivations → algorithms). The AI orchestrates; deterministic tools reify. See docs/reification-ladder-direction.md for the north star.

North Star

Every symbol / equation / value / line of code in a final result must have a tool call as its "birth certificate" (provenance). The AI must not hand-derive any of them.

Success = the amount the AI computes by hand approaches zero.

Working Style

  • Use Traditional Chinese unless the user asks otherwise.
  • Prefer exact file paths, command output summaries, and verification results.
  • Offload mechanical/deterministic steps (symbolic calculation, simplification, code generation) to tools — do not hand-derive formulas.
  • When changing behavior, add a focused regression test under tests/.

Ground Truth: one command

Before and after changes, verify against the green baseline:

python scripts/check.py            # all gates
python scripts/check.py --json     # machine-readable summary (for agents)
python scripts/check.py --gates lint,type,test   # subset

Gates: 14 total — lint, format, type, security, import, manifest, mcp, test, bench, generic, provenance, package, harness, diff. Exit code 0 = green. (bench = derivation-correctness of benchmarks/*.json through the L3 orchestrator; generic = arbitrary unseen compositions derive correctly, proving NSForge is a derivation calculus, not a hand-built formula library; provenance = every benchmark derivation carries a complete tool-provenance ledger, no hand-derived leaks; mcp = MCP 2.1.1 discovery, schemas, metadata, payloads, resources, prompts, and legacy-client compatibility stay green; security = executable source has no high-severity Bandit finding; package = sdist/wheel build, isolated install, packaged assets, and installed MCP smoke stay green; harness = the harness self-checks its own invariants — package version parity, self-describing tools, and gate/doc parity — so agents can trust the signal.)

Repo Layout (DDD)

  • src/nsforge/domain/: pure domain models/value objects (no I/O)
  • src/nsforge/application/: use-cases / orchestration
  • src/nsforge/infrastructure/: adapters (sympy engine, formula sources, file I/O)
  • src/nsforge_mcp/: MCP tool layer + server wiring (server.py, tools/)
  • docs/agent/capabilities.json: machine-readable tool manifest (self-describing)

Guardrails

  • Keep src/nsforge/domain free of I/O and infrastructure imports.
  • Do not weaken mypy strict or skip gates just to make checks pass.
  • Prefer uv run ... so tools use the project venv.
  • Avoid destructive git ops (reset --hard, clean -fdx) unless asked.
  • Never commit secrets or generated outputs (dist/, .venv/, data/).
  • After adding/removing an @mcp.tool, regenerate the manifest: python scripts/gen_capabilities.py.
  • MCP runtime baseline: exact SDK 2.1.1 pin, protocol 2026-07-28, MCPServer, 91 catalog tools. Fixed startup profiles are legacy 82 (default), workflow 17, scientific 35, interactive 35, and full 91. Preserve legacy schemas and payloads; add protocol features through the central ToolSpec contract and verify with the mcp gate.
  • Compact profiles reject unknown inputs and enforce declared enum/range constraints. Strict task runs persist tenant-scoped immutable run, event, evidence, and artifact records in SQLite and expose them through nsforge://runs/{run_id}, nsforge://runs/{run_id}/events, nsforge://sessions/{session_id}, and nsforge://artifacts/{sha256} resources.

Related Files

  • docs/reification-ladder-direction.md — architecture direction
  • scripts/check.py — verification harness (ground truth)
  • scripts/gen_capabilities.py — capability manifest generator
  • .github/copilot-instructions.md — Copilot rules
  • memory-bank/activeContext.md — current focus

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.