Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.63 KB

File metadata and controls

70 lines (49 loc) · 2.63 KB

Getting started

PHARN is an audit-grade methodology for Claude Code. It ships as a .claude/ directory copied into your project by a CLI. This page gets you from zero to your first feature in about ten minutes.

What you need

  • Node 20 or newer
  • A Next.js project (PHARN currently ships a Next.js stack pack; other stacks are on the roadmap)
  • shadcn initialized in that project
  • A git repo (PHARN expects clean working state for several commands)

Install in 3 commands

npx create-next-app@latest my-app
npx shadcn@latest init
npx pharn@latest init

pharn init walks you through a short wizard (which modules, which stack pack), then copies the chosen modules into your project's .claude/.

What got installed

After pharn init, your project's .claude/ directory contains:

  • commands/ — slash commands (/pharn-plan, /pharn-review, /pharn-ship, …)
  • skills/ — orchestration logic for each command and phase
  • rules/ — constraints PHARN enforces in your project (architecture, auth, privacy, testing, …)
  • hooks/ — Node hooks that run on Claude Code events (PreToolUse, Stop)
  • memory-bank/ — four markdown files that persist project context across sessions
  • ai_docs/ — vendor reference docs your stack pack needs Claude to read
  • CONSTITUTION.md — non-negotiable principles for this project
  • profiles.yaml — strictness profiles (which gates fire when)
  • pharn.config.json — pinned skillsVersion, commit SHA, modules, stack answers

Your first slash command

In Claude Code, inside your project, run:

/pharn-plan Add a contact form with name, email, and message, stored in Postgres.

PHARN produces a plan document. Read it, push back on it. The next step is to grill it.

The day-to-day loop

/pharn-plan → /pharn-grill → /pharn-build → /pharn-verify → /pharn-review → /pharn-ship
  • /pharn-plan — turns a feature description into a plan document
  • /pharn-grill — interrogates the plan for gaps, risks, and missing constraints
  • /pharn-build — executes the plan phase by phase, with gates
  • /pharn-verify — confirms the code matches what the plan specified
  • /pharn-review — runs the lens battery against the diff
  • /pharn-ship — pre-ship checks, then opens the PR

Updating PHARN

npx pharn@latest update

The CLI compares manifest.json in this repo against the skillsVersion pinned in your project's pharn.config.json and surfaces what changed. You decide what to take.

Where to get help

  • Contributor docs: contributing.md
  • GitHub Issues: open a bug or feature request in this repo