Skip to content

v0.0.5 — npm publish + behavior-prior prefix + doc hygiene

Choose a tag to compare

@WiFoDev WiFoDev released this 01 May 19:56
· 56 commits to main since this release

Theme: easier to adopt, smarter to use. Every @wifo/factory-* package is now on the public npm registry. factory init scaffolds work outside this monorepo for the first time. The implementer agent gets a stable behavior-prior prompt prefix so prompt caching hits consistently across iterations.

This release was built by the factory itself — factory-runtime ran against three v0.0.5 specs (factory-runtime-v0-0-5, factory-docs-v0-0-5, factory-publish-v0-0-5) with claude -p doing the implementation. Provenance is on disk under .factory-v0-0-5/ for the specs that completed runs.

Added

  • npm publish for every package. All six @wifo/factory-* packages (core, context, harness, runtime, spec-review, twin) now ship to npm under v0.0.5 with publishConfig.access: public, full repository/homepage/bugs/keywords/author/license metadata, and per-package LICENSE files.
  • Top-level pnpm release script. Gates on typecheck → test → biome check → build → pnpm publish -r --access public. Manual release-gate (not a CI workflow yet).
  • # Implementation guidelines prompt prefix in implementPhase. Stable module-level constant IMPLEMENTATION_GUIDELINES emitted between the opening prose and # Spec on every implement spawn. Four behavior priors: state assumptions, minimum code, surgical changes, verifiable success criteria. ≤ 2 KB / ~500 tokens; byte-stable across iterations so claude -p's ephemeral cache hits the same key every iteration.
  • PostToolUse hook recipe in packages/core/README.md — opt-in ~/.claude/settings.json block that runs factory spec lint + factory spec review on every Write/Edit to docs/specs/*.md.
  • Cross-package review pointers. packages/harness/README.md and packages/runtime/README.md now reference @wifo/factory-spec-review so the reviewer is discoverable from anywhere in the monorepo.
  • packages/core/src/publish-meta.test.ts (5 new tests). Asserts per-package metadata, the init-templates dep version (^0.0.5), the caveat sweep across READMEs, and the release-script gating.

Changed

  • docs/SPEC_TEMPLATE.md rewritten to match the v0.0.3+ parallel-tree filename convention (docs/specs/<id>.md ↔ docs/technical-plans/<id>.md). Added a "Validating the spec" section listing both factory spec lint and factory spec review. The pre-v0.0.3 single-tree <id>.technical-plan.md convention is gone.
  • packages/core/src/init-templates.ts PACKAGE_JSON_TEMPLATE.dependencies bumped ^0.0.4 → ^0.0.5. Scaffold README_TEMPLATE no longer carries the v0.0.4 "monorepo-only" caveat.

Removed

  • The v0.0.4 "monorepo-only" caveat is swept from every README + scaffold template (top-level README, packages/core/README.md, packages/spec-review/README.md, examples/{slugify,gh-stars,parse-size}/README.md, init-templates.ts README_TEMPLATE). v0.0.5 is the first release where factory init-generated scaffolds resolve their @wifo/factory-* deps from public npm.
  • BACKLOG entry for "implementPhase: behavior-prior prompt prefix" — shipped in this release.

Public API surface

Unchanged across every package. v0.0.5 is metadata + prompt content only — zero new exports, zero rename or removal of existing exports.

Package Exports
@wifo/factory-core 27
@wifo/factory-context 18
@wifo/factory-harness ~16
@wifo/factory-runtime 19
@wifo/factory-spec-review 10
@wifo/factory-twin ~7

IMPLEMENTATION_GUIDELINES lives in packages/runtime/src/phases/implement.ts but is intentionally NOT re-exported from src/index.ts.

Reconciliations worth knowing

  • Coordinated versioning across all six packages. Even packages that didn't change in v0.0.4 (harness was at 0.0.0, twin at 0.0.1) jumped to 0.0.5. Required so the scaffold's ^0.0.5 deps resolve uniformly. Per-package version drift is deferred until there's an operational need.
  • pnpm publish -r is manually triggered. v0.0.5 ships the release script and the dry-run-clean tarballs; the actual npm publish is maintainer-driven, not a CI workflow.
  • Per-package LICENSE files are copies, not symlinks. Each package gets its own copy so npm pack reliably includes it in every tarball. The root LICENSE is still the source of truth.
  • The reviewer's exit-1 condition stays dormant in v0.0.5 — all 5 v0.0.4 judges still default to severity: 'warning'. Promotion is per-judge, post-calibration, in v0.0.5+ point releases.

Notes

This release was the first moneyball run — building v0.0.5 by running v0.0.4's factory-runtime against the three v0.0.5 specs. Three real lessons surfaced and are queued in BACKLOG:

  • The harness parses backtick-quoted test paths literally (recurring spec-authoring pitfall).
  • SPEC_TEMPLATE.md should warn against the same.
  • The 600s per-phase agent timeout is too tight for very-broad specs (the publish spec hit it on iteration 2).