Document the worktree config section #324
Labels
No labels
batch
bug
chore
documentation
enhancement
pi-loop
ready
resume
No milestone
No project
No assignees
1 participant
Notifications
Due date
Dependencies
No dependencies set
Reference
david/pi-loop#324
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Update all user-facing documentation for the new
worktree:section:AGENTS.md,README.md,DESIGN.md§7.1,piloop-config.example.yaml, andCHANGELOG.md.Background
Earlier steps in this series implement ADR-022 (already in the repo at
docs/adr/022-configurable-worktree-dir.md): theworktree:config section, parse-timedirvalidation, worktree routing for both repo kinds, and the widened early issue-fetch gate. The docs now have to describe the implemented behavior:worktree: { enabled?: boolean, dir?: string }inpiloop-config.yaml.enableddefaults totruewhen the section is present;diris required whenenabledis true (no hidden defaults).enabled: false→ today's behavior,dirnever validated.dirrules (all checked at config-parse time, before any git/agent work, raised asConfigFileError→error.jsonwithkind: config, exit 1): absolute only; no tilde (dedicated message advising the full path); not equal to or inside the launch repo root (separator-aware test; a parent of the repo is allowed); exists and is a directory. Deliberately no writability test.dirfor both bare repos and normal clones (linked worktree — the run's cwd has a.gitfile, not a directory). Absent or disabled → today's behavior (bare: worktree next to the repo; normal clone: run in place).dirnever moves an in-flight tree).PILOOP_WORKTREE_DIR/PILOOP_WORKTREE_ENABLEDenvironment variables.enabled: true), an issue-API error now aborts the run before any stage as aGitWorktreeError(stderr, exit 1, noerror.json); today a normal clone reaches the issue-fetch stage, which has the bounded-retry policy.Depends on: #320, #321, #322, #323 (the docs describe their combined behavior).
Implementation Details
Files:
AGENTS.md,README.md,DESIGN.md,piloop-config.example.yaml,CHANGELOG.md.AGENTS.md— add aworktree:bullet in the Configuration (env) section next to thedocs:/research:bullets, covering the section, its default, the parse-time validation, and the normal-clone behavior change.README.md— extend thepiloop-config.yamlsection with aworktree:example and the five-row decision table from ADR-022 §2.DESIGN.md§7.1 — addworktreeto the config-file schema listing.piloop-config.example.yaml— add a commented-outworktree:block. A unit test (src/config/services/configFile.test.ts→piloop-config.example.yaml) parses this file, so it must stay valid: a liveworktree:block withoutdirwould fail the strict parser.CHANGELOG.md— entry covering: the newworktree:section; worktree mode for normal clones when enabled; the behavior change (issue-API errors in worktree mode abort before any stage asGitWorktreeError, noerror.json); YAML-only, no env vars.Acceptance Criteria
AGENTS.md's Configuration section documentsworktree.enabled(defaulttrue),worktree.dir(required when enabled is true), the parse-time validation, and the normal-clone behavior change.README.md's config section shows a validworktree:example and the decision table.DESIGN.md§7.1's schema listing includesworktree.piloop-config.example.yamlhas a commented-outworktree:block and still parses in the existing example-file test.CHANGELOG.mdhas an entry containing the four bullets above.npm run lintandnpm testare clean.Test Plan
Run
npm run lintandnpm test— the existingpiloop-config.example.yamltest inconfigFile.test.tsis the guard for the example file.pi-loop opened and merged a pull request for this issue: #330