nsforge-mcp copilot-instructions.md

nsforge-mcp copilot-instructions.md is an instructions file for GitHub Copilot from u9401066/nsforge-mcp. It costs 3,511 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/u9401066/nsforge-mcp/copilot-instructions
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,511 This file is loaded in full into every session.
When invoked 3,511 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03511 $0.03511
Opus 5 $0.01755 $0.01755
Sonnet 5 $0.00702 $0.00702
Haiku 4.5 $0.00351 $0.00351

Measured 4d ago against content hash 545c4d1abbd6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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 · 294 lines

How it starts

The opening of the file, as written. The whole thing — 294 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(12 gates,含 mcp contract gate)

詳見:.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.3.0)

  • Runtime 使用 MCPServer、MCP Python SDK 2.1.1、protocol revision 2026-07-28
  • Catalog 共 91 tools;預設 82,music 9 個需 NSFORGE_ENABLE_MUSIC=1
  • 既有工具名稱、input/output schema 與 response payload 是相容性契約;不可為了 MCP 2 metadata 改壞它們。
  • 每個工具必須保有 explicit structured output、title、icon、標準 annotations 與 namespaced org.nsforge/* _meta。application error 要保留既有 JSON body 並設 protocol isError
  • Discovery 可讀 nsforge://manifestnsforge://healthnsforge://north-starnsforge://derivations/{result_id},以及 forge_verified_derivation prompt。
  • task_runtask_explore 會透過 MCP Context 回報開始與完成進度;不要把 progress 誤寫成 MCP 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。

Read the full file on GitHub · 294 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. 4d 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 4d ago), licensed Apache-2.0. It adds 3,511 tokens to every session, about $0.0176 per session on Opus 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.