@pharn-dev/pharn 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +42 -9
  2. package/dist/index.js +31 -24
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -36,6 +36,7 @@ npx @pharn-dev/pharn@latest init
36
36
  - [After install](#after-install)
37
37
  - [Day-to-day workflow](#day-to-day-workflow)
38
38
  - [CLI commands](#cli-commands)
39
+ - [Agent skills](#agent-skills)
39
40
  - [Safety model](#safety-model)
40
41
  - [Current scope](#current-scope)
41
42
  - [Documentation](#documentation)
@@ -151,7 +152,7 @@ still understood through the recorded `layout` field.
151
152
  | `pharn/pharn-contracts/`, `pharn/floor/` | Schemas shared across PHARN stages and floor checkers invoked by the workflow. |
152
153
  | `pharn/pharn-core/` | Agent-readable mechanism skills, including the seam resolver. |
153
154
  | `pharn/CONSTITUTION.md`, `pharn/ARCHITECTURE.md` | Trusted PHARN docs copied from upstream in the current layout. |
154
- | `THREAT-MODEL.md`, `LIMITS.md` | Trusted PHARN docs copied at the project root in the current layout. |
155
+ | `pharn/THREAT-MODEL.md`, `pharn/LIMITS.md` | The other two trusted docs (at the project root from a pharn-oss older than 7.0.0). |
155
156
  | `pharn/LICENSE` (flat: `PHARN-LICENSE`) | PHARN's Apache-2.0 license copy. Your root `LICENSE` is never overwritten. |
156
157
  | `pharn/features/README.md` | The feature-loop boundary contract referenced by installed commands (pharn layout). |
157
158
  | `pharn.config.json` | Installed version, commit, layout, archetypes, capabilities, and defaults. |
@@ -166,9 +167,19 @@ As you run the workflow, PHARN writes one directory per increment —
166
167
  `SHIP.md` + `BRIEFING.md` (`/pharn-ship`) or `LOOP.md` (`/pharn-loop`), a
167
168
  `RUN-REPORT.md`, and the machine-readable records beside them
168
169
  (`AC-TESTS.lock.json`, `cost.json`, the `*-report.json` files). Those are the
169
- durable record; commit them. `.pharn/` (runtime scratch), `.pharn-backup/` (see
170
- [Safety model](#safety-model)) and `.pharn.lock` are not — add them to your
171
- `.gitignore`. PHARN never edits `.gitignore` for you.
170
+ durable record; commit them. `pharn/.run/` (runtime scratch; `.pharn/` before
171
+ pharn-oss 7.0.0), `pharn/.backup/` (see [Safety model](#safety-model)) and
172
+ `pharn/.lock*` are not — add them to your `.gitignore`. PHARN never edits
173
+ `.gitignore` for you; `pharn update` prints the replacement lines when yours still
174
+ names the old `.pharn/`, `.pharn-backup` or `.pharn.lock`.
175
+
176
+ Everything PHARN keeps in your project lives under `.claude/` and `pharn/`, plus
177
+ the two JSON files at the root. An install made from a pharn-oss older than 7.0.0
178
+ also has `THREAT-MODEL.md` and `LIMITS.md` at the root, and may have
179
+ `memory-bank/` and `pharn.spec-template.md` there: the first `pharn update` to
180
+ 7.0.0 or later deletes the two docs if you never edited them and moves the other
181
+ two under `pharn/` (backed up first, never merged) — see
182
+ [update](docs/commands/update.md#the-root-footprint-migration).
172
183
 
173
184
  **Two version numbers, on purpose.** The npm package `@pharn-dev/pharn` carries
174
185
  the installer's version. The content it installs carries its own,
@@ -270,7 +281,7 @@ Two commands sit outside the pipeline:
270
281
  | `pharn update` | Re-fetch and apply the latest PHARN content using drift-safe per-file decisions. `--force` overwrites files you changed; `--yes`/`-y` skips the confirmation prompt; `--dry-run` prints what it would do and writes nothing (add `--json` for the plan as one machine-readable object, and `--compact` to leave the unchanged files out of it). |
271
282
  | `pharn list` | Show installed archetypes and capabilities. Use `--json` for machine-readable output. |
272
283
  | `pharn status` | Read-only version and drift report. Use `--strict` to make drift fail CI, `--no-drift` to skip byte comparison, or `--json` for one machine-readable report. |
273
- | `pharn uninstall` | Remove PHARN: deletes only the files `pharn` recorded and you did not change, then `pharn.records.json` and `pharn.config.json` (backed up first). Never touches `.claude/settings.json` or `.pharn-backup/`. `--yes`/`-y` skips the confirmation prompt. |
284
+ | `pharn uninstall` | Remove PHARN: deletes only the files `pharn` recorded and you did not change, then `pharn.records.json` and `pharn.config.json` (backed up first). Never touches `.claude/settings.json` or `pharn/.backup/`. `--yes`/`-y` skips the confirmation prompt. |
274
285
  | `pharn --help` | Show every command, option and environment variable. `pharn <command> --help` shows one command and only the options it takes. |
275
286
  | `pharn --version` | Show the installed CLI version. |
276
287
 
@@ -296,7 +307,7 @@ Three behaviours matter if you script the CLI:
296
307
  commands' `--dry-run` needs no terminal and writes nothing. `uninstall`
297
308
  likewise exits 1 off a TTY unless it is given `--yes`.
298
309
  - **One writer at a time.** `init`, `add`, `remove`, `update` and `uninstall`
299
- take an advisory lock at `.pharn.lock`; a second run refuses rather than
310
+ take an advisory lock at `pharn/.lock`; a second run refuses rather than
300
311
  queueing. `add`, `remove`, `update` and `uninstall` also re-read
301
312
  `pharn.config.json` once they hold the lock, and refuse — writing nothing —
302
313
  if another run changed it after they read it (for example while a confirm
@@ -304,6 +315,27 @@ Three behaviours matter if you script the CLI:
304
315
  `list` and `status` never take it and are never blocked by one, so
305
316
  `pharn status --strict` stays runnable in CI while an update is in flight.
306
317
 
318
+ ## Agent skills
319
+
320
+ If you would rather ask than remember flags, the
321
+ [`pharn-dev/skills`](https://github.com/pharn-dev/skills) repository ships a
322
+ `pharn-cli` skill that operates this CLI for you. Ask your agent "Is PHARN up to
323
+ date in this project?" or "What would an update change?" and it runs the
324
+ read-only checks and a `--dry-run` preview first, applies the update without
325
+ overwriting your edits, and adds or removes grillers and lenses. The same
326
+ repository also carries `phargus` skills for setting up and diagnosing Node.js
327
+ applications with [Phargus](https://github.com/pharn-dev/phargus).
328
+
329
+ In Claude Code:
330
+
331
+ ```text
332
+ /plugin marketplace add pharn-dev/skills
333
+ /plugin install pharn@pharn-dev
334
+ ```
335
+
336
+ Or with the Skills CLI: `npx skills add pharn-dev/skills --skill pharn-cli`.
337
+ The skills are optional; every command above works without them.
338
+
307
339
  ## Safety model
308
340
 
309
341
  PHARN is intentionally conservative about writes:
@@ -317,13 +349,13 @@ PHARN is intentionally conservative about writes:
317
349
  are on disk), after backing up any file in it that `pharn` cannot prove it
318
350
  wrote; it never touches `.claude/settings.json`. A re-run `init` does the
319
351
  same, after listing those directories in its prompt.
320
- - `update --force` backs up overwritten files under `.pharn-backup/<timestamp>/`
352
+ - `update --force` backs up overwritten files under `pharn/.backup/<timestamp>/`
321
353
  before writing. `add` does the same for any destination file that differs from
322
354
  upstream, and refuses the whole install — writing nothing — when a destination
323
355
  path crosses a symlinked directory.
324
356
  - `status` and `list` are read-only.
325
357
  - `remove` deletes only the selected capability directory and prunes its records,
326
- after backing up to `.pharn-backup/<timestamp>/` any file in it that `pharn`
358
+ after backing up to `pharn/.backup/<timestamp>/` any file in it that `pharn`
327
359
  cannot prove it wrote unchanged;
328
360
  it never touches `CONSTITUTION.md`, `memory-bank/`, or your detected
329
361
  archetypes, and refuses when that directory's path crosses a symlink.
@@ -419,7 +451,8 @@ Useful scripts:
419
451
  | `npm run test:coverage` | Run the Vitest coverage gate used by CI. |
420
452
  | `npm run build:install-local` | Build and install the local CLI into local test apps. |
421
453
 
422
- Set `PHARN_DEBUG=1` for verbose fetch and install errors. See
454
+ Set `PHARN_DEBUG=1` for verbose fetch and install errors; `NO_COLOR` / `FORCE_COLOR`
455
+ control colour (see [Colour](docs/troubleshooting.md#colour)). See
423
456
  [CONTRIBUTING.md](CONTRIBUTING.md) for contributor notes and release discipline.
424
457
 
425
458
  ## Security