init

A command that installs the Project Factory workflow into a repository. The workflow includes checks, agents, hooks, continuous integration, templates, and related project files.

In plain words
What is it for?
It is for initializing a repository with the Project Factory loop, selecting tool adapters, optionally enabling automations, and reporting added or skipped files.
Why use it?
It creates the project's guardrails before feature work begins while preserving existing files and configuration.

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/koldovsky/project-factory/init
Clone the repo
git clone --depth 1 https://github.com/koldovsky/project-factory
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,680 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.00045 $0.02680
Opus 5 $0.00023 $0.01340
Sonnet 5 $0.00009 $0.00536
Haiku 4.5 $0.00005 $0.00268

Measured yesterday against content hash 9f4dad02ff1f, 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 · 165 lines

How it starts

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

/project-factory:init — install the loop

Install the framework's per-project loop into the current repository by copying bundled files from the plugin (${CLAUDE_PLUGIN_ROOT}) and wiring them up. This is Gate G0: no feature work before the loop that guards it exists. The app stack itself (e.g. create-next-app) is NOT installed here — that is a later orchestrator step after the stack decision; init is stack-agnostic.

Flags in $ARGUMENTS: --tools= selects which tool adapters to install (default all — see step 10); --with-automations also installs the cloud automations workflow; --force overwrites framework-owned files instead of skipping.

Hard rules

  • Idempotent + non-destructive. For every target: if it exists, SKIP and report it (unless --force); never clobber the user's code or config.
  • Merge, don't overwrite, structured config: for package.json and .claude/settings.json, ADD missing keys only; keep everything already there.
  • Report at the end: a table of what was added vs skipped.

Steps

  1. Repo + dirs. git init if not a repo. Create (if absent) .claude/, scripts/, scripts/automations/lib/, docs/, docs/adr/, docs/qa/waivers/, evals/cases/, evals/results/, .githooks/, .github/workflows/, openspec/, quality/, trace/, retro/corrections/, templates/retro/. .gitignore must NOT ignore docs/qa/** — QA evidence (videos, screenshots, reports) is committed PROOF. Ignore only temp: node_modules/, coverage/, and recording **/raw/ scratch dirs. If a broader docs/qa ignore exists, fix it.

  2. Agents & workflows (copy verbatim, skip-if-exists):

    • ${CLAUDE_PLUGIN_ROOT}/agents/*.md.claude/agents/ (the plugin already provides these natively, but deliver project-local copies so the workflows resolve them by bare agentType name)
    • ${CLAUDE_PLUGIN_ROOT}/.claude/workflows/*.js.claude/workflows/
  3. Deterministic scripts (copy + drop the .reference segment):

    • scripts/check-traceability.reference.mjsscripts/check-traceability.mjs (same for check-coverage-ratchet, check-eval-ratchet, check-trajectory, check-a11y, gate-status, qa-verify).
    • scripts/record-demos.reference.mjsscripts/record-demos.mjs (the headless recording+validation harness — demo and bugfix proof via OUT_DIR); scripts/check-recordings.reference.mjsscripts/check-recordings.mjs.
    • Reflection layer (same copy-and-rename rule): check-acceptance-methods, check-visual-fidelity, check-process-ratchet, check-factory-integrity, ledger, ledger-report, correct — each scripts/<name>.reference.mjsscripts/<name>.mjs. These implement the honesty checks (acceptance join, vacuity semantics, stub scan, integrity lock) — they are part of the loop, not optional extras.
    • scripts/automations/{run,drift-watch,dep-audit,ci-triage}.reference.mjsscripts/automations/*.mjs; scripts/automations/lib/*.mjs verbatim; automations/registry.jsonautomations/registry.json (ships OFF).

Read the full file on GitHub · 165 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 · 165 lines · 45 tokens per session scan A 9f4dad02ff1f

Subscribe to this mod's changes

init is a command published in the GitHub repository koldovsky/project-factory (4 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 2,680 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-31.