Rename .pg to .ppg across codebase#47
Conversation
Change the config directory constant from '.pg' to '.ppg' to match the tool name (ppg). Updates all source code, tests, documentation, and skill references. The actual .pg/ directory on disk is not moved — users will get .ppg/ on next `ppg init`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe pull request renames the project's internal configuration and state directory from Changes
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
src/test-fixtures.ts (1)
12-12: Derive fixtureresultFileusing the path helper.Line 12 duplicates the
.ppg/results/...path logic instead of usingresultFile().♻️ Proposed refactor
import type { AgentEntry, WorktreeEntry } from './types/manifest.js'; import type { PaneInfo } from './core/tmux.js'; +import { resultFile as buildResultFile } from './lib/paths.js'; @@ - resultFile: '/tmp/project/.ppg/results/ag-test1234.md', + resultFile: buildResultFile('/tmp/project', 'ag-test1234'),As per coding guidelines: "Use path helper functions from
lib/paths.tsfor all path computation:pgDir(),manifestPath(),resultFile(),worktreePath(), etc. Never duplicate path logic".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/test-fixtures.ts` at line 12, Replace the hard-coded result path in src/test-fixtures.ts with the path helper: call resultFile(...) instead of the literal '/tmp/project/.ppg/results/ag-test1234.md' (e.g., resultFile('ag-test1234.md') or the correct fixture name), and ensure resultFile is imported from lib/paths.ts if not already; update the test fixture object that currently sets resultFile to the string so it uses the resultFile(...) helper.src/core/swarm.test.ts (1)
12-12: UseswarmsDir()instead of duplicating the path literal.This test now hardcodes
.ppg/swarmspath logic again.♻️ Proposed refactor
import { describe, test, expect, beforeEach, afterEach } from 'vitest'; import { listSwarms, loadSwarm } from './swarm.js'; +import { swarmsDir } from '../lib/paths.js'; @@ - SWARMS_DIR = path.join(TMP_ROOT, '.ppg', 'swarms'); + SWARMS_DIR = swarmsDir(TMP_ROOT);As per coding guidelines: "Use path helper functions from
lib/paths.tsfor all path computation:pgDir(),manifestPath(),resultFile(),worktreePath(), etc. Never duplicate path logic".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/core/swarm.test.ts` at line 12, Replace the hardcoded SWARMS_DIR path assignment with the swarmsDir() helper: import swarmsDir from the paths helper and set SWARMS_DIR = swarmsDir(TMP_ROOT) (or call swarmsDir() with the same root used in tests) instead of path.join(TMP_ROOT, '.ppg', 'swarms'); update any references in the test to use that constant so the path computation is centralized in the swarmsDir helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/commands/init.ts`:
- Line 88: Detect legacy `.pg/` before or when creating `.ppg/` in the init
command handler (the code path that logs info('Created .ppg/ directory
structure')): if a `.pg/` directory exists, emit a one-time migration warning
(write a marker such as `.ppg/.migration_warned` or set a flag in config) and
either perform an automatic migration (move manifest/results files from `.pg/`
into the new `.ppg/` layout and update ignore rules) or halt and instruct the
user to migrate; ensure you update the same init logic that runs around the
info('Created .ppg/ directory structure') and the related block at the region
mentioned (lines ~218-224) so legacy state is not orphaned and the warning is
recorded so it’s not shown repeatedly.
In `@src/core/template.test.ts`:
- Line 8: The RESULT_FILE fixture path is inconsistent with PROJECT_ROOT
(/tmp/project); update the RESULT_FILE constant used in
src/core/template.test.ts so its path is under the PROJECT_ROOT directory (e.g.,
use a path rooted at /tmp/project/.ppg/results/...) to keep the template context
consistent; modify the RESULT_FILE value referenced in the test to construct or
hardcode a path that uses PROJECT_ROOT instead of /tmp/.ppg.
---
Nitpick comments:
In `@src/core/swarm.test.ts`:
- Line 12: Replace the hardcoded SWARMS_DIR path assignment with the swarmsDir()
helper: import swarmsDir from the paths helper and set SWARMS_DIR =
swarmsDir(TMP_ROOT) (or call swarmsDir() with the same root used in tests)
instead of path.join(TMP_ROOT, '.ppg', 'swarms'); update any references in the
test to use that constant so the path computation is centralized in the
swarmsDir helper.
In `@src/test-fixtures.ts`:
- Line 12: Replace the hard-coded result path in src/test-fixtures.ts with the
path helper: call resultFile(...) instead of the literal
'/tmp/project/.ppg/results/ag-test1234.md' (e.g., resultFile('ag-test1234.md')
or the correct fixture name), and ensure resultFile is imported from
lib/paths.ts if not already; update the test fixture object that currently sets
resultFile to the string so it uses the resultFile(...) helper.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
CLAUDE.mdREADME.mdskills/ppg-conductor/references/commands.mdskills/ppg-conductor/references/conductor.mdsrc/cli.tssrc/commands/init.tssrc/commands/list.tssrc/commands/pr.test.tssrc/commands/pr.tssrc/commands/swarm.tssrc/core/swarm.test.tssrc/core/template.test.tssrc/lib/paths.test.tssrc/lib/paths.tssrc/test-fixtures.tsvision.md
| } | ||
|
|
||
| info('Created .pg/ directory structure'); | ||
| info('Created .ppg/ directory structure'); |
There was a problem hiding this comment.
Add legacy .pg/ upgrade handling (or explicit migration warning).
These updates fully switch init output/ignore rules to .ppg, but there is no visible safeguard for repos that still have only .pg/ state. That can orphan prior manifest/results context after upgrade.
At minimum, detect legacy .pg/ and emit a one-time migration warning; ideally add an automatic migration path.
Also applies to: 218-224
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/commands/init.ts` at line 88, Detect legacy `.pg/` before or when
creating `.ppg/` in the init command handler (the code path that logs
info('Created .ppg/ directory structure')): if a `.pg/` directory exists, emit a
one-time migration warning (write a marker such as `.ppg/.migration_warned` or
set a flag in config) and either perform an automatic migration (move
manifest/results files from `.pg/` into the new `.ppg/` layout and update ignore
rules) or halt and instruct the user to migrate; ensure you update the same init
logic that runs around the info('Created .ppg/ directory structure') and the
related block at the region mentioned (lines ~218-224) so legacy state is not
orphaned and the warning is recorded so it’s not shown repeatedly.
| BRANCH: 'ppg/feat', | ||
| AGENT_ID: 'ag-test1234', | ||
| RESULT_FILE: '/tmp/.pg/results/ag-test1234.md', | ||
| RESULT_FILE: '/tmp/.ppg/results/ag-test1234.md', |
There was a problem hiding this comment.
Fix inconsistent RESULT_FILE fixture path.
PROJECT_ROOT is /tmp/project, but Line 8 uses /tmp/.ppg/.... This mismatch makes the template context internally inconsistent.
💡 Proposed fix
- RESULT_FILE: '/tmp/.ppg/results/ag-test1234.md',
+ RESULT_FILE: '/tmp/project/.ppg/results/ag-test1234.md',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| RESULT_FILE: '/tmp/.ppg/results/ag-test1234.md', | |
| RESULT_FILE: '/tmp/project/.ppg/results/ag-test1234.md', |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/core/template.test.ts` at line 8, The RESULT_FILE fixture path is
inconsistent with PROJECT_ROOT (/tmp/project); update the RESULT_FILE constant
used in src/core/template.test.ts so its path is under the PROJECT_ROOT
directory (e.g., use a path rooted at /tmp/project/.ppg/results/...) to keep the
template context consistent; modify the RESULT_FILE value referenced in the test
to construct or hardcode a path that uses PROJECT_ROOT instead of /tmp/.ppg.
Summary
.pgto.ppgto match the tool name (ppg)Test plan
npm test)npm run typecheck).pg/references in source or docs (verified via grep).pg/directories on disk are unaffected — users get.ppg/on nextppg init🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores
.pgto.ppgthroughout the codebase, affecting configuration files, templates, results, logs, and other stored data locations. Updated corresponding help text, error messages, and test fixtures.