Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>PG Memory BankNew to Visual Studio Code? Get it now.
PG Memory Bank

PG Memory Bank

pgdigitalglobal

|
5 installs
| (0) | Free
Memory-bank governance and production-readiness checks in your editor. Code narration, security and frontend policy gates, and TapSign device-bound approval.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

PG Memory Bank

Governance, security checks and TapSign integration for your editor — and the command line, on macOS, Linux and Windows.

Installing this extension is the whole setup. The command-line tools and the TapSign MCP server ship inside it. Nothing to clone, no account, no payment.


Start here — pick one

⚡ Option A — You use a coding agent (fastest)

Using Claude Code, Codex, Copilot or similar? Copy the block below and paste it to your agent. It works even before you have set up your PATH, and the agent will explain everything it did.

Set up PG Memory Bank governance in this project.

Run this from the repository root:

  • Windows (PowerShell): powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\.pg-cli\pg.ps1" install backend --target "."
  • macOS / Linux: pwsh -ExecutionPolicy Bypass -File "$HOME/.pg-cli/pg.ps1" install backend --target "."

Use frontend instead of backend for a UI project.

Then report back to me, and cover all six:

  1. What you detected — project type, framework, whether this repo is existing/legacy or brand new, and the evidence for each.
  2. What you installed and why each file exists — one line per file, what it is for, not just its name.
  3. What you did NOT touch — files that already existed and were preserved.
  4. What you verified — run pg status and paste its real output. If it failed, say so.
  5. What I must do next.
  6. What you could not do, and why.

Rules: if this is an existing codebase, ground everything in this repo's own code and schema — invent nothing. Never overwrite an existing memory-bank file. Never report success without showing the verification output.

That is the whole setup. Skip Option B.

🔧 Option B — Manual setup (no agent)

1. Add the tools to your PATH (once per machine)

macOS / Linux — add to ~/.zshrc or ~/.bashrc:

export PATH="$HOME/.pg-cli:$PATH"

Windows — run this in PowerShell (it sets your user PATH permanently):

[Environment]::SetEnvironmentVariable(
    'Path',
    ([Environment]::GetEnvironmentVariable('Path','User') + ";$env:USERPROFILE\.pg-cli"),
    'User'
)

⚠️ Windows: do not paste %USERPROFILE%\.pg-cli into your PowerShell profile. That is CMD syntax, it is a folder path rather than a command, and a profile is not the same thing as your PATH. Doing it produces The term 'pg' is not recognized. Use the command above instead.

Close your terminal and open a new one — PATH is only read at start-up.

2. Check it worked

pg status

You should see Session status: ....

Still "not recognized"? Run this to confirm the CLI is installed — it must print True:

Test-Path "$env:USERPROFILE\.pg-cli\pg.cmd"

If it prints False, reinstall the extension. If it prints True, you are in an old terminal — open a new one. You can always run it directly without PATH:

& "$env:USERPROFILE\.pg-cli\pg.ps1" status

3. Set up a project

cd your-project
pg install backend --target .

That scaffolds the memory bank, the governance hooks and the agent instructions into your project.

3. Before you start coding, each day

pg start -Yes

4. Before you commit

pg self-check -EnableDbIndexMaintenanceCheck

The commands you will actually use

I want to… Command
See every command pg help
Check my session pg status
Start work pg start -Yes
Finish work pg end -Note "what I did"
Run the full gate before pushing pg self-check -EnableDbIndexMaintenanceCheck
Check dependencies for vulnerabilities pg dependency-verify
Check an existing/legacy codebase pg map-structure
Diagnose a broken setup pg doctor

Working on an older project

A codebase that predates PG will not have a memory bank. Map it first — this reads your existing code and database schema and writes what it finds:

pg map-structure
pg install backend --target .
pg start -Yes

TapSign integration

pg tapsign-catalog                                                    # what can be protected
pg tapsign-plan -Profile universal-web -Endpoint POST:/login          # plan it
pg tapsign-integrate -Profile wordpress -Endpoint POST:/pay           # apply it
pg tapsign-verify -Profile guardian -Endpoint POST:/admin/delete-user # prove it

In the editor

Press Ctrl+Shift+P (Cmd+Shift+P on Mac) and type Narrate:

Command What it does
Narrate: Open Command Help Every command, with expected output
Narrate: Run Command Diagnostics Checks your environment and reports what is wrong
Narrate: Set Up TapSign MCP Server Registers the MCP server for this project
Narrate: Assign This Window As PG Backend Two-agent workflow: this window owns the backend
Narrate: Assign This Window As PG Frontend …and this one owns the frontend
Narrate: Refresh Trust Score Re-scores the current workspace

Tell your AI assistant what to do

You do not need to know how to write the instruction. In the Start Here panel, click Copy a Prompt for Your AI Assistant, pick what you want, and paste it into Copilot Chat, Claude or Codex.

Use Agent mode, not Ask. Tools only work in Agent mode.

The same prompt works in all three. Here it is if you would rather copy from here:

Use the TapSign MCP tools to integrate TapSign into this project.

Work in this order and do not skip ahead:

1. Call tapsign_start with the absolute path to this repository.
   Report exactly what it found: stack, whether consume is called,
   and the number of blocking problems.

2. If there are ANY blocking problems, call tapsign_verify and fix
   every one before doing anything else. A bypass makes every other
   control decorative — do not start new work while one exists.

3. Call tapsign_scenarios and tell me which apply here. Then ASK ME
   to choose before you implement anything. Do not assume.

4. For the scenario I pick, call tapsign_examples and tapsign_template,
   then show me the exact changes you propose. Wait for my approval.

5. Call tapsign_config and tell me which config files I need to
   download from the portal and exactly where each one goes.

6. If any admin or super-admin screen will configure TapSign, call
   tapsign_admin_settings BEFORE writing that screen.

7. Before enabling enforcement or building an enrolment flow, call
   tapsign_rollout. Enrolment must never switch enforcement on by
   itself — a real login has to succeed first.

Rules you must follow:
- Never write code that mints or verifies its own approval proof.
  Approval is proved only by calling a TapSign consume endpoint.
- Never put the connector key in anything the client can download.
- If TapSign is unreachable, the protected action must be REFUSED.
- Do not tell me integration is done based on a static scan. It cannot
  observe behaviour.

Start with step 1 and stop after reporting.

Two more are in the panel: audit an existing integration (read-only, tells you whether it can be bypassed) and run the checks and explain them.

No editor? Run the tools directly

node ~/.pg-cli/mcp/dist/index.js

Speaks MCP over stdio, so any MCP client can use it — including claude in a terminal, which reads the same .vscode/mcp.json.


The TapSign MCP server

Ships with the extension and installs to ~/.pg-cli/mcp. To use it in a project:

  1. Ctrl+Shift+P → Narrate: Set Up TapSign MCP Server
  2. Reload the window
  3. Ask your AI assistant to run tapsign_start

Ten tools: tapsign_start, tapsign_verify, tapsign_diagnose, tapsign_config, tapsign_rules, tapsign_capabilities, tapsign_examples, tapsign_faq, tapsign_scenarios, tapsign_template.

The config is written to .vscode/mcp.json in that project only. Granting a server access to a codebase is your decision, so it is never attached globally.


What it checks

  • Security — injection, XSS, SSRF, weak crypto, authentication and authorisation gaps
  • Dependencies — known vulnerabilities; a high-severity advisory blocks
  • Frontend standards — keyboard covering inputs, camera and scanner handling, spacing and headers, file and function size limits
  • Governance — the memory bank must stay in step with the code
  • Secrets — no credential can be committed. This one has no bypass.

Requirements

  • PowerShell 7 (pwsh) — the tools are PowerShell, on every platform
  • Python 3 — used by several guards
  • Node.js — for the MCP server

pg doctor tells you which of these are missing.


Free

Everything is free. No account, no plan, no payment to install or use it.

If paid plans are ever introduced, anyone already using the extension keeps full access permanently. The date your machine first ran it is stored locally and never leaves your computer.

Security scanning, secrets guarding and governance checks will never depend on a licence. Those protect you; they are not a feature to be sold back to you.


Problems

Use the Q&A tab on the Marketplace listing, or narrate.pgdigitalglobal.com.

If a command misbehaves, pg doctor and Narrate: Run Command Diagnostics usually name the cause.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft