A monumental open bronze-bound ledger book resting on an anvil in a forge chamber, its glowing amber pages pouring four luminous streams outward representing the MCP tools, CLI commands, REST endpoints, and SDK exports; spine engraved API SURFACE in classical Roman serif
Appendix Q · Reference

Unified API Surface Index

One index, four surfaces. Every 104 MCP tool, every 97 CLI command, every REST endpoint domain, and every SDK export, alphabetized, grouped, and cross-linked. If you can't remember whether forge_secret_scan has a CLI wrapper, this is the page.

The source of truth. This appendix is a navigable index, not a reference manual. For deep usage:

On this page

The four surfaces

Plan Forge exposes its capabilities through four orthogonal transports. The same handler set backs all four, choosing one is a question of who is calling.

Surface Count Auth Best for
MCP (stdio + WebSocket) 104 tools Transport-bound (stdio = inherited trust; WS = bearer) Copilot, Claude, Cursor, Codex, anything speaking MCP
CLI (pforge) 97 commands Local filesystem trust + PFORGE_API_TOKEN Scripts, cron, humans in terminals, CI runners
REST (/api/*) 103 endpoints across 17+ domains Bearer token in Authorization header HTTP clients, CI, dashboards, mobile, anything cross-process
SDK (pforge-sdk) 12 sub-paths Bearer token via createClient Node.js / TypeScript callers wanting typed responses

WebSocket events on /api/hub are the fifth, observation-only surface, see Chapter 29 — Integrating from Outside. The full payload schema for every hub event is in Appendix V — Event Catalog.

MCP tools — by domain

Canonical source: pforge-mcp/tools.json. The full description, input schema, error map, and example for each tool is exposed via forge_capabilities. The table below is the one-line index.

Diagnostics & setup (7)

ToolPurpose
forge_smithInspect the forge, env, VS Code, setup health, version currency, common problems
forge_validateValidate Plan Forge setup, required files, counts, unresolved placeholders
forge_statusAll phases from DEPLOYMENT-ROADMAP.md with current status
forge_diffCompare changes against a plan's Scope Contract, drift + forbidden edits
forge_sweepCompleteness sweep, scan for TODO/FIXME/HACK/stub/placeholder/mock markers
forge_audit_exportExport audit events from .forge/runs/*/events.log — ACI-paginated, filterable by date/type/run
forge_diff_statsClassify staged git diff changes by category (plan, test, docs, config, chore, scope) — advisory only, never blocks

GitHub stack (3)

forge_github_statusInspect the GitHub-native AI surface (instructions, agents, MCP wiring, workflows, gh CLI)
forge_github_metricsLive GitHub repo metrics via gh CLI, stars, PRs, issues, commit activity
forge_delegate_reviewDelegate PR review to the Copilot Coding Agent (cloud)

Team coordination (2)

forge_team_dashboardMulti-developer coordination, per-developer cards + conflict-risk assessment
forge_team_activityRead recent run summaries from .forge/team-activity.jsonl

Plan execution (8)

forge_new_phaseCreate a new phase plan + roadmap entry
forge_analyzeCross-artifact analysis, traceability, coverage, scope, validation gates
forge_run_planExecute a hardened plan, spawn workers, validate at every boundary, track tokens
forge_abortAbort the currently running plan execution
forge_plan_statusStatus of the latest plan execution run
forge_regression_guardRun gate commands from plan files against the current codebase
forge_export_planConvert a Copilot cloud agent session plan into a hardened Phase-X-PLAN.md
forge_pipelines_listList the four standing capture pipelines and report their last-write timestamps plus Anvil hit rates

Cost & quorum (5)

forge_cost_reportTotal spend, per-model breakdown, monthly aggregation from cost-history.json
forge_estimate_quorumProjected plan cost under all four quorum modes (auto/power/speed/false)
forge_estimate_sliceProjected cost for a single slice under a chosen quorum mode
forge_quorum_analyzeAssemble a structured 3-section quorum prompt from any LiveGuard data source
forge_doctor_quorumPreflight viability check, probe all preset models, report availability + fallbacks

Crucible — idea smelting (8)

forge_crucible_submitSubmit a raw idea, start a new smelt
forge_crucible_askAdvance the interview, supply an answer, get the next question
forge_crucible_previewRender the current draft as a Markdown plan
forge_crucible_finalizeAtomically claim a phase number, write Phase-NN.md, stamp crucibleId:
forge_crucible_listList smelts (newest first), optionally filtered by status
forge_crucible_abandonAbandon a smelt, release any phase-number claim
forge_crucible_importImport a Spec Kit project, deterministic, LLM-free field mapping
forge_crucible_statusList smelts by source and status, or inspect a single smelt

Tempering — coverage & quality (5)

forge_tempering_scanRead-only scan of an existing coverage report (lcov/cobertura/jacoco/cover.out/...)
forge_tempering_statusLatest N scan summaries, dashboard feed + forge_smith panel
forge_tempering_runExecution harness, runs unit/integration/UI/API scanners per stack preset
forge_tempering_approve_baselinePromote current screenshot to visual-diff baseline
forge_tempering_drainRound-loop wrapper, re-probe until convergence or max-rounds cap

Triage, bugs & classifiers (6)

forge_triage_routeRoute a tempering finding into bug / spec / classifier lane
forge_classifier_issueFile a GitHub issue proposing a classifier rule update (closes the audit loop)
forge_bug_registerRegister a bug discovered by a tempering scanner
forge_bug_listList bugs with optional filters
forge_bug_update_statusTransition status (open → in-fix → fixed) with validation
forge_bug_validate_fixRe-run the scanner that discovered a bug to verify the fix

Memory, provenance & brain (9)

forge_memory_captureCapture a thought, decision, or lesson into OpenBrain persistent memory
forge_memory_reportAggregate health of every memory surface (L2 jsonl, OpenBrain queue, search cache, orphans)
forge_sync_memoriesGenerate .github/copilot-memory-hints.md from trajectories + auto-skills + brain
forge_brain_replayBulk-load records into OpenBrain via capture_thought from a local source file
forge_brain_testRound-trip test against OpenBrain (L3 memory) — write a test thought and read it back
forge_hallmark_showShow Hallmark provenance records — immutable milestone stamps written at slice completions, gate passes, phase closures
forge_hallmark_verifyVerify a Hallmark record has not drifted — re-hashes the referenced source file and compares against the stored hash

Copilot integration (1)

forge_sync_instructionsGenerate .github/copilot-instructions.md from profile + principles + .forge.json

Lattice — code graph (5)

forge_lattice_indexBuild/update the code-graph index, chunks tracked files, persists JSONL
forge_lattice_statBounded summary, chunk count, edge count, language dist, Anvil hit rate
forge_lattice_querySearch chunks by name, language, kind, or file path
forge_lattice_callersFind all chunks that reference a given symbol
forge_lattice_blastBFS traversal, expand callees/callers from a seed chunk up to depth N

Knowledge graph & patterns (2)

forge_graph_queryQuery the in-memory knowledge graph (Phase/Slice/Commit/File/Run/Bug nodes)
forge_patterns_listList recurring patterns detected across runs (4 detectors)

Anvil — memoization cache (5)

forge_anvil_statInspect the Anvil memoization cache — entries, bytes, oldest entry, per-tool hit/miss counters
forge_anvil_clearDelete Anvil cache entries — scope by tool name, by age (olderThanMs), or both
forge_anvil_rebuildInvalidate Anvil cache entries for files changed since a git commit SHA
forge_anvil_dlq_listList dead-letter queue entries — records of cache writes that failed and were quarantined
forge_anvil_dlq_drainDrain (purge) dead-letter queue entries from the Anvil memoization cache

Semantic recall & embeddings (3)

forge_local_searchSemantic search over local .forge/ thought stores — TF-IDF or neural embeddings backend
forge_local_recall_statusInspect and manage the persistent TF-IDF index cache used by forge_local_search
forge_embedding_statusReport embedding backend status — whether @xenova/transformers (neural) or TF-IDF is active, corpus size, configured backend override

Health, trends & hotspots (4)

forge_drift_reportScore codebase against architecture guardrail rules, track drift over time
forge_health_trendAggregate drift, cost, incidents, model performance over configurable window
forge_hotspotIdentify git churn hotspots, files that change most frequently
forge_alert_triageRank incidents + drift violations by severity × recency

Incidents, deploys & dependencies (3)

forge_incident_captureCapture an incident, description, severity, files, resolution time (MTTR)
forge_deploy_journalRecord a deployment, version, deployer, notes, optional slice ref
forge_dep_watchScan dependencies for known vulnerabilities (npm audit / equivalent)

LiveGuard — deploy safety (4)

forge_secret_scanPost-commit entropy analysis, scan git diff for likely leaked secrets
forge_env_diffCompare env var keys across .env files, detect missing keys
forge_liveguard_runRun all applicable LiveGuard checks in a single call, return unified report
forge_diff_classifyClassify staged git diff against 6 safety categories: leaked-secret, prompt-injection, eval/exec introduction, license-incompatible paste, scope-undeclared change, and test-only change

Fix & runbook (3)

forge_fix_proposalGenerate 1-3 slice fix plan from drift / incident / secret / Crucible / tempering finding
forge_runbookGenerate human-readable operational runbook from a hardened plan
forge_diagnoseMulti-model bug investigation, dispatch to multiple models, synthesize root cause

Skills & org rules (3)

forge_skill_statusRecent skill execution events from the WebSocket hub history
forge_run_skillExecute a skill programmatically, parse SKILL.md, run with validation gates
forge_org_rulesConsolidate .github/instructions/*.instructions.md for org-level Copilot

Cross-project watching (2)

forge_watchRead-only observer that tails another project's pforge run
forge_watch_liveLive event stream from another project's pforge run for a fixed duration

Review queue (3)

forge_review_addAdd an item to the review queue
forge_review_listList review queue items with filters and pagination
forge_review_resolveResolve an open review item (approve/reject/defer)

Delegation & notifications (3)

forge_delegate_to_agentRoute a tempering bug to the appropriate agent/skill for read-only analysis
forge_notify_sendSend a notification directly via a named adapter (bypass routing)
forge_notify_testTest notification adapter configuration
forge_searchSearch across runs, bugs, incidents, tempering, hub events, review queue, memories, plans
forge_timelineUnified chronological view across all sources with correlationId grouping
forge_home_snapshotAggregated snapshot of Crucible, runs, LiveGuard, Tempering + trimmed feed
forge_capabilitiesMachine-readable API surface, tools, CLI, workflows, config, dashboard, extensions

Testbed (3)

forge_testbed_runRun a testbed scenario against an external testbed repository
forge_testbed_findingsQuery testbed defect-log findings
forge_testbed_happypathRun all happy-path testbed scenarios sequentially

Extensions, Forge-Master, image gen, meta (5)

forge_ext_searchSearch the Plan Forge community extension catalog
forge_ext_infoDetailed info for a specific extension (author, version, install command)
forge_master_askAsk Forge-Master to reason about workflows (read-only orchestration)
forge_generate_imageGenerate an image via xAI Grok Aurora or OpenAI DALL-E
forge_meta_bug_fileFile a self-repair meta-bug against Plan Forge itself
Total: 104 MCP tools across 24 domains. Run forge_capabilities for the machine-readable manifest with full schemas, cost tiers, intent tags, and error maps.

CLI commands — pforge

Canonical source: pforge.ps1 + pforge.sh (mirror implementations). Schema doc: pforge-mcp/cli-schema.json. The full reference with arguments, flags, and examples lives in Chapter 8 — CLI Reference; this is the one-line index.

Core (12)

pforge smith                    Diagnose environment + setup health
pforge check                    Validate setup files
pforge validate                 (alias) Validate Plan Forge setup
pforge status                   Show phase status from roadmap
pforge sweep                    Scan for TODO/FIXME markers
pforge tour                     Guided walkthrough of installed Plan Forge files
pforge help                     Show help
pforge config get/set <k> [v]   Read or write keys in .forge.json (atomic)
pforge update                   Update framework files (auto-selects source)
pforge self-update              Force-pull latest GitHub release
pforge install                  First-time install bootstrap
pforge init                     Initialize a new project

Plan + analysis (12)

pforge new-phase <name>         Create a new phase plan + roadmap entry
pforge analyze                  Cross-artifact consistency scoring (0-100)
pforge run-plan <plan>          Execute a hardened plan
pforge diff <plan>              Compare changes against plan Scope Contract
pforge phase-status             Update phase status in DEPLOYMENT-ROADMAP
pforge regression-guard <plan>  Run validation gates from plan files
pforge plan-from-sarif <sarif>  Generate a fix plan from a SARIF findings file
pforge fix-proposal <finding>   Generate a 1-3 slice fix plan
pforge runbook <plan>           Generate operational runbook from a plan
pforge branch <plan>            Create git branch from plan's Branch Strategy
pforge commit                   Auto-generate conventional commit from slice goal
pforge version-bump [v]         Update VERSION + package.json + badges

Team + Copilot (8)

pforge team-dashboard           Per-developer cards in the terminal
pforge team-activity            Query the team-activity.jsonl ledger
pforge sync-memories            Generate .github/copilot-memory-hints.md
pforge sync-instructions        Generate .github/copilot-instructions.md
pforge sync-spaces              Sync inter-project memory spaces
pforge github status            Inspect GitHub-native AI surface
pforge github metrics           Live repo metrics via gh CLI
pforge org-rules                Export org-level custom instructions

Quality, drift & health (10)

pforge drift                    Score codebase against architecture guardrails
pforge hotspot                  Identify git churn hotspots
pforge health-trend             Drift, cost, incidents, model perf over time
pforge digest                   Daily digest, yesterday's deltas + anomalies
pforge triage                   Triage open alerts by priority
pforge dep-watch                Dependency vulnerability + freshness
pforge incident capture         Record an incident
pforge deploy-log               Record a deployment
pforge audit-loop               Drive a single audit-loop iteration
pforge audit list/show          Inspect classifier audit findings

Tempering (4)

pforge hammer-fm                Run the full tempering harness (false-marker scan)
pforge testbed-happypath        Run all happy-path testbed scenarios
pforge regression-guard         (also a plan command) Run gates as guard
pforge mcp-call <tool> ...      Invoke any MCP tool not yet wrapped by a verb

Memory + brain (6)

pforge drain-memory             Drain OpenBrain queue via local MCP REST
pforge migrate-memory           Merge legacy *-history.json into .jsonl
pforge fm-session               Start a Forge-Master reasoning session
pforge fm-recall                Recall a prior Forge-Master session
pforge anvil stat/purge         Inspect / reset the Δ-only memoization layer
pforge lattice index/stat/...   Code-graph index commands

Security & environment (5)

pforge secret-scan              Scan recent commits for high-entropy strings
pforge env-diff                 Compare .env keys across environments
pforge quorum-analyze           Assemble quorum prompt from LiveGuard data
pforge hallmark verify          Verify Hallmark provenance envelopes
pforge ext add/remove/...       Extension management

Total: 57+ top-level CLI commands across 7 functional areas. Run pforge --help for the live listing on your installed version.

REST endpoints — /api/*

Canonical source: handlers in pforge-mcp/server.mjs + pforge-mcp/dashboard/. Full per-endpoint reference: Appendix W — REST API Reference; raw dump in docs/REST-API.md on GitHub. OpenAPI spec: GET /api/openapi.json.

116 endpoints organize into these prefixes (one-line summary each, see Appendix W for verbs, query params, request/response shapes, and error codes):

Prefix Endpoints Covers
/api/plan~10Plan execution, status, abort, runs
/api/cost~6Cost report, estimate-quorum, estimate-slice
/api/team~5Team dashboard, activity feed, ledger queries
/api/copilot-instructions3Read / preview / sync the trilogy file pair
/api/graph~5Knowledge graph query, stats, rebuild
/api/lattice~5Code-graph index, query, callers, blast
/api/liveguard~6Secret scan, env diff, unified run, runbooks
/api/bugs~6Register, list, update-status, validate-fix
/api/crucible~10Submit, ask, preview, finalize, abandon, import, list, status
/api/tempering~6Scan, status, run, drain, approve-baseline
/api/incident~4Capture, list, MTTR, deploy-journal
/api/health~5Drift report, trends, hotspot, alert triage
/api/review3Add / list / resolve review queue items
/api/forge-master~4Read-only reasoning agent ask + session mgmt
/api/search~3Cross-artifact search, timeline, home snapshot
/api/notify2Send / test notification adapters
/api/ext~4Extension search, info, install, remove
/api/anvil~5Cache stat, clear, rebuild, DLQ list, DLQ drain
/api/embedding~2Embedding backend status, local-recall index status
/api/audit1Audit event export (paginated, filterable by date / type / run)
/api/hub1 (WS)WebSocket event stream, 60+ event types
/api/openapi.json1OpenAPI 3 spec for the entire surface (codegen-ready)

SDK — pforge-sdk

Twelve sub-paths, all pure Node.js (zero runtime dependencies). Full reference: pforge-sdk/README.md on GitHub.

Import Key exports Use when
pforge-sdk Re-exports all sub-paths below Single import for all SDK utilities
pforge-sdk/tools tools, getTool, getToolsByRisk, getToolsByIntent Loading + filtering the MCP tool registry from Node.js
pforge-sdk/hallmark buildProvenance, validateProvenance, mergeProvenance Stamping / validating Hallmark provenance envelopes
pforge-sdk/chunker validateChunk, CHUNK_KINDS Validating Lattice code-graph chunk records
pforge-sdk/client v0.4.0 PForgeClient, createClient, PForgeClientError Calling the Plan Forge REST API from Node.js without raw fetch
pforge-sdk/anvil v0.5.0 computeAnvilKey, anvilEntryPath, anvilCacheDir, anvilStatsPath Computing Anvil cache keys + paths without running the server
pforge-sdk/lattice-query v0.5.0 LatticeQueryBuilder, tokenizeForSearch, scoreChunk Building fluent Lattice queries + scoring chunks without the server
pforge-sdk/notifications/adapter-contract v0.5.0 validateAdapterShape, ERR_NOT_IMPLEMENTED Validating a custom notification adapter shape before registering it
pforge-sdk/run-reader v0.6.0 listRuns, readRunMeta, readRunSummary, readRunIndex, parseEventLine Offline access to .forge/runs/ artifacts — no running server required
pforge-sdk/plan-reader v0.7.0 listPlans, readPlan, getPlanStatus, getPlanSlices, plansDir Offline access to docs/plans/ plan files — read status, slices, and frontmatter without a server
pforge-sdk/thought-reader v0.8.0 readThoughts, readAllThoughts, listThoughtSources, parseThoughtLine, thoughtFilePath Offline access to .forge/*.jsonl thought stores — OpenBrain queue, archive, DLQ, and LiveGuard memories
pforge-sdk/digest-reader v0.9.0 listDigests, readDigest, readLatestDigest, overallSeverity, getSectionsByMinSeverity, digestFilePath Offline access to .forge/digests/*.json daily digest files — list, read, and compute severity

Surface coverage matrix

Not every capability is exposed through every surface. This matrix shows which features have CLI wrappers, REST endpoints, and SDK helpers. Use it to pick the right surface for a caller.

Capability MCP CLI REST SDK
Plan execution (run-plan)
Cost reporting + estimates
Copilot trilogy (memory + instructions sync)
Team dashboard + activity
Knowledge graph queries
Daily digest
LiveGuard checks (secret/env/full)
Tempering (scan, run, drain)
Crucible smelting
Forge-Master (read-only reasoning)
Lattice code graph
Hallmark stamp / verify
Anvil purge / stat
Bug registry CRUD
WebSocket live events
Self-update / install
Notification adapter contract validation
Offline run artifact access (run-reader)
Offline plan file access (plan-reader)
Offline thought store access (thought-reader)
Offline digest file access (digest-reader)
Anvil cache management
Semantic recall / local search
Extension marketplace
Reading the matrix. A "—" means "the capability isn't exposed on this surface", usually intentional. For example, pforge install only makes sense as a CLI command; WebSocket live events have no CLI representation (subscribe via REST + WS).
See also: Chapter 8 — CLI Reference for full CLI usage with flags and examples. Chapter 11 — MCP Server & Tools Reference for tool schemas and intent metadata. Chapter 29 — Integrating from Outside for the surface-picking decision tree.