Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Releases 0.4.0 and older are in [CHANGELOG-ARCHIVE.md](CHANGELOG-ARCHIVE.md).

## [Unreleased]

### Changed

- **New configs no longer carry `modules`; pharn 0.20.0 is the oldest CLI that can read them.** `pharn init` wrote `"modules": []` into every archetype `pharn.config.json` only because `pharn` 0.3.0 to 0.19.x reads a config without a `modules` array as no config at all. It no longer does, and every write (`init`, `add`, `remove`, `update`) now also drops the fields only older CLIs wrote (`modules`, `constitution`, `installedSkills`, `stackAnswers`, `isMultiTenant`) when it finds them. A config that still carries them loads in every command as before. If a teammate runs `pharn` 0.19.x or older, upgrade it first: it reports _"No pharn.config.json found"_ for a config 0.21.0 wrote, and running `pharn init` there would replace the file.

### Removed

- **`pharn` no longer writes `"modules": []` or keeps the module-era and wizard fields of `pharn.config.json`; 0.20.x is the last CLI that wrote `modules`.** They still load, and leave the file at its next write. For contributors: `PharnConfig.modules` and `LegacyConfigFields` are gone from `src/types.ts`; `LEGACY_CONFIG_KEYS` in `src/lib/pharn-config.ts` keeps the five names pharn-owned.

## [0.20.0] — 2026-11-17

### Added
Expand Down
26 changes: 13 additions & 13 deletions docs/commands/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,19 +560,19 @@ cannot find them; PHARN still runs them. Delete them by hand.

### 7. Install

| Action | Behavior |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Copy capabilities | Each selected griller/lens dir (with its `evals/`) → the mirrored project path |
| Copy product surfaces | `pharn-*.md` commands (not `pharn-dev-*`), `.cjs`/`.mjs` hooks (not `*.test.*`), the trusted docs, `pharn/features/README.md`, and the contracts, `pharn-core` and floor dirs — each at the fetched layout (minus test files, `test-fixtures/` and `fixtures/`) |
| Copy agents | `pharn-*.md` subagents in `.claude/agents/` (not `pharn-dev-*`), at that path in both layouts; a pharn-oss older than 6.64.0 ships none, and that is not reported |
| Write or preserve settings | An existing `.claude/settings.json` is **never** overwritten or merged ([below](#an-existing-claudesettingsjson)); with none, pharn-oss's is copied and a `HOOKS` note lists what it wires ([below](#a-fresh-claudesettingsjson)) |
| Mirror the layout | Whichever layout the fetched clone uses is mirrored verbatim; the CLI never rewrites copied file contents. Today that is `pharn/pharn-contracts/`, `pharn/pharn-core/`, `pharn/floor/`; the legacy flat layout is `pharn-contracts/`, `pharn-core/`, `.dev/floor/` |
| Pin commit SHA | Best-effort (the SHA the tree was pinned to; `null` if unavailable) |
| Write `pharn.config.json` | `pharnVersion`, `skillsVersion` (from `SKILLS_VERSION`), `repo`, `commit`, `installedAt`, `archetypes`, `capabilities` (`source: "auto"`, or `"manual"` for a kept `pharn add`), `layout`, `models`, `modules: []`, `frozenCapabilities` (see above); no `seam` (pharn-oss's) |
| Copy the `models` block | pharn-oss's own, verbatim, from its root `pharn.config.json`; none when pharn-oss ships none, and none — with the reason — when it fails pharn-oss's rules as this pharn knows them ([Models](../reference/pharn-config.md#models)) |
| Write `pharn.records.json` | A sha256 of every file the install wrote, so [`pharn update`](update.md) can keep your later edits ([reference](../reference/pharn-records.md)) |
| Update `.gitignore` | Appends `pharn/.run/` and `pharn/.backup/` when it does not already cover them, creating the file if needed ([below](#gitignore)) |
| Update `.prettierignore` | Only when the project uses Prettier: appends the lines that keep its check off the files pharn installs and rewrites ([below](#prettierignore)) |
| Action | Behavior |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Copy capabilities | Each selected griller/lens dir (with its `evals/`) → the mirrored project path |
| Copy product surfaces | `pharn-*.md` commands (not `pharn-dev-*`), `.cjs`/`.mjs` hooks (not `*.test.*`), the trusted docs, `pharn/features/README.md`, and the contracts, `pharn-core` and floor dirs — each at the fetched layout (minus test files, `test-fixtures/` and `fixtures/`) |
| Copy agents | `pharn-*.md` subagents in `.claude/agents/` (not `pharn-dev-*`), at that path in both layouts; a pharn-oss older than 6.64.0 ships none, and that is not reported |
| Write or preserve settings | An existing `.claude/settings.json` is **never** overwritten or merged ([below](#an-existing-claudesettingsjson)); with none, pharn-oss's is copied and a `HOOKS` note lists what it wires ([below](#a-fresh-claudesettingsjson)) |
| Mirror the layout | Whichever layout the fetched clone uses is mirrored verbatim; the CLI never rewrites copied file contents. Today that is `pharn/pharn-contracts/`, `pharn/pharn-core/`, `pharn/floor/`; the legacy flat layout is `pharn-contracts/`, `pharn-core/`, `.dev/floor/` |
| Pin commit SHA | Best-effort (the SHA the tree was pinned to; `null` if unavailable) |
| Write `pharn.config.json` | `pharnVersion`, `skillsVersion` (from `SKILLS_VERSION`), `repo`, `commit`, `installedAt`, `archetypes`, `capabilities` (`source: "auto"`, or `"manual"` for a kept `pharn add`), `layout`, `models`, `frozenCapabilities` (see above); no `seam` (pharn-oss's) |
| Copy the `models` block | pharn-oss's own, verbatim, from its root `pharn.config.json`; none when pharn-oss ships none, and none — with the reason — when it fails pharn-oss's rules as this pharn knows them ([Models](../reference/pharn-config.md#models)) |
| Write `pharn.records.json` | A sha256 of every file the install wrote, so [`pharn update`](update.md) can keep your later edits ([reference](../reference/pharn-records.md)) |
| Update `.gitignore` | Appends `pharn/.run/` and `pharn/.backup/` when it does not already cover them, creating the file if needed ([below](#gitignore)) |
| Update `.prettierignore` | Only when the project uses Prettier: appends the lines that keep its check off the files pharn installs and rewrites ([below](#prettierignore)) |

**How each file is written.** `init` writes the files one at a time, each by replacement: the new bytes
go to a temporary file beside the destination, which is then renamed into place, so a hard link (a
Expand Down
Loading
Loading