pwf-doc-foundation

pwf-doc-foundation is a command for Claude Code from J-Pster/Psters_AI_Workflow. It costs 40 tokens per session (722 once invoked), scanned A, original, MIT.

A command for creating or refreshing a project's core documentation in the docs folder. It covers infrastructure, system architecture, external connections, environments, and a glossary of project terms.

In plain words
What is it for?
Use it to document all foundation areas or only infrastructure, architecture, integrations, environments, or the glossary after checking the project's code, structure, and existing docs.
Why use it?
It establishes a central documentation baseline and updates the existing canonical files instead of creating duplicate versions.

Command for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to document all foundation areas or only infrastructure, architecture, integrations, environments, or the glossary after checking the project's code, structure, and existing docs.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/j-pster/psters_ai_workflow/pwf-doc-foundation
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.

Clone the repo
git clone --depth 1 https://github.com/J-Pster/Psters_AI_Workflow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pwf-doc-foundation

README.md
[![agentmods](https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-foundation/github.svg)](https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-foundation)
Your own site
<a href="https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-foundation"><img src="https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-foundation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pwf-doc-foundation

Your own site · 80×15
<a href="https://agentmods.dev/commands/j-pster/psters_ai_workflow/pwf-doc-foundation"><img src="https://agentmods.dev/badge/commands/j-pster/psters_ai_workflow/pwf-doc-foundation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 722 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00040 $0.00722
Opus 5 $0.00020 $0.00361
Sonnet 5 $0.00008 $0.00144
Haiku 4.5 $0.00004 $0.00072

Measured 11d ago against content hash 82dfb799cb1f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

pwf-doc-foundation 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 11d 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.

plugins/psters-ai-workflow/commands/pwf-doc-foundation.md · 98 lines

How it starts

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

Build Foundation Documentation

Use this command to establish or refresh the core project documentation baseline. This command is project-agnostic by design: it captures what exists in the target project.

Scope

<doc_foundation_scope> #$ARGUMENTS </doc_foundation_scope>

If empty, default to all.

Supported targets:

  • all
  • infrastructure -> docs/infrastructure.md
  • architecture -> docs/architecture.md
  • integrations -> docs/integrations.md
  • environments -> docs/environments.md
  • glossary -> docs/glossary.md

Workflow

  1. Resolve target(s) from arguments.
  2. For each target doc, run anti-drift preflight:
    • check whether the canonical file already exists,
    • if it exists, update in place,
    • do not create alternate duplicates like *-v2.md or extra copies in other folders.
  3. Read relevant project code/docs context before writing:
    • existing docs in docs/,
    • project structure and deployment/config patterns,
    • known contracts/integrations/environment settings.
  4. Use dedicated agents when available:
    • infrastructure -> invoke infrastructure-doc-writer (agents/docs/infrastructure-doc-writer.md)
    • architecture -> invoke architecture-doc-writer (agents/docs/architecture-doc-writer.md)
    • integrations, environments, glossary -> write/update directly in canonical files
  5. Write/update docs with concrete source-of-truth references and invariants.
  6. Cross-check consistency across the full foundation set.
  7. If project README.md is missing/stale after major foundation updates, optionally invoke readme-writer (agents/docs/readme-writer.md) to keep onboarding docs aligned.

Required minimum sections

docs/infrastructure.md

  • Infrastructure Overview
  • Environments
  • Core Services and Dependencies
  • Deployment and Operations
  • Known Constraints and Risks

docs/architecture.md

  • System Overview
  • Technology Stack
  • Module and Service Boundaries
  • Data and Request Flows
  • Architecture Invariants

Read the full file on GitHub · 98 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. 11d ago First seen · 98 lines · 40 tokens per session scan A 82dfb799cb1f

Subscribe to this mod's changes

pwf-doc-foundation is a command published in the GitHub repository J-Pster/Psters_AI_Workflow (289 stars, last pushed 5mo ago), licensed MIT. It adds 40 tokens to every session and 722 once invoked, about $0.0002 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.