init

A command that analyzes a project and builds a `.first-plan/` directory containing its technologies, structure, conventions, reusable code, domain areas, risks, and Git-based findings.

In plain words
What is it for?
Use it when setting up project discovery or rebuilding the stored analysis with `--force`.
Why use it?
It creates a shared project map before you plan or implement changes, so important context is less likely to be missed.

Command

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 commands/vynazevedo/first-plan/init
Clone the repo
git clone --depth 1 https://github.com/vynazevedo/first-plan
Per session 49 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,792 The whole file, excluding the scripts and references it only reads on demand.
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.00049 $0.01792
Opus 5 $0.00024 $0.00896
Sonnet 5 $0.00010 $0.00358
Haiku 4.5 $0.00005 $0.00179

Measured yesterday against content hash f12ce6d55f45, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init 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 yesterday.

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.

commands/init.md · 204 lines

How it starts

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

/fp:init

Compilação completa do contexto do projeto-alvo.

Argumentos

$ARGUMENTS - opcionalmente --force para reconstruir do zero ignorando cache.

Workflow

Passo 1 - Pre-flight check

  1. Verificar diretório atual é um projeto (tem manifesto, código, etc) - não rodar em $HOME ou diretório vazio
  2. Verificar se ja existe .first-plan/:
    • Se existe E não tem --force: avisar usuário e oferecer /fp:refresh em vez
    • Se existe E tem --force: backup em .first-plan/.backup-<timestamp>/ antes de prosseguir
  3. Verificar git repo. Se sim, ativa Git Intelligence; se não, marcar seções correlatas como N/A.

Passo 2 - Bootstrapping

Criar a estrutura .first-plan/ copiando templates do plugin:

mkdir -p .first-plan/{00-mission,01-topology,02-conventions,03-reuse,04-domain,05-risks,06-rationale,07-state/{plans,reports,sessions},08-meta,09-features}

Copiar templates de ${CLAUDE_PLUGIN_ROOT}/templates/ para .first-plan/ no projeto-alvo. Não copiar ${CLAUDE_PLUGIN_ROOT}/meta-templates/ - esses sao internos do plugin (usados por /fp:plan e /fp:execute para gerar plans/reports/features individuais; nao devem ir pro .first-plan/ do projeto). Substituir placeholders básicos:

  • PLACEHOLDER_TIMESTAMP -> ISO 8601 atual
  • PLACEHOLDER_ROOT -> caminho absoluto do projeto
  • PLACEHOLDER_NAME -> nome do projeto (de package.json/go.mod/etc, ou nome da pasta)
  • PLACEHOLDER_PHASE -> discovering

Adicionar ao .gitignore do projeto se não estiver:

.first-plan/cache/
.first-plan/07-state/sessions/
.first-plan/.backup-*/

Passo 3 - Discovery (subagent)

Spawnar discovery-analyst via Task tool:

Task(
  subagent_type="discovery-analyst",
  description="Phase 1 Discovery for first-plan",
  prompt="<contrato detalhado com project_root, lens_skills_available, time_budget_minutes=8>"
)

Receber findings estruturados.

Passo 4 - Pattern Extraction (subagent)

Spawnar pattern-archeologist em paralelo (mesma mensagem, múltiplas Task tool calls):

Read the full file on GitHub · 204 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. yesterday First seen · 204 lines · 49 tokens per session scan A f12ce6d55f45

Subscribe to this mod's changes

init is a command published in the GitHub repository vynazevedo/first-plan (23 stars, last pushed 7d ago), licensed MIT. It adds 49 tokens to every session and 1,792 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.