pm-copilot AGENTS.md

Repository instructions for pm-copilot, an MCP server that connects an AI assistant to support tickets and feature requests for product planning.

In plain words
What is it for?
Use them when developing the TypeScript server, its Help Scout and ProductLift API clients, tool registrations, error handling, and data returned for analysis.
Why use it?
They set boundaries for handling customer data, including removing personal information and continuing with partial results when one service is unavailable.

Instructions file for CodexOpenCode

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/dkships/pm-copilot/agents-md
Clone the repo
git clone --depth 1 https://github.com/dkships/pm-copilot

Made for: Codex, OpenCode.

Per session 827 This file is loaded in full into every session.
When invoked 827 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.00827 $0.00827
Opus 5 $0.00413 $0.00413
Sonnet 5 $0.00165 $0.00165
Haiku 4.5 $0.00083 $0.00083

Measured 3d ago against content hash 72654a1f1519, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pm-copilot AGENTS.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 3d 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.

AGENTS.md · 62 lines

How it starts

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

PM Copilot — Agent Instructions

Guidance for AI coding agents (Claude Code, Codex, Cursor, Aider, etc.) working in this repo. Human contributors: see CONTRIBUTING.md.

What this is

MCP server connecting an LLM to customer signal data (HelpScout support tickets + ProductLift feature requests). Cross-source theme analysis and prioritized product planning.

Tech stack

  • TypeScript, ES modules, Node 18+
  • @modelcontextprotocol/sdk with stdio transport
  • HelpScout API v2 (OAuth2 client credentials)
  • ProductLift API v1 (Bearer token, multi-portal)

Scope and boundaries

  • PII scrubbing on all customer text before analysis (SSN, CC, email, phone). See SECURITY.md.
  • Never send unscrubbed customer text. Scrubbing happens at the format layer.
  • Return raw structured data from tools. Let the LLM do synthesis.
  • Partial-failure resilient: if one API is down, return data from the other plus a warnings array.

Working rules

  • Use registerTool / registerResource for MCP registration (not deprecated .tool())
  • All API clients in their own module (e.g., helpscout.ts, productlift.ts)
  • Handle errors with isError: true responses
  • No any types. Use as T casts at API boundaries.
  • Theme config loaded at runtime via fs.readFileSync — edits don't require rebuild
  • Use environment variables for credentials. Never paste token values into config or commit them.
  • Run npm run build after source changes before testing through an MCP client.

Definition of done

  • Tool responses include pii_scrubbing_applied: true and pii_categories_redacted
  • Partial failures return a warnings array identifying which source failed
  • npm run build, npm test, and npm run audit:ci all pass
  • New customer data sources route through src/pii-scrubber.ts

Code style

Adapted from Fabien Sanglard's agent.md (2026-08-21).

  • Avoid magic numbers and strings. Extract recurring or meaningful values into named constants or enums; leave self-explanatory one-off values inline. A value defined by a spec (HTTP 200, a protocol byte) gets a constant regardless.
  • Reduce indentation. Use early returns and continue instead of nesting.
  • Keep function names under 30 characters.
  • Use an enum or a string-literal union instead of a boolean parameter.
  • Put blank lines between logical blocks. Let the reader breathe.
  • Comment what a block does and why, briefly. Use an example where it helps; offer an ASCII diagram when explaining a whole system.
  • Treat a visibility change as a breaking design shift. Keep things private or unexported unless the design requires external access, and ask before widening one.
  • Program to levels of abstraction. Low-level mechanics (raw SQL, socket streams, vendor SDK calls, file parsing) live behind a driver or service layer; callers work in domain concepts.
  • Hold the layer boundaries. Each layer talks only to the one directly below it, with no holes punched through: a UI component never calls the database or a raw HTTP client directly.
  • Don't touch code unrelated to the feature you're implementing, including adding comments to blocks you didn't write. Minimize changed lines.
  • Always use braces, even on a one-line if.
  • Fixing a bug: write the failing test first, watch it fail, then write the fix and watch it pass.

Read the full file on GitHub · 62 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. 3d ago First seen · 62 lines · 827 tokens per session scan A 72654a1f1519

Subscribe to this mod's changes

pm-copilot AGENTS.md is an instructions file published in the GitHub repository dkships/pm-copilot (29 stars, last pushed 9d ago), licensed MIT. It adds 827 tokens to every session, about $0.0041 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-30.