god-prompt-mcp 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,11 +35,20 @@ To buy the review, use the [US$49 one-time GitHub Sponsors tier](https://github.
35
35
  | `assess_release_readiness` | Find blockers in reported CI, artifact provenance, rollback, migrations and approvals; never authorizes deployment (v1.2.0+) |
36
36
  | `create_context_handoff` | Produce bounded cross-chat/agent state with best-effort secret redaction and explicit verification limitations (v1.2.0+) |
37
37
  | `compare_evaluation_runs` | Compare caller-supplied paired cases and observed pass rates, durations and costs with sample-size warnings (v1.2.0+) |
38
+ | `audit_agent_trajectory` | Review bounded, sanitized agent event metadata for repeated failures, scope drift, stale checks and unsupported completion claims (v1.3.0+) |
39
+ | `trace_change_impact` | Use supplied dependencies, requirement mappings and test receipts to trace affected files and uncovered verification (v1.3.0+) |
40
+ | `review_mcp_tool_contracts` | Flag possible MCP schema, annotation and behavioral contract inconsistencies without invoking tools (v1.3.0+) |
41
+ | `audit_agent_instructions` | Inspect scoped caller-supplied instruction excerpts for duplicate rules, opposing constraints and suspicious bypasses (v1.3.0+) |
42
+ | `design_adversarial_tests` | Suggest bounded negative, boundary, property, metamorphic and trust-boundary cases; never run tests (v1.3.0+) |
38
43
 
39
44
  > **Version 1.1.1:** `create_work_contract` and `review_work_evidence` expand the seven original MCP tools to nine. Older hosted or version-pinned installations may still expose only the original seven until separately updated. Both tools remain stateless and read-only, and neither independently authenticates caller-supplied evidence. See the [task-contract workflow and security limitations](docs/task-contracts.md).
40
45
 
41
46
  **Version 1.2.1:** All seventeen public MCP tools are available, including the eight engineering-quality functions introduced in v1.2.0. This patch refines code-review signal precision, requirement-conflict detection and duplicate CI-check blocking without adding permissions or storage. The Codexify checkpoint remains an optional **stdio-only** eighteenth tool. Install a versioned MCP package or inspect the hosted `tools/list` response to determine which functions your client actually receives. None of the tools independently execute tests, inspect external repositories or authorize deployment. See the [toolkit QA and limitations](docs/qa/godprompt-public-toolkit-20261120.md). The OpenAI marketplace distribution remains a separate, Skill-only integration until its eventual dedicated upgrade.
42
47
 
48
+ **Version 1.3.0:** All **22 public read-only tools** are available from the published hosted MCP and npm stdio package. Five P4 diagnostics were added, with strict bounded output schemas and paired evaluation statistics. The optional local Codexify checkpoint is the 23rd tool **only when explicitly enabled** on local stdio. The remote MCP does not execute code, fetch repositories or approve changes. See [P4 evidence and release status](docs/roadmaps/godprompt-p4-agent-quality-20261120.md). The combined OpenAI Skill+MCP source package is ready for review, but the existing directory listing is still Skill-only; GHCR 1.3.0 publication is a separately manual step.
49
+
50
+ **Version 1.4.1 (P5 patch):** The public tool count remains **22**, with improved advisory trajectory diagnostics, optional accessible MCP Apps evidence display for two existing tools, and smaller task-specific guidance suggestions. The local npm distribution adds `godprompt-repo-map` to derive a bounded static JavaScript/TypeScript dependency map from an explicitly authorized checkout, and `godprompt-proof pack` to combine pinned GitHub evidence with optional Codexify receipts, invalidating contradictions. Both CLIs are **local opt-in**, not hosted MCP permissions. The free coding-agent benchmark runner and 12 deliberately failing grader microtasks help set up paired A/B evaluation; they do **not** prove a model productivity improvement. The v1.4.1 patch also resolves NodeNext source imports and detects more instruction-bypass wording; clients must update the local package for these improvements.
51
+
43
52
  ### Optional local proof bridge (from v1.1.1)
44
53
 
45
54
  The new **godprompt-proof** CLI (Node 22+, **no additional dependencies**) can normalize pinned GitHub CI checks and exported Codexify command receipts into inputs for the existing GodPrompt evidence reviewer. It also supports an optional **single 256 KiB local JSONL feedback file** for project-scoped generic lessons, **on-demand read-only metrics**, and **versioned workflow previews** from that same file (no telemetry or automatic rule changes). No database server, GPU, background worker or global telemetry is involved.
@@ -80,13 +89,13 @@ The hosted endpoint exposes the read-only GodPrompt tools included in its **curr
80
89
 
81
90
  ### Agent Skills over MCP (SEP-2640)
82
91
 
83
- On MCP 2026-07-28, both the hosted and stdio servers advertise the Final `io.modelcontextprotocol/skills` extension from SEP-2640. Supporting clients can discover the same relevance-scoped `god-prompt` Agent Skill with `skills/list` / `skills/get`, then fetch `SKILL.md` and its three reference files through `resources/read`. The skill manifest includes SHA-256 digests and exact byte sizes so clients can verify what they import. Clients that do not implement this extension continue to use the seven existing GodPrompt tools normally.
92
+ On MCP 2026-07-28, both the hosted and stdio servers advertise the Final `io.modelcontextprotocol/skills` extension from SEP-2640. Supporting clients can discover the same relevance-scoped `god-prompt` Agent Skill with `skills/list` / `skills/get`, then fetch `SKILL.md` and its three reference files through `resources/read`. The skill manifest includes SHA-256 digests and exact byte sizes so clients can verify what they import. Clients that do not implement this extension continue to use the 22 public GodPrompt tools normally.
84
93
 
85
94
  This transports GodPrompt's existing skill package; it does not force the skill into every request or change the host's own approval, verification, or activation policy. See the [MCP Skills extension specification](https://modelcontextprotocol.io/extensions/skills/overview).
86
95
 
87
96
  ### ChatGPT Plugin Directory (skill-only)
88
97
 
89
- For the lowest-friction ChatGPT path, install [GodPrompt from the first-party Plugin Directory](https://chatgpt.com/plugins/plugins_6ab2f1cc5d0081919d729fd1c2884f86). That published plugin carries the scoped `god-prompt` Agent Skill; use the custom MCP app setup below when you specifically want the seven callable GodPrompt tools.
98
+ For the lowest-friction ChatGPT path, install [GodPrompt from the first-party Plugin Directory](https://chatgpt.com/plugins/plugins_6ab2f1cc5d0081919d729fd1c2884f86). That published plugin carries the scoped `god-prompt` Agent Skill; use the custom MCP app setup below when you specifically want the 22 callable public GodPrompt tools.
90
99
 
91
100
  ### ChatGPT (hosted remote MCP)
92
101
 
@@ -132,7 +141,7 @@ For MCP clients that can launch a local process, the [public GHCR image](https:/
132
141
  }
133
142
  ```
134
143
 
135
- Keep `-i` so the MCP client can exchange JSON-RPC over standard input/output; do not add `-t` (a TTY changes the stdio stream). The version tag selects the verified v1.1.1 image; update it deliberately for future releases rather than silently following the moving `latest` tag. The image is Linux/amd64 and runs as non-root user `10001:10001`. If Docker is unavailable, use the [hosted remote endpoint](#hosted-remote-no-nodejs-required) instead.
144
+ Keep `-i` so the MCP client can exchange JSON-RPC over standard input/output; do not add `-t` (a TTY changes the stdio stream). The version tag selects the verified v1.1.1 image; update it deliberately for future releases rather than silently following the moving `latest` tag. The image is Linux/amd64 and runs as non-root user `10001:10001`. The newer v1.3.0 Docker source has passed image and stdio smoke testing, but the GHCR version tag requires a separate explicit manual publish and post-publish verification. See [the final GHCR checklist](docs/qa/godprompt-ghcr-v130-final-readiness-20261120.md); do not change the pinned example before that verification. If Docker is unavailable, use the [hosted remote endpoint](#hosted-remote-no-nodejs-required) instead.
136
145
 
137
146
  ### Glama
138
147
 
@@ -299,7 +308,7 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent droi
299
308
  Droid discovers compatible project skills under `.agents/skills/`. To add the callable GodPrompt tools as a local stdio MCP server, use Droid's native MCP command with the published version pinned:
300
309
 
301
310
  ```bash
302
- droid mcp add god-prompt "npx -y god-prompt-mcp@1.3.0"
311
+ droid mcp add god-prompt "npx -y god-prompt-mcp@1.4.1"
303
312
  ```
304
313
 
305
314
  Open `/mcp` in Droid to verify the server and available tools. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's read-only task and protocol tools. Node.js 22+ is required for the MCP server.
@@ -312,7 +321,7 @@ Warp can use GodPrompt as both an Agent Skill and a local MCP server. Install th
312
321
  npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent warp --copy -y
313
322
  ```
314
323
 
315
- Warp discovers project skills from `.agents/skills/` and `.warp/skills/`. For MCP tools, add a CLI-based MCP server in Warp with command `npx` and arguments `-y`, `god-prompt-mcp`; Warp's Oz CLI can also receive MCP configuration through `oz agent run --mcp`. The skill supplies the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
324
+ Warp discovers project skills from `.agents/skills/` and `.warp/skills/`. For MCP tools, add a CLI-based MCP server in Warp with command `npx` and arguments `-y`, `god-prompt-mcp`; Warp's Oz CLI can also receive MCP configuration through `oz agent run --mcp`. The skill supplies the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
316
325
 
317
326
  ### Goose
318
327
 
@@ -325,10 +334,10 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent goos
325
334
  Goose discovers the copied skill under `.goose/skills/god-prompt/`. To expose GodPrompt's callable tools for a session, start Goose with the published MCP package as an external stdio extension:
326
335
 
327
336
  ```bash
328
- goose session --with-extension "npx -y god-prompt-mcp@1.3.0"
337
+ goose session --with-extension "npx -y god-prompt-mcp@1.4.1"
329
338
  ```
330
339
 
331
- Goose currently treats Agent Skills and MCP extensions as separate native surfaces, so this path does not depend on Agent Plugins support. The skill supplies the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
340
+ Goose currently treats Agent Skills and MCP extensions as separate native surfaces, so this path does not depend on Agent Plugins support. The skill supplies the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
332
341
 
333
342
  ### Zed
334
343
 
@@ -373,7 +382,7 @@ The add command writes the project MCP configuration for you. If you prefer to c
373
382
 
374
383
  OpenCode 1.x used the same server entry directly under `mcp`; the v2 schema shown above nests named servers under `mcp.servers`.
375
384
 
376
- The Agent Skill provides the reusable workflow; MCP adds the seven progressive-disclosure tools. Node.js 22+ is required for the MCP server.
385
+ The Agent Skill provides the reusable workflow; MCP adds the 22 public read-only tools available in v1.3.0. Node.js 22+ is required for the MCP server.
377
386
 
378
387
  ### TraeCode
379
388
 
@@ -390,13 +399,13 @@ The Trae target installs the skill under `.trae/skills/god-prompt/`, where TraeC
390
399
  "mcpServers": {
391
400
  "god-prompt": {
392
401
  "command": "npx",
393
- "args": ["-y", "god-prompt-mcp@1.3.0"]
402
+ "args": ["-y", "god-prompt-mcp@1.4.1"]
394
403
  }
395
404
  }
396
405
  }
397
406
  ```
398
407
 
399
- TraeCode also supports the portable `.agents/skills/` convention when **Enable .agents Skills Directory** is turned on in its import settings. Treat project MCP configuration as executable workspace configuration and enable it only in repositories you trust. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
408
+ TraeCode also supports the portable `.agents/skills/` convention when **Enable .agents Skills Directory** is turned on in its import settings. Treat project MCP configuration as executable workspace configuration and enable it only in repositories you trust. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
400
409
 
401
410
  ### OpenClaw
402
411
 
@@ -409,11 +418,11 @@ npx -y skills@latest add AKzar1el/god-prompt-mcp --skill god-prompt --agent open
409
418
  The copied skill lands under `.agents/skills/god-prompt/`, one of OpenClaw's documented project skill roots. To expose GodPrompt's callable tools to OpenClaw-managed agent runtimes as well, register the published stdio server:
410
419
 
411
420
  ```bash
412
- openclaw mcp add god-prompt --command npx --arg -y --arg god-prompt-mcp@1.3.0
421
+ openclaw mcp add god-prompt --command npx --arg -y --arg god-prompt-mcp@1.4.1
413
422
  openclaw mcp probe god-prompt
414
423
  ```
415
424
 
416
- `mcp probe` opens a live MCP connection and reports the discovered capabilities, making it a direct verification step after registration. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
425
+ `mcp probe` opens a live MCP connection and reports the discovered capabilities, making it a direct verification step after registration. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
417
426
 
418
427
  ### Qoder
419
428
 
@@ -430,13 +439,13 @@ The Qoder target installs the skill under `.qoder/skills/god-prompt/`, where Qod
430
439
  "mcpServers": {
431
440
  "god-prompt": {
432
441
  "command": "npx",
433
- "args": ["-y", "god-prompt-mcp@1.3.0"]
442
+ "args": ["-y", "god-prompt-mcp@1.4.1"]
434
443
  }
435
444
  }
436
445
  }
437
446
  ```
438
447
 
439
- Qoder requires approval before using project-level MCP servers by default. After adding or changing the server, start a new session or run `/mcp reload`, then use `/mcp` to verify the connection. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
448
+ Qoder requires approval before using project-level MCP servers by default. After adding or changing the server, start a new session or run `/mcp reload`, then use `/mcp` to verify the connection. The Agent Skill supplies the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
440
449
 
441
450
  ### Qwen Code
442
451
 
@@ -459,7 +468,7 @@ This installs GodPrompt under `.qwen/skills/god-prompt/`, where Qwen Code can di
459
468
  }
460
469
  ```
461
470
 
462
- Restart Qwen Code after changing MCP configuration, then open `/mcp` to verify the server. The Agent Skill provides the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
471
+ Restart Qwen Code after changing MCP configuration, then open `/mcp` to verify the server. The Agent Skill provides the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
463
472
 
464
473
  ### Kimi Code
465
474
 
@@ -470,7 +479,7 @@ Kimi Code CLI can install GodPrompt as one native custom plugin containing the e
470
479
  /reload
471
480
  ```
472
481
 
473
- The Kimi manifest points at `skills/`, so the `god-prompt` skill remains available through Kimi's normal relevance-based skill loading instead of being forced into every session. The same manifest exposes `god-prompt-mcp@1.3.0` as a local stdio MCP server, including the seventeen public tools available in v1.2.0. The explicit `tree/main` URL matters because Kimi's bare GitHub-repository install form prefers the latest GitHub release; using `main` makes the current plugin manifest available without forcing a documentation-only npm/MCP Registry release. Node.js 22+ is required for the MCP server.
482
+ The Kimi manifest points at `skills/`, so the `god-prompt` skill remains available through Kimi's normal relevance-based skill loading instead of being forced into every session. The same manifest exposes `god-prompt-mcp@1.4.1` as a local stdio MCP server, including the 22 public tools available in v1.4.1. The explicit `tree/main` URL matters because Kimi's bare GitHub-repository install form prefers the latest GitHub release; using `main` makes the current plugin manifest available without forcing a documentation-only npm/MCP Registry release. Node.js 22+ is required for the MCP server.
474
483
 
475
484
  ### JetBrains AI Assistant
476
485
 
@@ -508,7 +517,7 @@ If you only want the portable skill, place the complete skill directory at `.age
508
517
  devin mcp add god-prompt -- npx -y god-prompt-mcp
509
518
  ```
510
519
 
511
- Run `devin mcp list` to verify the direct server registration. The Agent Skill provides the reusable workflow while MCP exposes GodPrompt's seventeen public tools in v1.2.1. Node.js 22+ is required for the MCP server.
520
+ Run `devin mcp list` to verify the direct server registration. The Agent Skill provides the reusable workflow while MCP exposes GodPrompt's 22 public tools in v1.4.1. Node.js 22+ is required for the MCP server.
512
521
 
513
522
  ### Cursor
514
523
 
@@ -628,6 +637,21 @@ Project page: [GodPrompt — AI software-development system prompt](https://tomi
628
637
 
629
638
  Related MCP servers: [Google Search Console](https://github.com/AKzar1el/mcp-gsc) · [GEO Tracker](https://github.com/AKzar1el/mcp-geo) · [Web Validator](https://github.com/AKzar1el/mcp-web-validator) · [Google News & Trends](https://github.com/AKzar1el/mcp-trendpulse)
630
639
 
631
- ### P4 research and implementation preview (unreleased branch only)
640
+ ### P4 shipped in v1.3.0
641
+
642
+ The five P4 diagnostic tools listed above and the paired evaluation enhancements shipped in the versioned v1.3.0 source, npm and MCP Registry release. The reproducible 74-case legacy fixture corpus was retained, with additional independent synthetic holdout cases. All evidence remains advisory and unverified unless separately authenticated by the host. See [P4 release documentation](docs/roadmaps/godprompt-p4-agent-quality-20261120.md).
643
+
644
+
645
+ ### Unpublished combined OpenAI Skill + MCP preview
646
+
647
+ The reviewed combined OpenAI plugin source is now in `distribution/openai/` on `main`, while the published marketplace listing remains unchanged. It contains the existing scoped Skill plus a **single remote MCP** declaration for the current 22 public GodPrompt v1.3.0 tools. Two metadata formats (portable `mcp.json` and Codex compatibility `.mcp.json`) describe the same URL; they are not separate services. A dedicated GitHub workflow builds an **unpublished review ZIP** and validates the hosted tool list and a read-only call. The currently published OpenAI directory listing remains Skill-only until its separate reviewed update. See `docs/qa/godprompt-openai-combined-preview-20261120.md`.
648
+
649
+ ### P5 — local intelligence, benchmark and optional visualization
650
+
651
+ After installing the versioned Node 22+ npm distribution, the local-only repo mapper can generate a compact import/export graph **without transmitting source code**. For example, in a working directory you already own, run `godprompt-repo-map C:/path/to/authorized-repo src/example.ts` (change paths to match your checkout). The JSON output is heuristic: dynamic imports, aliases, symlink/hardlink relationships and test coverage still require review.
652
+
653
+ To collate verification receipts, use `godprompt-proof pack --contract contract.json --repo OWNER/REPO --sha EXACT40CHAR_COMMIT --map checks.json`, optionally with `--snapshot connector-export.json` and `--codexify codexify-export.json`. It reuses the existing evidence adapters, never executes a test or approves a release, and does not turn self-reported results into authenticated proof.
654
+
655
+ The [paired benchmark](benchmarks/agent-ab/README.md) generates deterministic matched-task order and scoring, and includes twelve independently failing microtask tests as initial grading fixtures. It **does not run models** or claim causal productivity gains. [P5 design, security and limits](docs/roadmaps/godprompt-p5-quality-intelligence-20261120.md).
632
656
 
633
- Development branch P4 adds five more public-facing read-only tools to Worker and stdio source: audit_agent_trajectory, trace_change_impact, review_mcp_tool_contracts, audit_agent_instructions and design_adversarial_tests. These analyze only bounded caller-supplied metadata, schemas or constraints; they do not execute tools, read repositories, authenticate receipts, or authorize completion. P4 also proposes paired-evaluation uncertainty fields. This text documents an unreleased branch: the currently published 1.2.1 package and live Worker still expose the 17 released tools until a separate versioned release. See docs/roadmaps/godprompt-p4-agent-quality-20261120.md.
657
+ MCP Apps-compatible clients can optionally present read-only, keyboard-accessible trajectory and impact reports through `ui://godprompt/evidence-review.html`. Text and `structuredContent` remain available to clients without MCP Apps and remain the basis for verification. No remote repository access or automatic policy execution has been added to the Worker.
@@ -215,6 +215,60 @@ export async function githubSnapshotEvidence({ repo, sha, contract, mapping = {}
215
215
  bundle.gaps.push("CONNECTOR_SNAPSHOT_PROVENANCE_NOT_AUTHENTICATED");
216
216
  return bundle;
217
217
  }
218
+ /**
219
+ * One opt-in evidence collection call. Reuses the existing pinned GitHub and
220
+ * Codexify adapters; does not execute commands, merge scopes or authenticate text.
221
+ */
222
+ export async function combinedEvidence({
223
+ repo, sha, contract, mapping={}, pr=null, codexifyExport=null, snapshot=null, fetchImpl=fetch,
224
+ }) {
225
+ const valid=validateWorkContractEnvelope(contract);
226
+ if(!repo || !sha) fail("Combined evidence requires a pinned GitHub repository and commit");
227
+ const github=snapshot
228
+ ? await githubSnapshotEvidence({repo,sha,contract:valid,mapping,pr,snapshot})
229
+ : await githubEvidence({repo,sha,contract:valid,mapping,pr,fetchImpl});
230
+ const codex=codexifyExport===null ? null :
231
+ await codexifyEvidence({contract:valid,exportData:codexifyExport});
232
+ const gaps=[...github.gaps.map(x=>"github:"+x),...(codex?.gaps??[]).map(x=>"codexify:"+x)];
233
+ const files=[...new Set([...(github.review_input.changed_files??[]),
234
+ ...(codex?.review_input?.changed_files??[])])].sort();
235
+ if(files.length>150) fail("Combined changed file list exceeds review safety limit");
236
+ const grouped=new Map();
237
+ for(const source of [{key:"github",checks:github.review_input.checks},
238
+ ...(codex?[{key:"codexify",checks:codex.review_input.checks}]:[])]) {
239
+ for(const check of source.checks) {
240
+ if(!grouped.has(check.id))grouped.set(check.id,[]);
241
+ grouped.get(check.id).push({...check,provider:source.key});
242
+ }
243
+ }
244
+ const checks=[];
245
+ for(const expected of valid.verification_commands) {
246
+ const options=grouped.get(expected.id)??[];
247
+ if(!options.length){gaps.push("CHECK_NOT_OBSERVED:"+expected.id);continue;}
248
+ if(options.some(x=>x.command!==expected.command)||options.some(x=>x.exit_code!==options[0].exit_code)){
249
+ checks.push({id:expected.id,command:expected.command,exit_code:null,
250
+ source:"self_report",evidence_excerpt:"Multiple sources disagree on command or exit status; reconcile original receipts."});
251
+ gaps.push("CHECK_EVIDENCE_CONFLICT:"+expected.id);
252
+ continue;
253
+ }
254
+ const best=options.find(x=>x.source==="tool_output")??options[0];
255
+ checks.push({id:expected.id,command:expected.command,exit_code:best.exit_code,
256
+ source:best.source,evidence_excerpt:"Concordant "+options.map(x=>x.provider).join("+")+
257
+ " receipt; matched contract VC ID. Original outputs and execution must still be verified independently."});
258
+ if(best.source!=="tool_output")gaps.push("CHECK_NOT_STRUCTURED:"+expected.id);
259
+ }
260
+ return {
261
+ ...makeBundle("combined_github_codexify",valid,files,checks,gaps,{
262
+ provider:"combined_local_collectors",
263
+ github:github.provenance,
264
+ codexify:codex ? codex.provenance : null,
265
+ commit_sha:sha,
266
+ }),
267
+ observed_sources:codex ? 2 : 1,
268
+ receipt_conflicts:gaps.filter(x=>x.startsWith("CHECK_EVIDENCE_CONFLICT:")).length,
269
+ };
270
+ }
271
+
218
272
  function filePath(env = process.env) {
219
273
  if (env.GODPROMPT_FEEDBACK_FILE) {
220
274
  if (!isAbsolute(env.GODPROMPT_FEEDBACK_FILE)) fail("GODPROMPT_FEEDBACK_FILE must be an absolute path");
@@ -506,13 +560,14 @@ function parseOptions(argv) {
506
560
  github: ["repo", "sha", "contract", "map", "pr"],
507
561
  "github-snapshot": ["repo", "sha", "contract", "map", "snapshot", "pr"],
508
562
  codexify: ["contract", "export"],
563
+ pack: ["contract","repo","sha","map","pr","snapshot","codexify"],
509
564
  learn: ["project", "outcome", "pattern", "lesson", "verified"],
510
565
  lessons: ["project"],
511
566
  "learn-review": ["project", "review"],
512
567
  metrics: ["project", "days"],
513
568
  workflow: ["project", "type", "risk", "min-reports", "format"],
514
569
  };
515
- if (!allowed[command]) fail("Usage: godprompt-proof github|github-snapshot|codexify|learn|learn-review|lessons|metrics|workflow [--name value ...]");
570
+ if (!allowed[command]) fail("Usage: godprompt-proof github|github-snapshot|codexify|pack|learn|learn-review|lessons|metrics|workflow [--name value ...]");
516
571
  for (const key of Object.keys(opts)) if (!allowed[command].includes(key)) fail("Unknown option --" + key);
517
572
  return { command, opts };
518
573
  }
@@ -546,6 +601,16 @@ export async function cli(argv = process.argv.slice(2)) {
546
601
  exportData: await readSmallJson(opts.export),
547
602
  });
548
603
  }
604
+ if(command==="pack"){
605
+ if(!opts.contract||!opts.repo||!opts.sha)fail("pack requires --contract --repo --sha");
606
+ return combinedEvidence({
607
+ contract:validateWorkContractEnvelope(await readSmallJson(opts.contract)),
608
+ repo:opts.repo,sha:opts.sha,pr:opts.pr?Number(opts.pr):null,
609
+ mapping:opts.map?await readSmallJson(opts.map):{},
610
+ snapshot:opts.snapshot?await readSmallJson(opts.snapshot):null,
611
+ codexifyExport:opts.codexify?await readSmallJson(opts.codexify):null,
612
+ });
613
+ }
549
614
  if (command === "learn-review") {
550
615
  if (!opts.project || !opts.review) fail("learn-review requires --project --review");
551
616
  return learnFromReview({ project: opts.project, review: await readSmallJson(opts.review) });
@@ -0,0 +1,133 @@
1
+ #!/usr/bin/env node
2
+ /** Local, opt-in, non-executing repository map. Static import matching is not semantic AST parsing. */
3
+ import { readdir, lstat, readFile, realpath } from "node:fs/promises";
4
+ import { resolve, relative, dirname, extname, posix, sep, join } from "node:path";
5
+ import { pathToFileURL } from "node:url";
6
+ const DENY_DIRS=new Set([".git",".hg","node_modules","vendor",".next","dist","build","coverage",".cache","tmp"]);
7
+ const CODE_EXTS=new Set([".ts",".tsx",".js",".jsx",".mjs",".cjs",".mts",".cts"]);
8
+ const ID=/^[A-Za-z0-9_./-]{1,240}$/;
9
+ const LIMIT_FILES=700, LIMIT_PER_FILE=64*1024, LIMIT_TOTAL=3*1024*1024;
10
+ const bail=(msg)=>{throw new Error(msg)};
11
+ function safeRel(p) {
12
+ return typeof p==="string" && ID.test(p) && !p.startsWith("/") &&
13
+ !p.split("/").includes("..") && !p.split("/").includes(".") && !p.includes("\\");
14
+ }
15
+ function normalize(root,path) {
16
+ const rel=relative(root,path).split(sep).join("/");
17
+ return rel && safeRel(rel) ? rel : null;
18
+ }
19
+ function imports(text) {
20
+ const found=new Set();
21
+ const patterns=[
22
+ /\b(?:import|export)\s+(?:[\s\S]{0,400}?\s+from\s*)?["'](\.{1,2}\/[^"'\r\n]{1,220})["']/g,
23
+ /\brequire\s*\(\s*["'](\.{1,2}\/[^"'\r\n]{1,220})["']\s*\)/g,
24
+ /\bimport\s*\(\s*["'](\.{1,2}\/[^"'\r\n]{1,220})["']\s*\)/g,
25
+ ];
26
+ for(const re of patterns) {
27
+ let m,count=0;
28
+ while((m=re.exec(text))&&count++<300)found.add(m[1]);
29
+ }
30
+ return [...found];
31
+ }
32
+ function symbols(text) {
33
+ const out=new Set();
34
+ const regex=/^\s*export\s+(?:default\s+)?(?:async\s+)?(?:function|class|interface|type|enum|const)\s+([A-Za-z_$][\w$]{0,80})/gm;
35
+ let m;
36
+ while((m=regex.exec(text))&&out.size<60)out.add(m[1]);
37
+ return [...out].sort();
38
+ }
39
+ function resolveImport(consumer, spec, available) {
40
+ const base=posix.normalize(posix.join(posix.dirname(consumer),spec));
41
+ if(!safeRel(base))return null;
42
+ // TypeScript NodeNext commonly imports './module.js' while source is './module.ts'.
43
+ // Prefer an exact runtime file if present; only fall back to matching TS source.
44
+ const extension=posix.extname(base);
45
+ const sourceExtensions={
46
+ ".js":[".ts",".tsx"],".jsx":[".tsx"],".mjs":[".mts"],".cjs":[".cts"],
47
+ };
48
+ const alternatives=(sourceExtensions[extension]??[]).map(ext=>base.slice(0,-extension.length)+ext);
49
+ const variants=[base,...alternatives,...[...CODE_EXTS].map(ext=>base+ext),
50
+ ...["index.ts","index.tsx","index.js","index.mjs"].map(x=>base+"/"+x)];
51
+ return variants.find(x=>available.has(x))??null;
52
+ }
53
+ export async function mapRepository({root,changed_files=[],max_files=LIMIT_FILES}={}) {
54
+ if(typeof root!=="string"||!root.trim())bail("Explicit repository root required");
55
+ if(!Number.isInteger(max_files)||max_files<1||max_files>LIMIT_FILES)bail("max_files must be 1..700");
56
+ if(!Array.isArray(changed_files)||changed_files.length<1||changed_files.length>50||
57
+ changed_files.some(x=>!safeRel(x)))bail("Supply 1..50 safe relative changed_files");
58
+ const base=await realpath(resolve(root));
59
+ if(!(await lstat(base)).isDirectory())bail("Root must be a regular directory");
60
+ let bytes=0,skipped=0,skipped_links=0,oversized=0;
61
+ const files=[];
62
+ const stack=[base];
63
+ let directoryCount=0;
64
+ while(stack.length){
65
+ const dir=stack.pop();
66
+ const directoryReal=await realpath(dir);
67
+ if(directoryReal!==base&&!directoryReal.startsWith(base+sep)){skipped_links++;continue;}
68
+ if(++directoryCount>1000){skipped++;break;}
69
+ const entries=await readdir(dir,{withFileTypes:true});
70
+ entries.sort((a,b)=>a.name.localeCompare(b.name));
71
+ for(const entry of entries){
72
+ if(entry.name.startsWith(".") && entry.name!==".github")continue;
73
+ const abs=join(dir,entry.name);
74
+ if(entry.isSymbolicLink()){skipped_links++;continue;}
75
+ if(entry.isDirectory()){
76
+ if(!DENY_DIRS.has(entry.name) && stack.length<1000)stack.push(abs);
77
+ continue;
78
+ }
79
+ if(!entry.isFile() || !CODE_EXTS.has(extname(entry.name)))continue;
80
+ const info=await lstat(abs);
81
+ if(!info.isFile() || info.nlink>1){skipped_links++;continue;}
82
+ if(info.size>LIMIT_PER_FILE){oversized++;continue;}
83
+ const rel=normalize(base,abs);
84
+ if(!rel){skipped++;continue;}
85
+ if(files.length>=max_files || bytes+info.size>LIMIT_TOTAL){skipped++;continue;}
86
+ bytes+=info.size;
87
+ files.push({path:rel,abs});
88
+ }
89
+ }
90
+ files.sort((a,b)=>a.path.localeCompare(b.path));
91
+ const available=new Set(files.map(x=>x.path));
92
+ const dependencies=[];
93
+ const outputSymbols=[];
94
+ const proposedTests=[];
95
+ const changes=[...new Set(changed_files)];
96
+ let unresolved=0;
97
+ for(const file of files) {
98
+ // No source content leaves the output; ignore injected instructions in comments.
99
+ const code=await readFile(file.abs,"utf8");
100
+ const edges=new Set();
101
+ for(const ref of imports(code)){
102
+ const target=resolveImport(file.path,ref,available);
103
+ if(target && target!==file.path)edges.add(target);
104
+ else unresolved++;
105
+ }
106
+ for(const target of [...edges].sort())dependencies.push({consumer:file.path,dependency:target});
107
+ if(changes.includes(file.path))outputSymbols.push({path:file.path,exports:symbols(code)});
108
+ if(/(?:^|\/)[^/]+\.(?:test|spec)\.[cm]?[jt]sx?$/.test(file.path)){
109
+ const relevant=[...edges].filter(x=>changes.includes(x));
110
+ if(relevant.length)proposedTests.push({test_file:file.path,imports_changed_files:relevant});
111
+ }
112
+ }
113
+ return {
114
+ status:skipped||oversized||skipped_links?"PARTIAL_STATIC_MAP":"STATIC_MAP_ONLY",
115
+ schema:"godprompt.local_code_map.v1",
116
+ changed_files:changes,dependencies:dependencies.slice(0,3500),
117
+ changed_file_exports:outputSymbols,
118
+ candidate_test_imports:proposedTests.slice(0,100),
119
+ files_scanned:files.length,bytes_scanned:bytes,unresolved_relative_imports:unresolved,
120
+ skipped_files:skipped,oversized_files:oversized,skipped_links,
121
+ truncated:dependencies.length>3500 || proposedTests.length>100||skipped>0,
122
+ remote_transmission:false,independently_verified:false,
123
+ warning:"Local static import and export heuristics, NOT a TypeScript/JavaScript AST or proof of test coverage. No code content is returned. Check dynamic imports, path aliases, joins and file links independently. Use dependencies only as caller-supplied graph for trace_change_impact.",
124
+ };
125
+ }
126
+ async function main(args){
127
+ if(args.length<2||args.length>51)bail("Usage: godprompt-repo-map ROOT CHANGED_FILE [CHANGED_FILE...]");
128
+ return mapRepository({root:args[0],changed_files:args.slice(1)});
129
+ }
130
+ if(process.argv[1]&&import.meta.url===pathToFileURL(resolve(process.argv[1])).href) {
131
+ main(process.argv.slice(2)).then(v=>process.stdout.write(JSON.stringify(v,null,2)+"\n"))
132
+ .catch(()=>{process.stderr.write("Unable to map bounded local codebase; check root and scope.\n");process.exitCode=1;});
133
+ }
@@ -1,3 +1,4 @@
1
+ import { QUALITY_UI_URI } from "./quality-view.js";
1
2
  import * as z from "zod/v4";
2
3
  export const TrajectoryEventSchema = z.object({
3
4
  id: z.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),
@@ -7,15 +8,23 @@ export const TrajectoryEventSchema = z.object({
7
8
  status: z.enum(["ok", "failed", "skipped", "unknown"]).optional(),
8
9
  scope: z.enum(["allowed", "outside", "unknown"]).optional(),
9
10
  fingerprint: z.string().regex(/^[A-Za-z0-9_.:-]{1,80}$/).optional(),
11
+ tokens: z.number().int().min(0).max(200_000).optional(),
10
12
  }).strict();
11
13
  export const TrajectoryInputSchema = z.object({
12
14
  events: z.array(TrajectoryEventSchema).min(1).max(150),
15
+ budget_tokens: z.number().int().min(1).max(2_000_000).optional(),
13
16
  }).strict();
14
17
  const hint = (code, severity, event_index, recommendation) => ({ code, severity, event_index, recommendation });
15
- export function auditAgentTrajectory(events) {
18
+ export function auditAgentTrajectory(events, budget_tokens) {
16
19
  const findings = [];
17
20
  const IDs = new Set();
18
21
  const failing = new Map();
22
+ const redundantReads = new Map();
23
+ let uncheckedWrites = 0;
24
+ let reportedTokens = 0;
25
+ let eventsWithTokens = 0;
26
+ let budgetReported = false;
27
+ let latestCheckOutcome = null;
19
28
  let writes = 0;
20
29
  let verification = 0;
21
30
  let lastWrite = -1;
@@ -27,6 +36,25 @@ export function auditAgentTrajectory(events) {
27
36
  if (IDs.has(event.id))
28
37
  findings.push(hint("DUPLICATE_EVENT_ID", "medium", position, "Provide unique event identifiers before trusting the trajectory."));
29
38
  IDs.add(event.id);
39
+ if (event.tokens !== undefined) {
40
+ reportedTokens += event.tokens;
41
+ eventsWithTokens++;
42
+ if (!budgetReported && budget_tokens !== undefined && reportedTokens > budget_tokens) {
43
+ budgetReported = true;
44
+ findings.push(hint("TOKEN_BUDGET_EXCEEDED_REPORTED", "medium", position, "Review reported token spend and scope; stop avoidable exploration without skipping necessary verification."));
45
+ }
46
+ }
47
+ if (event.kind === "decision" || (event.operation === "write" && event.status === "ok"))
48
+ redundantReads.clear();
49
+ if (event.kind === "tool_result" && event.operation === "read" && event.status === "ok" && event.fingerprint) {
50
+ const key = (event.tool ?? "unnamed") + ":" + event.fingerprint;
51
+ const count = (redundantReads.get(key) ?? 0) + 1;
52
+ redundantReads.set(key, count);
53
+ if (count === 4)
54
+ findings.push(hint("REPEATED_UNCHANGED_READ", "low", position, "Consider caching or reusing this reported identical read; polling may be legitimate."));
55
+ }
56
+ if (event.kind === "verification" || event.operation === "verify")
57
+ latestCheckOutcome = event.status ?? "unknown";
30
58
  if (event.operation === "write" && event.scope === "outside" &&
31
59
  event.kind === "tool_result" && event.status === "ok") {
32
60
  findings.push(hint("OUT_OF_SCOPE_WRITE_REPORTED", "high", position, "Reconcile the successful reported write with the approved task scope."));
@@ -41,17 +69,23 @@ export function auditAgentTrajectory(events) {
41
69
  if (event.kind === "tool_result" && event.operation === "write" && event.status === "ok") {
42
70
  writes++;
43
71
  lastWrite = i;
72
+ uncheckedWrites++;
73
+ if (uncheckedWrites === 12)
74
+ findings.push(hint("LONG_UNCHECKED_WRITE_STREAK", "low", position, "Consider a focused checkpoint to catch regressions before more changes."));
44
75
  }
45
76
  if ((event.kind === "verification" || event.operation === "verify") && event.status === "ok") {
46
77
  verification++;
47
78
  lastCheck = i;
79
+ uncheckedWrites = 0;
48
80
  }
49
81
  if (event.kind === "completion") {
50
82
  completed++;
51
- if (lastCheck < lastWrite || lastCheck < 0)
83
+ if (lastCheck < lastWrite || lastCheck < 0 || latestCheckOutcome !== "ok")
52
84
  findings.push(hint("PREMATURE_COMPLETION", "high", position, "Obtain current verification evidence before claiming completion."));
53
85
  }
54
86
  }
87
+ if (completed > 0 && latestCheckOutcome === "failed")
88
+ findings.push(hint("FAILED_FINAL_VERIFICATION", "high", events.length, "The latest reported verification failed; do not claim completion."));
55
89
  if (writes > 0 && lastCheck < 0)
56
90
  findings.push(hint("MISSING_VERIFICATION", "high", events.length, "Capture a real post-change check; event reports are not independently authenticated."));
57
91
  else if (writes > 0 && lastCheck < lastWrite)
@@ -64,6 +98,8 @@ export function auditAgentTrajectory(events) {
64
98
  reported_writes: writes,
65
99
  reported_successful_verifications: verification,
66
100
  reported_completions: completed,
101
+ reported_tokens: eventsWithTokens ? reportedTokens : null,
102
+ token_budget: budget_tokens ?? null,
67
103
  independently_verified: false,
68
104
  completion_authorized: false,
69
105
  warning: "Caller-supplied event metadata is unverified. No logs, commands or file contents were accessed or replayed.",
@@ -74,6 +110,7 @@ export const TrajectoryOutputSchema = z.object({
74
110
  findings: z.array(z.object({ code: z.string(), severity: z.enum(["high", "medium", "low"]), event_index: z.number().int(), recommendation: z.string() }).strict()),
75
111
  truncated: z.boolean(), events_reviewed: z.number().int(), reported_writes: z.number().int(),
76
112
  reported_successful_verifications: z.number().int(), reported_completions: z.number().int(),
113
+ reported_tokens: z.number().int().nullable(), token_budget: z.number().int().nullable(),
77
114
  independently_verified: z.literal(false), completion_authorized: z.literal(false), warning: z.string(),
78
115
  }).strict();
79
116
  export function registerTrajectoryTool(server) {
@@ -83,8 +120,9 @@ export function registerTrajectoryTool(server) {
83
120
  inputSchema: TrajectoryInputSchema.shape,
84
121
  outputSchema: TrajectoryOutputSchema.shape,
85
122
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
86
- }, async ({ events }) => {
87
- const output = auditAgentTrajectory(events);
123
+ _meta: { ui: { resourceUri: QUALITY_UI_URI } },
124
+ }, async ({ events, budget_tokens }) => {
125
+ const output = auditAgentTrajectory(events, budget_tokens);
88
126
  return { structuredContent: output, content: [{ type: "text", text: JSON.stringify(output) }] };
89
127
  });
90
128
  }
@@ -1,5 +1,7 @@
1
+ import { QUALITY_UI_URI } from "./quality-view.js";
1
2
  import * as z from "zod/v4";
2
- const file = z.string().trim().min(1).max(240).regex(/^(?!\/)(?!.*(?:^|\/)\.\.(?:\/|$))[A-Za-z0-9_.\/-]+$/);
3
+ const file = z.string().trim().min(1).max(240).refine(value => /^[A-Za-z0-9_.\/-]+$/.test(value) && !value.startsWith("/") &&
4
+ value.split("/").every(segment => segment.length > 0 && segment !== "." && segment !== ".."), "Supply a safe nonempty relative file path without traversal or empty segments.");
3
5
  const id = z.string().regex(/^[A-Za-z0-9_.-]{1,64}$/);
4
6
  const files = z.array(file).max(25);
5
7
  export const ImpactSchema = z.object({
@@ -124,6 +126,7 @@ export function registerImpactTool(server) {
124
126
  inputSchema: ImpactSchema.shape,
125
127
  outputSchema: ImpactOutputSchema.shape,
126
128
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
129
+ _meta: { ui: { resourceUri: QUALITY_UI_URI } },
127
130
  }, async (args) => {
128
131
  const output = traceChangeImpact(ImpactSchema.parse(args));
129
132
  return { structuredContent: output, content: [{ type: "text", text: JSON.stringify(output) }] };
@@ -43,8 +43,11 @@ export function auditAgentInstructions(instructions) {
43
43
  recommendation: "Deduplicate overlapping agent rules or reference the canonical policy." });
44
44
  else
45
45
  seen.set(normalized, ix);
46
+ const overrideEarlier = /\b(?:ignore|disregard|override)\s+(?:all\s+)?(?:prior|previous|earlier)\s+(?:(?:system|developer|project|safety|user)\s+)?instructions?\b/i.test(line);
47
+ const prohibitOverride = /\b(?:do\s+not|don't|never|must\s+not|should\s+not)\s+(?:ignore|disregard|override)\b/i.test(line);
46
48
  if (/\b(?:skip|bypass|ignore)\s+(?:all\s+)?(?:tests|verification|approvals?)\b/i.test(line) ||
47
- /\b(?:do anything|without any approval)\b/i.test(line)) {
49
+ /\b(?:do anything|without any approval)\b/i.test(line) ||
50
+ (overrideEarlier && !prohibitOverride)) {
48
51
  hints.push({ code: "RISKY_OVERRIDING_INSTRUCTION", severity: "high", source_indices: [ix],
49
52
  recommendation: "Reconcile any blanket bypass with project safety and approval requirements." });
50
53
  }
@@ -0,0 +1,8 @@
1
+ /** Optional MCP Apps UI; text-only clients still receive ordinary tool results. */
2
+ export const QUALITY_UI_URI = "ui://godprompt/evidence-review.html";
3
+ export const QUALITY_UI_MIME = "text/html;profile=mcp-app";
4
+ export const QUALITY_UI_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n<meta http-equiv=\"Content-Security-Policy\" content=\"default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src 'none'; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'\">\n<title>GodPrompt Evidence Review</title>\n<style>\n:root{color-scheme:light dark;font:14px/1.5 system-ui,sans-serif}\n*{box-sizing:border-box}body{margin:0;padding:14px;color:CanvasText;background:Canvas}\nh1{font-size:1.08rem;margin:0 0 4px}p{margin:2px 0 8px;color:GrayText}\nheader{border-bottom:1px solid GrayText;padding-bottom:10px;margin-bottom:10px}\n.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:7px;margin:10px 0}\n.stat{border:1px solid GrayText;border-radius:8px;padding:8px}.stat strong{display:block;font-size:1.08rem}\n.controls{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:10px 0}\nbutton,input{font:inherit;border:1px solid GrayText;border-radius:6px;padding:5px 8px;color:CanvasText;background:Canvas}\nbutton[aria-pressed=\"true\"]{font-weight:700;outline:2px solid Highlight}\ninput{max-width:100%;flex:1;min-width:130px}\nh2{font-size:1rem;margin:14px 0 5px}\nol,ul{list-style:none;padding:0;margin:0}\nli{margin:4px 0;padding:6px;border-inline-start:3px solid GrayText;background:Canvas;border-radius:4px}\nli.high{border-inline-start-color:#d94646}\nli.medium{border-inline-start-color:#cc8a00}\nli.low{border-inline-start-color:#4f8c8d}\nsmall{color:GrayText}\ncode{overflow-wrap:anywhere}#status{font-weight:650}\n.empty{padding:12px;border:1px dashed GrayText;border-radius:8px}\n</style>\n</head>\n<body>\n<header><h1>GodPrompt · evidence review</h1>\n<p>Read-only, advisory analysis. Supplied results are not independent verification or authorization.</p>\n<div id=\"status\" role=\"status\" aria-live=\"polite\">Connecting to MCP Apps host…</div></header>\n<div class=\"stats\" id=\"stats\"></div>\n<div class=\"controls\">\n<label for=\"query\">Filter</label><input id=\"query\" type=\"search\" placeholder=\"Filter by code or path\" autocomplete=\"off\">\n<button id=\"all\" aria-pressed=\"true\">All</button><button id=\"high\" aria-pressed=\"false\">High</button>\n<button id=\"medium\" aria-pressed=\"false\">Medium</button><button id=\"low\" aria-pressed=\"false\">Low</button>\n</div>\n<section aria-label=\"Findings\"><h2>Findings</h2><ol id=\"findings\"><li class=\"empty\">No result received.</li></ol></section>\n<section aria-label=\"Affected file graph\"><h2>Affected files &amp; dependency paths</h2><ul id=\"graph\"><li class=\"empty\">Graph available for impact reports.</li></ul></section>\n<script>\n\"use strict\";\n(function(){\n const $=id=>document.getElementById(id);\n const state={data:null,filter:\"all\",query:\"\",connected:false};\n function clear(el){while(el.firstChild)el.removeChild(el.firstChild);}\n function item(where,heading,details,severity){\n const li=document.createElement(\"li\");\n if([\"high\",\"medium\",\"low\"].includes(severity))li.className=severity;\n const strong=document.createElement(\"strong\");strong.textContent=String(heading).slice(0,280);li.appendChild(strong);\n if(details){const text=document.createElement(\"div\");text.textContent=String(details).slice(0,600);li.appendChild(text);}\n where.appendChild(li);\n }\n function metric(label,value){\n const div=document.createElement(\"div\");div.className=\"stat\";\n const t=document.createElement(\"small\");t.textContent=label;\n const v=document.createElement(\"strong\");v.textContent=String(value);\n div.appendChild(t);div.appendChild(v);$(\"stats\").appendChild(div);\n }\n function render(){\n const d=state.data;\n if(!d){$(\"status\").textContent=state.connected?\"Waiting for tool result…\":\"Host not initialized.\";return;}\n $(\"status\").textContent=String(d.status??\"REPORTED_ADVISORY\").slice(0,90);\n clear($(\"stats\"));metric(\"Independently verified\",\"No\");\n if(typeof d.events_reviewed===\"number\")metric(\"Events\",d.events_reviewed);\n if(Array.isArray(d.affected_files))metric(\"Affected files\",d.affected_files.length);\n if(Array.isArray(d.recommended_tests))metric(\"Suggested tests\",d.recommended_tests.length);\n const findings=(Array.isArray(d.findings)?d.findings:Array.isArray(d.issues)?d.issues:[]).slice(0,80);\n clear($(\"findings\"));let shown=0;\n for(const f of findings){\n if(!f||typeof f!==\"object\")continue;\n const severity=String(f.severity??\"low\").toLowerCase();\n if(state.filter!==\"all\"&&state.filter!==severity)continue;\n const label=String(f.code??\"Unclassified\").slice(0,140);\n const details=String(f.recommendation??f.advice??f.reference??\"\").slice(0,600);\n if(state.query&&!((label+\" \"+details).toLowerCase().includes(state.query)))continue;\n item($(\"findings\"),label,details,severity);shown++;\n }\n if(!shown)item($(\"findings\"),\"No matching findings\",\"Try another filter.\",\"\");\n clear($(\"graph\"));\n let paths=0;\n for(const entry of (Array.isArray(d.affected_files)?d.affected_files:[]).slice(0,150)){\n if(!entry||typeof entry.path!==\"string\")continue;\n const label=entry.path.slice(0,220);\n if(state.query&&!label.toLowerCase().includes(state.query))continue;\n item($(\"graph\"),label,\"Depth \"+String(entry.depth??\"?\")+\" · linked via \"+String(entry.via??\"changed file\").slice(0,220),\"\");\n paths++;\n }\n if(!paths)item($(\"graph\"),\"No graph entries\",\"Dependency graph is optional and evidence-dependent.\",\"\");\n }\n for(const filter of [\"all\",\"high\",\"medium\",\"low\"]){\n $(filter).addEventListener(\"click\",()=>{state.filter=filter;for(const other of [\"all\",\"high\",\"medium\",\"low\"])$(other).setAttribute(\"aria-pressed\",String(other===filter));render();});\n }\n $(\"query\").addEventListener(\"input\",()=>{state.query=$(\"query\").value.toLowerCase().trim().slice(0,80);render();});\n window.addEventListener(\"message\",event=>{\n if(event.source!==window.parent)return;\n const msg=event.data;\n if(!msg||msg.jsonrpc!==\"2.0\")return;\n if(msg.id===1&&msg.result&&typeof msg.result===\"object\"){\n state.connected=true;\n window.parent.postMessage({jsonrpc:\"2.0\",method:\"ui/notifications/initialized\",params:{}},\"*\");\n render();\n }\n if(msg.method===\"ui/notifications/tool-result\"){\n const d=msg.params&&msg.params.structuredContent;\n if(d&&typeof d===\"object\"&&d.independently_verified===false){state.data=d;render();}\n else $(\"status\").textContent=\"Missing bounded structured result.\";\n }\n });\n window.parent.postMessage({jsonrpc:\"2.0\",id:1,method:\"ui/initialize\",\n params:{protocolVersion:\"2026-01-26\",clientInfo:{name:\"GodPrompt Evidence View\",version:\"1.0.0\"},appCapabilities:{availableDisplayModes:[\"inline\"]}}},\"*\");\n})();\n</script>\n</body>\n</html>";
5
+ export function registerQualityView(server) {
6
+ server.registerResource("godprompt-evidence-view", QUALITY_UI_URI, { mimeType: QUALITY_UI_MIME,
7
+ description: "Read-only interactive display of caller-supplied engineering findings and affected dependencies." }, async (resourceUri) => ({ contents: [{ uri: resourceUri.href, mimeType: QUALITY_UI_MIME, text: QUALITY_UI_HTML }] }));
8
+ }
package/dist/server.js CHANGED
@@ -3,7 +3,7 @@ import { CONTENT, VERSION } from "./content.js";
3
3
  import { CORE_SKILL } from "./skill-content.js";
4
4
  export const SERVER_INFO = {
5
5
  name: "god-prompt-mcp",
6
- version: "1.3.0",
6
+ version: "1.4.1",
7
7
  };
8
8
  export const SERVER_INSTRUCTIONS = "For scoped engineering tasks, use classify_task to route the work and get_tailored_guidance to load only the needed phase. Use get_core_skill if the entire core protocol is needed, not on every request. Use review_code_change, audit_requirements and build_test_matrix for bounded caller-supplied evidence and draft test planning. Use diagnose_failure, assess_release_readiness, create_context_handoff and compare_evaluation_runs only for their respective supplied-evidence workflows. Use audit_agent_trajectory, trace_change_impact, review_mcp_tool_contracts, audit_agent_instructions and design_adversarial_tests only with explicit caller-supplied bounded inputs; they produce unverified review hints or test ideas. None of these tools run external checks, authenticate evidence, authorize release or independently verify work. Load get_protocols, get_gates, or get_anti_patterns only when focused guidance is insufficient. Use get_god_prompt only when the full single-file payload is preferable; request bounded start/maxChars chunks if an MCP bridge truncates large responses. All GodPrompt tools are read-only.";
9
9
  const READ_ONLY_ANNOTATIONS = {
package/dist/stdio.js CHANGED
@@ -12,6 +12,7 @@ import { registerImpactTool } from "./change-impact.js";
12
12
  import { registerMcpContractAuditTool } from "./mcp-contract-audit.js";
13
13
  import { registerInstructionAuditTool } from "./instruction-audit.js";
14
14
  import { registerAdversarialPlanningTool } from "./adversarial-planning.js";
15
+ import { registerQualityView } from "./quality-view.js";
15
16
  import { registerCodexifyCheckpointTool, CODEXIFY_CHECKPOINT_INSTRUCTIONS, } from "./codexify-checkpoint.js";
16
17
  function checkpointOptIn() {
17
18
  // Only the local Node stdio entrypoint reads this exact opt-in. The Worker
@@ -37,6 +38,7 @@ function createServer() {
37
38
  registerMcpContractAuditTool(server);
38
39
  registerInstructionAuditTool(server);
39
40
  registerAdversarialPlanningTool(server);
41
+ registerQualityView(server);
40
42
  if (enabled)
41
43
  registerCodexifyCheckpointTool(server);
42
44
  registerGodPromptSkillExtension(server);
@@ -2,6 +2,18 @@ import * as z from "zod/v4";
2
2
  import { CONTENT } from "./content.js";
3
3
  const TYPES = ["BUILD", "DEBUG", "REFACTOR", "CONTENT", "DESIGN", "SHIP", "ANALYZE", "AUTOMATE", "PLAN"];
4
4
  const PHASES = ["plan", "execute", "verify", "handoff"];
5
+ /** Small goal-to-tool hints; never automatic tool invocation or permission. */
6
+ const TOOL_HINTS = {
7
+ BUILD: { plan: ["audit_requirements", "build_test_matrix", "create_work_contract"], execute: ["review_code_change", "trace_change_impact"], verify: ["review_work_evidence", "design_adversarial_tests"], handoff: ["create_context_handoff"] },
8
+ DEBUG: { plan: ["diagnose_failure", "create_work_contract"], execute: ["review_code_change", "audit_agent_trajectory"], verify: ["review_work_evidence", "trace_change_impact"], handoff: ["create_context_handoff"] },
9
+ REFACTOR: { plan: ["create_work_contract", "trace_change_impact"], execute: ["review_code_change", "audit_agent_trajectory"], verify: ["review_work_evidence", "build_test_matrix"], handoff: ["create_context_handoff"] },
10
+ CONTENT: { plan: ["audit_requirements"], execute: ["review_code_change"], verify: ["review_work_evidence"], handoff: ["create_context_handoff"] },
11
+ DESIGN: { plan: ["audit_requirements", "build_test_matrix"], execute: ["review_code_change"], verify: ["design_adversarial_tests", "review_work_evidence"], handoff: ["create_context_handoff"] },
12
+ SHIP: { plan: ["assess_release_readiness", "create_work_contract"], execute: ["trace_change_impact"], verify: ["assess_release_readiness", "review_work_evidence"], handoff: ["create_context_handoff"] },
13
+ ANALYZE: { plan: ["audit_requirements", "diagnose_failure"], execute: ["audit_agent_trajectory", "review_mcp_tool_contracts"], verify: ["review_work_evidence"], handoff: ["create_context_handoff"] },
14
+ AUTOMATE: { plan: ["audit_requirements", "review_mcp_tool_contracts"], execute: ["audit_agent_trajectory"], verify: ["build_test_matrix", "review_work_evidence"], handoff: ["create_context_handoff"] },
15
+ PLAN: { plan: ["audit_requirements"], execute: ["build_test_matrix"], verify: ["audit_requirements"], handoff: ["create_context_handoff"] },
16
+ };
5
17
  function headingSection(content, heading) {
6
18
  const lines = content.split("\n");
7
19
  const start = lines.findIndex((line) => line.trim() === `## ${heading}`);
@@ -47,6 +59,8 @@ export function getTailoredGuidance(taskType, phase, start = 0, maxChars = 1800)
47
59
  next_start: start + selected.length < text.length ? start + selected.length : null,
48
60
  total_chars: text.length,
49
61
  truncated: start + selected.length < text.length,
62
+ suggested_tools: start === 0 ? [...TOOL_HINTS[taskType][phase]] : [],
63
+ tool_selection_rule: start === 0 ? "Only use a suggested tool when the caller supplies appropriate bounded evidence; tools are optional, not automatically invoked." : null,
50
64
  warning: "Guidance only: the MCP did not inspect a codebase, execute checks, or verify results. Load additional chunks when truncated.",
51
65
  };
52
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "god-prompt-mcp",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
4
4
  "mcpName": "io.github.AKzar1el/god-prompt-mcp",
5
5
  "description": "GodPrompt MCP server + portable Agent Skill for coding agents — TDD, debugging, verification gates, task routing, and progressive disclosure.",
6
6
  "private": false,
@@ -18,6 +18,7 @@
18
18
  "dist/mcp-contract-audit.js",
19
19
  "dist/instruction-audit.js",
20
20
  "dist/adversarial-planning.js",
21
+ "dist/quality-view.js",
21
22
  "dist/codexify-evidence.js",
22
23
  "dist/codexify-host-audit.js",
23
24
  "dist/codexify-checkpoint.js",
@@ -25,12 +26,14 @@
25
26
  "dist/skills.js",
26
27
  "dist/content.js",
27
28
  "bin/godprompt-proof.mjs",
29
+ "bin/godprompt-repo-map.mjs",
28
30
  "README.md",
29
31
  "LICENSE"
30
32
  ],
31
33
  "bin": {
32
34
  "god-prompt-mcp": "dist/stdio.js",
33
- "godprompt-proof": "bin/godprompt-proof.mjs"
35
+ "godprompt-proof": "bin/godprompt-proof.mjs",
36
+ "godprompt-repo-map": "bin/godprompt-repo-map.mjs"
34
37
  },
35
38
  "repository": {
36
39
  "type": "git",