Skip to content

Rename .pg to .ppg across codebase#47

Closed
2witstudios wants to merge 1 commit into
mainfrom
ppg/rename-pg-to-ppg
Closed

Rename .pg to .ppg across codebase#47
2witstudios wants to merge 1 commit into
mainfrom
ppg/rename-pg-to-ppg

Conversation

@2witstudios

@2witstudios 2witstudios commented Feb 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Renamed the config directory constant from .pg to .ppg to match the tool name (ppg)
  • Updated all source code references (paths.ts constant, init.ts gitignore entries and messages, cli.ts help text, list.ts/swarm.ts/pr.ts user-facing strings)
  • Updated all test files (paths.test.ts, pr.test.ts, swarm.test.ts, template.test.ts, test-fixtures.ts)
  • Updated all documentation (CLAUDE.md, README.md, vision.md, skills/ppg-conductor references)

Test plan

  • All 176 tests pass (npm test)
  • TypeScript typecheck passes (npm run typecheck)
  • No remaining .pg/ references in source or docs (verified via grep)
  • Existing .pg/ directories on disk are unaffected — users get .ppg/ on next ppg init

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated all documentation references to reflect the new internal directory structure and naming convention.
  • Chores

    • Renamed internal configuration and state directory from .pg to .ppg throughout the codebase, affecting configuration files, templates, results, logs, and other stored data locations. Updated corresponding help text, error messages, and test fixtures.

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Feb 26, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The pull request renames the project's internal configuration and state directory from .pg to .ppg throughout the codebase. Changes include updates to documentation, CLI help text, the core path constant, initialization output, gitignore entries, and test expectations.

Changes

Cohort / File(s) Summary
Documentation
CLAUDE.md, README.md, vision.md, skills/ppg-conductor/references/conductor.md
Updated path references from .pg/ to .ppg/ for manifest, config, templates, results, and swarms directories in public documentation and guides.
Path Definitions
src/lib/paths.ts, src/lib/paths.test.ts
Core constant PG_DIR renamed from '.pg' to '.ppg' and all dependent path tests updated to expect new directory naming.
CLI and Commands
src/cli.ts, src/commands/init.ts, src/commands/list.ts, src/commands/pr.ts, src/commands/swarm.ts
Updated CLI help text, initialization output, gitignore entries, error messages, and user-facing guidance to reference .ppg/ instead of .pg/ for templates, swarms, results, and prompts.
Command Documentation
skills/ppg-conductor/references/commands.md
Updated CLI reference guide with new .ppg/ paths for initialization, template handling, swarm references, and JSON output examples.
Test Files
src/commands/pr.test.ts, src/core/swarm.test.ts, src/core/template.test.ts, src/test-fixtures.ts
Updated test environment paths, expected path assertions, and fixture definitions to reflect .ppg/ directory structure.

Possibly related PRs

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 From .pg to .ppg the paths now dance,
A rabbit's hop through each file with grace,
References updated, old homes left behind,
Directory naming gets a fresh redesign,
Consistency blooms across the whole space! 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: renaming the .pg directory to .ppg across the entire codebase.
Description check ✅ Passed The description includes all required sections (Summary, Test plan) with comprehensive details about changes made and test verification completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ppg/rename-pg-to-ppg

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/test-fixtures.ts (1)

12-12: Derive fixture resultFile using the path helper.

Line 12 duplicates the .ppg/results/... path logic instead of using resultFile().

♻️ 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.ts for 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: Use swarmsDir() instead of duplicating the path literal.

This test now hardcodes .ppg/swarms path 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.ts for 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

📥 Commits

Reviewing files that changed from the base of the PR and between ac15c05 and 1fafca1.

📒 Files selected for processing (16)
  • CLAUDE.md
  • README.md
  • skills/ppg-conductor/references/commands.md
  • skills/ppg-conductor/references/conductor.md
  • src/cli.ts
  • src/commands/init.ts
  • src/commands/list.ts
  • src/commands/pr.test.ts
  • src/commands/pr.ts
  • src/commands/swarm.ts
  • src/core/swarm.test.ts
  • src/core/template.test.ts
  • src/lib/paths.test.ts
  • src/lib/paths.ts
  • src/test-fixtures.ts
  • vision.md

Comment thread src/commands/init.ts
}

info('Created .pg/ directory structure');
info('Created .ppg/ directory structure');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Comment thread src/core/template.test.ts
BRANCH: 'ppg/feat',
AGENT_ID: 'ag-test1234',
RESULT_FILE: '/tmp/.pg/results/ag-test1234.md',
RESULT_FILE: '/tmp/.ppg/results/ag-test1234.md',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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.

@2witstudios
2witstudios deleted the ppg/rename-pg-to-ppg branch February 26, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant