pwa-debug-layer CLAUDE.md

pwa-debug-layer CLAUDE.md is an instructions file for coding agents from aryanduntley/pwa-debug-layer. It costs 1,082 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions that requires AIMFP tracking throughout a coding session. AIMFP is the project’s system for recording status, plans, tasks, milestones, and other work details.

In plain words
What is it for?
It helps manage coding sessions that use AIMFP, including starting sessions, creating tasks before coding, recording progress, and checking project information through its database tools.
Why use it?
It prevents project work from being tracked only in the agent’s memory or skipped altogether. The instructions require status checks before exploration and tracking before and after coding.

Instructions file

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/aryanduntley/pwa-debug-layer/claude-md
Clone the repo
git clone --depth 1 https://github.com/aryanduntley/pwa-debug-layer

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 pwa-debug-layer CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/aryanduntley/pwa-debug-layer/claude-md.svg)](https://agentmods.dev/instructions/aryanduntley/pwa-debug-layer/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/aryanduntley/pwa-debug-layer/claude-md"><img src="https://agentmods.dev/badge/instructions/aryanduntley/pwa-debug-layer/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,082 This file is loaded in full into every session.
When invoked 1,082 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.1 $0.01082 $0.01082
Opus 5 $0.00541 $0.00541
Sonnet 5 $0.00216 $0.00216
Haiku 4.5 $0.00108 $0.00108

Measured 4d ago against content hash 95c0e696d3f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

pwa-debug-layer CLAUDE.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 4d 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.

CLAUDE.md · 68 lines

How it starts

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

AIMFP MODE ACTIVE — MANDATORY BEHAVIORAL RULES

These rules are NON-NEGOTIABLE. Violating any creates tracking gaps and invisible project damage. Use AIMFP tracking over memory

FIRST — BEFORE ANYTHING ELSE

CALL aimfp_run(is_new_session=true)

  • Your FIRST ACTION every session no matter how user begins their initial request; do this first
  • is_new_session=false is for checkpoint calls during work — returns watchdog alerts only
  • Do NOT explore files, read code, or respond to the user before calling
  • Returns everything: project status, settings, supportive context, guidance — this single call replaces multi-round file exploration
  • .aimfp-project/ missing → offer aimfp_init or restore from backup

!IMPORTANT!

AIMFP TRACKING IS ALWAYS MANDATORY! Done coding? AIMFP TRACK EVERYTHING. Do not wait for or expect user to tell you to do this. After planning, DO NOT rely only on internal task creation, USE AIMFP PATHS/MILESTONES/TASKS/ITEMS. Never begin coding without AIMFP tasks. Never stop coding without AIMFP tracking.

ALWAYS

DB Tools: get_file_by_name, get_function_by_name, get_type_by_name, get_interactions_by_function, search_modules

  • Write FP-compliant code: pure functions, immutability, no OOP, no classes with methods, modular reuse (domain logic in domain modules — feature files are thin orchestrators that compose domain functions, never contain business logic)
  • BEFORE writing any function: search with DB Tools for overlapping logic. Reuse > rewrite. New shared logic goes in domain modules, not feature files. See get_supportive_context(variant='coding') for full DRY rules.
  • Call get_directive_by_name(name) BEFORE executing any directive not in memory
  • Follow return_statements from tools — they are mandatory next-step guidance, not suggestions
  • Use DB Tools before reading source files — DB is the index, source files are last resort
  • Check flows, themes, and modules before starting any task: get_all_flows() or get_task_flows(task_id), get_all_themes(), and get_all_modules()
  • ALWAYS route ad-hoc work through get_directive_by_name('project_task_decomposition') BEFORE coding
  • Add_note(note_type='evolution') for architecture decisions, scope changes, blueprint edits
  • Update DB from discussions: architecture/infrastructure/task decisions → update_project, update_task, update_milestone, or add_note
  • Call aimfp_end when user says "done" / "wrap up" / "end session"
  • Deferred work (TODOs, stubs, placeholders): immediately add_note(note_type='deferred', reference_table='files', reference_id=<file_id>). Resolved → update_note(note_type='completed'). Obsolete → update_note(note_type='obsolete'). DO NOT mark tasks/milestones complete with stubs/placeholders/TODOs — "complete" means functional and tested. Deferred → follow-up task + add_note(note_type='deferred').

LIFECYCLE & TRACKING GATE

init → discovery → [progression: one task at a time] → completion → end Tasks created incrementally as work progresses, NOT all at once.

After EVERY Edit or Write to a source file round, immediately run the full file coding loop: reserve file (if new) → search_modules for overlap → reserve functions+types (public) → write FP code → finalize file → assign to flow(s) → assign to module (if domain logic) → finalize functions+types (purpose, parameters, returns populated) → add interactions → add types_functions Applies to ALL work: features, bug fixes, refactors. Any function added, params changed, types modified — track it. Before reporting to user: get_task_context(task_id) — unfinalized files must be finalized FIRST.

Gate enforcement:

  • Finalize files with public functions reserved+finalized — DO NOT finalize without them
  • Finalize functions with interactions added — DO NOT skip cross-function dependencies
  • Finalize functions with types_functions linked — DO NOT skip tracked type usage
  • Assign every finalized file to flow(s) — DO NOT skip flow assignment
  • Assign domain logic files to modules via add_file_to_module — DO NOT skip. Orchestrators (pages, handlers, commands) do not need module assignment.
  • Every finalized code file must have tracked functions — DO NOT leave 0 (unless data-only/config-only)

Read the full file on GitHub · 68 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. 4d ago First seen · 68 lines · 1,082 tokens per session scan A 95c0e696d3f9

Subscribe to this mod's changes

pwa-debug-layer CLAUDE.md is an instructions file published in the GitHub repository aryanduntley/pwa-debug-layer (0 stars, last pushed 2mo ago), licensed MIT. It adds 1,082 tokens to every session, about $0.0054 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-31.