nsforge-mcp: Instructions file for GitHub Copilot

.github/copilot-instructions.md

nsforge-mcp copilot-instructions.md is an instructions file for GitHub Copilot from u9401066/nsforge-mcp. It costs 3,785 tokens per session, scanned A, original, Apache-2.0.

Project instructions for GitHub Copilot's Agent Mode, an AI coding assistant inside Visual Studio Code, covering architecture, Python setup, notes, and Git workflow.

In plain words
What is it for?
It guides domain-driven design, independent data-access code, Python environments managed with uv, Memory Bank updates, documentation checks, and validation before commits.
Why use it?
It gives Copilot shared project rules and records important progress and decisions so development stays consistent across tasks.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: reads .claude/ paths.

This is u9401066/nsforge-mcp's own configuration. It tells GitHub Copilot how to work on nsforge-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything nsforge-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to u9401066/nsforge-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/u9401066/nsforge-mcp/master/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/u9401066/nsforge-mcp

Made for: GitHub Copilot.

Wrote 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.

agentmods badge for nsforge-mcp copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/u9401066/nsforge-mcp/copilot-instructions/github.svg)](https://agentmods.dev/instructions/u9401066/nsforge-mcp/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/u9401066/nsforge-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/u9401066/nsforge-mcp/copilot-instructions/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.

agentmods 80×15 button for nsforge-mcp copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/u9401066/nsforge-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/u9401066/nsforge-mcp/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,785 This file is loaded in full into every session.
When invoked 3,785 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.03785 $0.03785
Opus 5.5 $0.01514 $0.01514
Sonnet 5.5 $0.00757 $0.00757
Haiku 4.5 $0.00379 $0.00379

Measured 1mo ago against content hash e54f36fee481, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

nsforge-mcp copilot-instructions.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.

.github/copilot-instructions.md · 309 lines

How it starts

The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Copilot 自定義指令

此文件為 VS Code GitHub Copilot 的 Agent Mode 提供專案上下文。


開發哲學 💡

「想要寫文件的時候,就更新 Memory Bank 吧!」

「想要零散測試的時候,就寫測試檔案進 tests/ 資料夾吧!」


法規遵循

你必須遵守以下法規層級:

  1. 憲法:CONSTITUTION.md - 最高原則,不可違反
  2. 子法:.github/bylaws/*.md - 細則規範
  3. 技能:.claude/skills/*/SKILL.md - 操作程序

架構原則

  • 採用 DDD (Domain-Driven Design)
  • DAL (Data Access Layer) 必須獨立
  • 依賴方向:Presentation → Application → Domain ← Infrastructure

詳見:.github/bylaws/ddd-architecture.md


Python 環境(uv 優先)

  • 優先使用 uv 管理套件和虛擬環境
  • 新專案必須建立 pyproject.toml + uv.lock
  • 禁止全域安裝套件
# 初始化環境
uv venv
uv sync --all-extras

# 安裝依賴
uv add package-name
uv add --dev pytest ruff

詳見:.github/bylaws/python-environment.md


Memory Bank 同步

每次重要操作必須更新 Memory Bank:

操作 更新文件
完成任務 progress.md (Done)
開始任務 progress.md (Doing), activeContext.md
重大決策 decisionLog.md
架構變更 architect.md

詳見:.github/bylaws/memory-bank.md


Git 工作流

提交前必須執行檢查清單:

  1. ✅ Memory Bank 同步(必要)
  2. 📖 README 更新(如需要)
  3. 📋 CHANGELOG 更新(如需要)
  4. 🗺️ ROADMAP 標記(如需要)
  5. ✅ uv run python scripts/check.py(14 gates,含 security、mcp、package)

詳見:.github/bylaws/git-workflow.md


可用 Skills

位於 .claude/skills/ 目錄:

🔥 NSForge 專用 Skills(MCP 工具組合)

Skill 說明 觸發詞
nsforge-derivation-workflow 完整推導工作流 推導, derive, 組合公式
nsforge-formula-management 公式庫管理 找公式, 列出, 更新公式
nsforge-formula-search 外部公式搜尋 Wikidata, BioModels, 物理常數, PK模型
nsforge-verification-suite 驗證工具組合 驗證, 維度, check
nsforge-code-generation 程式碼/報告生成 生成程式碼, LaTeX, 報告
nsforge-quick-calculate 快速計算(無需會話) 計算, 簡化, 求解
nsforge-usolver-collab 🆕 USolver 協作 優化, 最佳化, 劑量優化

詳細說明見 docs/nsforge-skills-guide.md

MCP 2.1 協議規則(NSForge 0.4.0)

  • Runtime 使用 MCPServer、精確 pin MCP Python SDK 2.1.1、protocol revision 2026-07-28。
  • Catalog 共 91 tools;固定啟動 profiles 為 legacy 82(預設)、workflow 17、 scientific 35、interactive 35、full 91。Legacy 仍支援 music opt-in。
  • 既有工具名稱、input/output schema 與 response payload 是相容性契約;不可為了 MCP 2 metadata 改壞它們。
  • 每個工具必須保有 explicit structured output、title、icon、標準 annotations 與 namespaced org.nsforge/* _meta。application error 要保留既有 JSON body 並設 protocol isError。
  • Compact profiles 必須拒絕 unknown fields 並實作 ToolSpec 宣告的 enum/range constraints;descriptions 精簡,教學移到 docs/prompt。
  • Discovery 可讀 nsforge://manifest、nsforge://health、nsforge://north-star、 nsforge://derivations/{result_id}、nsforge://runs/{run_id}、.../events、 nsforge://sessions/{session_id}、nsforge://artifacts/{sha256},以及 forge_verified_derivation prompt。
  • Strict task results 以 ResourceLink 連到 immutable run/artifact;phase event 同時驅動 provenance、progress、SQLite persistence 與 OTel correlation。
  • SDK 2.1.1 尚未實作 MCP Tasks;task_run 是 NSForge tool,不可宣稱為 Tasks extension。
  • stdio 為預設;Streamable HTTP 只在明確 opt-in 時啟用。非 loopback 需 allow flag 與真正的外部 authentication/TLS;allow flag 本身不是安全邊界。
  • MCP 2 sync handlers 可在 worker threads 執行;session/repository 的共享可變狀態與檔案寫入必須維持 thread-safe/atomic。
  • Caller expression 只能走中央 allowlisted no-eval parser;不得直接用 parse_expr/sympify;保留 exponent/combinatorial literal complexity budgets。 Repository/artifact/music paths 必須通過 root containment,music root 在註冊時凍結。
  • Strict workflow 以 tenant-scoped SQLite UoW 為權威;legacy JSON/YAML 與 process globals 只是相容層。沒有 IdP 時,一個 instance 就是一個 tenant boundary; 不宣稱 cross-replica shared state。

Read the full file on GitHub · 309 lines

Changes

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.

  1. 1mo ago Changed · +15 lines · +274 tokens per session e54f36fee481
  2. 1mo ago First seen · 294 lines · 3,511 tokens per session scan A 545c4d1abbd6

Subscribe to this mod's changes

nsforge-mcp copilot-instructions.md is an instructions file published in the GitHub repository u9401066/nsforge-mcp (4 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 3,785 tokens to every session, about $0.0151 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-31.

Related

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).

microsoft/vscode · 9,715 tokens

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.

vercel/next.js · 7,581 tokens

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).

microsoft/vscode · 5,262 tokens

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.

langchain-ai/langchain · 4,680 tokens

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).

microsoft/vscode · 2,731 tokens

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.

denoland/deno · 3,077 tokens