Skip to content

chore: repo bootstrap (license, AGENTS.md, package.json, tsconfig, biome, vitest) #4

Description

@randomm

What

Lay down the foundational files needed before any feature work begins. One PR, several small files. Mirrors randomm/pi-permissions (which converged on this layout after a full cycle of trial and error) and follows the Pi extension ecosystem majority pattern.

Files to create

LICENSE (new)

package.json

Required fields:

  • name: @randomm/pi-worktree
  • version: 0.1.0
  • license: Apache-2.0
  • type: module
  • keywords: pi-package, pi-extension, worktree, git, parallel
  • pi: { extensions: [./index.ts] }
  • peerDependencies: { @mariozechner/pi-coding-agent: * }
  • files: [*.ts, README.md, LICENSE]
  • Scripts: test (vitest run), test:coverage, lint (biome check .), format, typecheck (tsc --noEmit)
  • devDependencies: @biomejs/biome ^1.9.4, @types/bun latest, typescript ^5, vitest ^2

Decide on src/ vs flat root early — pi-permissions uses flat root.

tsconfig.json

  • strict: true
  • noEmit: true
  • target, module, moduleResolution, esModuleInterop, skipLibCheck configured for ESM/Bun
  • NO outDir, declaration, rootDir (we ship raw .ts)

biome.json

Mirror randomm/pi-permissions biome.json directly.

vitest.config.ts

  • v8 coverage provider
  • Coverage thresholds 80/85 for security-critical modules
  • Excludes node_modules, tests/

AGENTS.md (placeholder only)

Skeleton pointing to issue #6 for substantive content.

.gitignore

  • node_modules/
  • coverage/
  • .worktrees/ ← critical for this plugin specifically
  • Bun, OS, IDE patterns

bun.lock

Run bun install once after package.json is in place.

Why

pi-permissions burned a full session figuring out which files were needed and what pi.*, peerDependencies, keywords, license looked like in working form. Skip the rediscovery.

Acceptance criteria

  • LICENSE present (Apache 2.0, copyright line at top)
  • package.json contains: pi.extensions, peerDependencies[@mariozechner/pi-coding-agent]=*, license: Apache-2.0, keywords including pi-package and pi-extension, files allowlist, type: module
  • tsconfig.json: strict + noEmit, no outDir/declaration
  • biome.json mirrors pi-permissions
  • vitest.config.ts present
  • .gitignore includes .worktrees/
  • bun install, bunx biome check ., bunx tsc --noEmit, bun test all run cleanly

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions