Skip to content

fix runtime path drift in v3 OpenCode release#97

Merged
Steffen025 merged 4 commits intomainfrom
feat/release-blocker-cleanup
Mar 28, 2026
Merged

fix runtime path drift in v3 OpenCode release#97
Steffen025 merged 4 commits intomainfrom
feat/release-blocker-cleanup

Conversation

@Steffen025
Copy link
Copy Markdown
Owner

@Steffen025 Steffen025 commented Mar 28, 2026

Summary

  • fix runtime import/path breakages that still pointed at legacy hooks/.claude locations after install
  • add missing PRD template helper in .opencode/plugins/lib/prd-template.ts and wire algorithm/session tooling to plugin paths
  • align post-install defaults and docs to OpenCode structure (.opencode/PAI/..., Telos/Fabric/Prompting workflow paths) and support both Google TTS env key variants

Verification

  • bun run .opencode/PAI/Tools/algorithm.ts --help
  • bun run .opencode/PAI/Tools/SessionHarvester.ts --recent 1 --dry-run
  • bun run .opencode/plugins/handlers/implicit-sentiment.ts
  • bun run .opencode/plugins/handlers/voice-notification.ts

Summary by CodeRabbit

  • New Features

    • Added a PRD template generator for creating structured product documents.
  • Bug Fixes / Improvements

    • Google Text‑to‑Speech now accepts either GOOGLE_API_KEY or GOOGLE_TTS_API_KEY.
  • Chores

    • Default runtime/config base moved from ~/.claude to ~/.opencode (respects OPENCODE_DIR).
    • PAI core bumped to 4.0.3 and algorithm to v3.7.0.
    • Many tool/workflow paths and module references updated to the OpenCode layout; installer now writes an explicit Google TTS env entry.
  • Documentation

    • Extensive docs and examples updated to reference the .opencode layout; added migration summary.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c9a57621-bc99-4469-9867-fa7e6319abd7

📥 Commits

Reviewing files that changed from the base of the PR and between bde2084 and fd7bfef.

📒 Files selected for processing (2)
  • .opencode/PAI/Tools/BannerRetro.ts
  • .opencode/skills/Utilities/PAIUpgrade/Tools/Anthropic.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • .opencode/skills/Utilities/PAIUpgrade/Tools/Anthropic.ts
  • .opencode/PAI/Tools/BannerRetro.ts

📝 Walkthrough

Walkthrough

This PR migrates runtime and storage paths from a Claude-based layout (~/.claude / PAI_DIR) to an OpenCode-based layout (process.env.OPENCODE_DIR / ~/.opencode), updates several relative imports from hooksplugins, adds a PRD template generator, and expands Google TTS credential resolution to accept GOOGLE_API_KEY or GOOGLE_TTS_API_KEY.

Changes

Cohort / File(s) Summary
Core runtime base path changes
.opencode/PAI/Tools/SessionHarvester.ts, .opencode/PAI/Tools/algorithm.ts, .opencode/PAI/Tools/AlgorithmPhaseReport.ts, .opencode/PAI/Tools/Banner*.ts, .opencode/PAI/Tools/FailureCapture.ts, .opencode/PAI/Tools/GetCounts.ts, .opencode/PAI/Tools/SessionProgress.ts, .opencode/PAI/Tools/*, PAI-Install/engine/steps-fresh.ts, .opencode/PAI/Tools/*.ts
Replaced hardcoded ~/.claude/PAI_DIR/CLAUDE_DIR with process.env.OPENCODE_DIR (fallback ~/.opencode), changing where state, memory, skills, counts, and artifacts are read/written.
Import path and plugin refactor
.opencode/PAI/Tools/SessionHarvester.ts, .opencode/PAI/Tools/algorithm.ts, .opencode/plugins/handlers/implicit-sentiment.ts, .opencode/plugins/handlers/update-counts.ts
Switched relative imports from ../../hooks/lib/...../../plugins/lib/... and adjusted other inference/import paths (minor path fixes only).
PRD template addition
.opencode/plugins/lib/prd-template.ts
Added PRD template generator exporting curateTitle, generatePRDFilename, generatePRDId, and generatePRDTemplate (title sanitization, id/filename generation, effort/mode defaults, and markdown frontmatter/body assembly).
Google TTS credential handling & installer
.opencode/plugins/handlers/voice-notification.ts, PAI-Install/engine/steps-fresh.ts
Expanded credential resolution to accept either GOOGLE_API_KEY or GOOGLE_TTS_API_KEY (checks settings/env); installer writes both entries when Google voice provider is used.
Counts / discovery path fixes
.opencode/plugins/handlers/update-counts.ts, .opencode/PAI/Tools/GetCounts.ts, .opencode/PAI/Tools/FeatureRegistry.ts
Adjusted file-counting and discovery roots to use PAI/-relative directories (e.g., PAI/USER) and updated CLI/documentation example paths to .opencode/PAI/Tools/*.
TELOS / Wisdom / Frames tooling
.opencode/skills/Telos/DashboardTemplate/Lib/telos-data.ts, .opencode/PAI/Tools/Wisdom*.ts
Redirected TELOS and wisdom/frame IO to OPENCODE_DIR-based roots by changing base directory resolution used to locate TELOS, frames, and related data.
User customization & skill doc paths (repo-wide sweep)
many .opencode/skills/..., .opencode/PAI/..., .opencode/agents/..., skill-packs/..., docs/... (see repo-wide sweep file)
Rewrote numerous documentation and SKILL.md references to remove legacy skills/CORE/ or skills/PAI/ segments and point to canonical PAI/ or reorganized skills/... locations under .opencode/OPENCODE_DIR.
Configuration / version bump
.opencode/settings.json
Updated PAI metadata and context files: paiVersion4.0.3-opencode, pai.version4.0.3, pai.algorithmv3.7.0, and contextFiles now reference PAI/-relative entries.
Small docs & usage comment tweaks
numerous files across .opencode/ and skill-packs/
Updated inline CLI/help comments, usage examples, and a few header @see references to reflect .opencode layout; mostly documentation-only edits.

Sequence Diagram(s)

(omitted — changes are primarily path/import migrations, a new template module, and a small credential handling expansion; no multi-component sequential flow requiring a diagram)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐇 I hopped through paths both old and new,
From Claude's small burrow to OpenCode's view,
Templates stitched and keys aligned,
Docs and tools in tidy lines,
A rabbit's patchwork, neat and true.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.39% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'fix runtime path drift in v3 OpenCode release' directly summarizes the main change: resolving runtime import and path breakages from legacy locations to OpenCode-native paths.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-blocker-cleanup

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
.opencode/PAI/Tools/algorithm.ts (1)

48-49: Missing PAI_DIR fallback for backward compatibility.

The VoiceServer/server.ts (lines 14-17) supports both OPENCODE_DIR and PAI_DIR for backward compatibility:

const baseDir =
  process.env.OPENCODE_DIR
  || process.env.PAI_DIR

This file only checks OPENCODE_DIR, which could break deployments that still set only PAI_DIR.

♻️ Suggested fix for consistency
 const HOME = process.env.HOME || "~";
-const BASE_DIR = process.env.OPENCODE_DIR || join(HOME, ".opencode");
+const BASE_DIR = process.env.OPENCODE_DIR || process.env.PAI_DIR || join(HOME, ".opencode");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/PAI/Tools/algorithm.ts around lines 48 - 49, BASE_DIR is only
falling back to process.env.OPENCODE_DIR which breaks setups using the legacy
PAI_DIR; update the BASE_DIR initialization to also check process.env.PAI_DIR
for backward compatibility (mirror the logic used in VoiceServer/server.ts).
Locate the HOME and BASE_DIR constants (HOME, BASE_DIR, and the use of join) and
change the BASE_DIR expression to prefer OPENCODE_DIR, then PAI_DIR, then
join(HOME, ".opencode") so existing deployments that set PAI_DIR continue to
work.
.opencode/skills/Utilities/Prompting/Standards.md (1)

1162-1178: Add language specifier to fenced code block.

The code block at line 1162 is missing a language specifier, which static analysis flagged. This should be plaintext or text for directory structure listings.

📝 Suggested fix
-```
+```text
 skills/Utilities/Prompting/
 ├── Templates/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Utilities/Prompting/Standards.md around lines 1162 - 1178,
The fenced code block that begins with "skills/Utilities/Prompting/" in
Standards.md is missing a language specifier; update that fenced block to
include a language tag (use "text" or "plaintext") so the directory listing is
properly recognized by linters and renderers—locate the block that contains the
tree lines (e.g., starting "skills/Utilities/Prompting/" and the nested
"Templates/" etc.) and add the language specifier immediately after the opening
triple backticks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.opencode/plugins/handlers/voice-notification.ts:
- Around line 243-250: The VoiceServer flow gates Google TTS/health checks on
GOOGLE_API_KEY only, but voice-notification.ts already accepts either
GOOGLE_API_KEY or GOOGLE_TTS_API_KEY via the googleApiKey resolution; update
VoiceServer to use the same dual-key resolution by extracting the lookup into a
shared resolver (e.g., getGoogleApiKey) and replace direct uses of
process.env.GOOGLE_API_KEY with that resolver so both GOOGLE_API_KEY and
GOOGLE_TTS_API_KEY are honored in health checks and runtime TTS paths (also
mirror the settings.env lookup used in voice-notification.ts).

In @.opencode/plugins/lib/prd-template.ts:
- Line 96: The template injects opts.sessionId directly into the frontmatter as
session_id which can produce invalid YAML for quotes/newlines; sanitize/escape
opts.sessionId before interpolation (e.g., implement a small escape function
that replaces backslashes with \\\\, double quotes with \\", and newlines with
\\n or use a YAML library like js-yaml to dump the value) and use the escaped
value when writing session_id: "${escapedSessionId}" so the frontmatter remains
valid; update the code that currently references opts.sessionId and the
session_id insertion accordingly.

In @.opencode/skills/Telos/DashboardTemplate/Lib/telos-data.ts:
- Line 12: TELOS read/write paths are inconsistent: TELOS_DIR in telos-data.ts
points to "~/.opencode/PAI/USER/TELOS" while the upload route writes to a
different directory; fix by standardizing on one canonical path and sharing it
instead of duplicating the literal. Export the TELOS_DIR constant from
telos-data.ts (symbol TELOS_DIR) and update the upload route handler (the upload
route in upload/route.ts) to import and use that exported TELOS_DIR for all file
writes, or alternatively change TELOS_DIR to match the current upload path if
you prefer that canonical value—ensuring both read and write code reference the
same TELOS_DIR symbol.

In @.opencode/skills/Telos/Workflows/WriteReport.md:
- Line 612: Update the maintenance copy commands that use incorrect
capitalization: replace the capitalized subpaths "Public/Fonts", "Components",
and "App" in the cp commands shown (e.g., the command starting with "cp
~/Projects/ULSite/...") with the lowercase project directories "public/fonts",
"components", and "app" so they match the repository tree and avoid
case-sensitive path errors.

---

Nitpick comments:
In @.opencode/PAI/Tools/algorithm.ts:
- Around line 48-49: BASE_DIR is only falling back to process.env.OPENCODE_DIR
which breaks setups using the legacy PAI_DIR; update the BASE_DIR initialization
to also check process.env.PAI_DIR for backward compatibility (mirror the logic
used in VoiceServer/server.ts). Locate the HOME and BASE_DIR constants (HOME,
BASE_DIR, and the use of join) and change the BASE_DIR expression to prefer
OPENCODE_DIR, then PAI_DIR, then join(HOME, ".opencode") so existing deployments
that set PAI_DIR continue to work.

In @.opencode/skills/Utilities/Prompting/Standards.md:
- Around line 1162-1178: The fenced code block that begins with
"skills/Utilities/Prompting/" in Standards.md is missing a language specifier;
update that fenced block to include a language tag (use "text" or "plaintext")
so the directory listing is properly recognized by linters and renderers—locate
the block that contains the tree lines (e.g., starting
"skills/Utilities/Prompting/" and the nested "Templates/" etc.) and add the
language specifier immediately after the opening triple backticks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f365281-6016-4347-8b41-619f185a7423

📥 Commits

Reviewing files that changed from the base of the PR and between 169348c and f0a0523.

📒 Files selected for processing (14)
  • .opencode/PAI/Tools/SessionHarvester.ts
  • .opencode/PAI/Tools/algorithm.ts
  • .opencode/plugins/handlers/implicit-sentiment.ts
  • .opencode/plugins/handlers/update-counts.ts
  • .opencode/plugins/handlers/voice-notification.ts
  • .opencode/plugins/lib/prd-template.ts
  • .opencode/settings.json
  • .opencode/skills/Agents/Tools/ComposeAgent.ts
  • .opencode/skills/Research/Workflows/ExtractAlpha.md
  • .opencode/skills/Research/Workflows/Fabric.md
  • .opencode/skills/Telos/DashboardTemplate/Lib/telos-data.ts
  • .opencode/skills/Telos/Workflows/WriteReport.md
  • .opencode/skills/Utilities/Prompting/Standards.md
  • PAI-Install/engine/steps-fresh.ts

Comment on lines +28 to +31
const OPENCODE_DIR = process.env.OPENCODE_DIR || path.join(process.env.HOME!, ".opencode");
// Derive the project slug dynamically from current working directory
const CWD_SLUG = process.cwd().replace(/[\/\.]/g, "-");
const PROJECTS_DIR = path.join(OPENCODE_DIR, "projects", CWD_SLUG);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

CWD_SLUG derivation produces problematic path slugs.

The regex replace(/[\/\.]/g, "-") will produce slugs like -home-user-projects-myproject:

  • Leading dash from the root /
  • Multiple consecutive dashes from paths like /./
  • Not normalized or trimmed

This may cause inconsistent session directories and break the deterministic slug naming contract mentioned in SKILL.md.

Additionally, missing PAI_DIR fallback (same pattern as algorithm.ts).

🔧 Suggested fix for slug normalization
-const OPENCODE_DIR = process.env.OPENCODE_DIR || path.join(process.env.HOME!, ".opencode");
+const OPENCODE_DIR = process.env.OPENCODE_DIR || process.env.PAI_DIR || path.join(process.env.HOME!, ".opencode");
 // Derive the project slug dynamically from current working directory
-const CWD_SLUG = process.cwd().replace(/[\/\.]/g, "-");
+const CWD_SLUG = process.cwd()
+  .replace(/[\/\.]/g, "-")
+  .replace(/^-+/, "")         // Remove leading dashes
+  .replace(/-+/g, "-");       // Collapse consecutive dashes
📝 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
const OPENCODE_DIR = process.env.OPENCODE_DIR || path.join(process.env.HOME!, ".opencode");
// Derive the project slug dynamically from current working directory
const CWD_SLUG = process.cwd().replace(/[\/\.]/g, "-");
const PROJECTS_DIR = path.join(OPENCODE_DIR, "projects", CWD_SLUG);
const OPENCODE_DIR = process.env.OPENCODE_DIR || process.env.PAI_DIR || path.join(process.env.HOME!, ".opencode");
// Derive the project slug dynamically from current working directory
const CWD_SLUG = process.cwd()
.replace(/[\/\.]/g, "-")
.replace(/^-+/, "") // Remove leading dashes
.replace(/-+/g, "-"); // Collapse consecutive dashes
const PROJECTS_DIR = path.join(OPENCODE_DIR, "projects", CWD_SLUG);

Comment on lines +243 to +250
const googleApiKey =
settings.env?.GOOGLE_API_KEY ||
settings.env?.GOOGLE_TTS_API_KEY ||
process.env.GOOGLE_API_KEY ||
process.env.GOOGLE_TTS_API_KEY;

if (!googleApiKey) {
fileLog("[Voice:Google] No API key configured (GOOGLE_TTS_API_KEY)", "debug");
fileLog("[Voice:Google] No API key configured (GOOGLE_API_KEY/GOOGLE_TTS_API_KEY)", "debug");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Dual-key support is still inconsistent across runtime TTS paths.

Line 243-247 and Line 356-361 now accept GOOGLE_API_KEY and GOOGLE_TTS_API_KEY, but the provided .opencode/VoiceServer/server.ts snippets still gate Google TTS/health on GOOGLE_API_KEY only. This leaves a runtime gap where GOOGLE_TTS_API_KEY-only setups can still fail or be reported as unconfigured in VoiceServer flows. Please align VoiceServer credential resolution with this same dual-key logic (ideally via a shared resolver).

Also applies to: 356-361

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/plugins/handlers/voice-notification.ts around lines 243 - 250, The
VoiceServer flow gates Google TTS/health checks on GOOGLE_API_KEY only, but
voice-notification.ts already accepts either GOOGLE_API_KEY or
GOOGLE_TTS_API_KEY via the googleApiKey resolution; update VoiceServer to use
the same dual-key resolution by extracting the lookup into a shared resolver
(e.g., getGoogleApiKey) and replace direct uses of process.env.GOOGLE_API_KEY
with that resolver so both GOOGLE_API_KEY and GOOGLE_TTS_API_KEY are honored in
health checks and runtime TTS paths (also mirror the settings.env lookup used in
voice-notification.ts).

prd: true
id: ${id}
title: "${curatedTitle.replace(/"/g, '\\"')}"
session_id: "${opts.sessionId || "unknown"}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Escape session_id before injecting into frontmatter.

Line 96 can produce invalid YAML when sessionId contains quotes/newlines.

Suggested fix
 export function generatePRDTemplate(opts: PRDOptions): string {
 	const today = new Date().toISOString().split("T")[0];
 	const timestamp = new Date().toISOString();
 	const id = generatePRDId(opts.slug);
+	const safeSessionId = (opts.sessionId || "unknown")
+		.replace(/\\/g, "\\\\")
+		.replace(/"/g, '\\"')
+		.replace(/\r?\n/g, " ");
 	const effort = opts.effortLevel || "Standard";
 	const effortUpper = effort.toUpperCase();
 	const mode = opts.mode || "interactive";
@@
-session_id: "${opts.sessionId || "unknown"}"
+session_id: "${safeSessionId}"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/plugins/lib/prd-template.ts at line 96, The template injects
opts.sessionId directly into the frontmatter as session_id which can produce
invalid YAML for quotes/newlines; sanitize/escape opts.sessionId before
interpolation (e.g., implement a small escape function that replaces backslashes
with \\\\, double quotes with \\", and newlines with \\n or use a YAML library
like js-yaml to dump the value) and use the escaped value when writing
session_id: "${escapedSessionId}" so the frontmatter remains valid; update the
code that currently references opts.sessionId and the session_id insertion
accordingly.

}

const TELOS_DIR = path.join(os.homedir(), '.opencode/skills/CORE/USER/TELOS')
const TELOS_DIR = path.join(os.homedir(), '.opencode/PAI/USER/TELOS')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

TELOS read/write paths are now inconsistent across the dashboard flow.

Line 12 reads from ~/.opencode/PAI/USER/TELOS, but .opencode/skills/Telos/DashboardTemplate/App/api/upload/route.ts still writes to ~/.opencode/skills/life/telos. Uploaded files will not show up in reads.

Cross-file fix to keep upload and read paths aligned
--- a/.opencode/skills/Telos/DashboardTemplate/App/api/upload/route.ts
+++ b/.opencode/skills/Telos/DashboardTemplate/App/api/upload/route.ts
@@
-const TELOS_DIR = path.join(os.homedir(), '.opencode/skills/life/telos')
+const TELOS_DIR = path.join(os.homedir(), '.opencode/PAI/USER/TELOS')
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Telos/DashboardTemplate/Lib/telos-data.ts at line 12, TELOS
read/write paths are inconsistent: TELOS_DIR in telos-data.ts points to
"~/.opencode/PAI/USER/TELOS" while the upload route writes to a different
directory; fix by standardizing on one canonical path and sharing it instead of
duplicating the literal. Export the TELOS_DIR constant from telos-data.ts
(symbol TELOS_DIR) and update the upload route handler (the upload route in
upload/route.ts) to import and use that exported TELOS_DIR for all file writes,
or alternatively change TELOS_DIR to match the current upload path if you prefer
that canonical value—ensuring both read and write code reference the same
TELOS_DIR symbol.

```bash
# Copy latest fonts from ULSite
cp ~/Projects/ULSite/public/fonts/*.woff2 ~/.opencode/skills/_TELOS/report-template/public/fonts/
cp ~/Projects/ULSite/public/fonts/*.woff2 ~/.opencode/skills/Telos/ReportTemplate/Public/Fonts/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix path casing in maintenance commands.

Lines 612/617/620 use capitalized subpaths (Public/Fonts, Components, App) that conflict with the lowercase project tree shown in this file (public, components, app).

Suggested doc fix
-cp ~/Projects/ULSite/public/fonts/*.woff2 ~/.opencode/skills/Telos/ReportTemplate/Public/Fonts/
+cp ~/Projects/ULSite/public/fonts/*.woff2 ~/.opencode/skills/Telos/ReportTemplate/public/fonts/

-Edit files in `~/.opencode/skills/Telos/ReportTemplate/Components/`
+Edit files in `~/.opencode/skills/Telos/ReportTemplate/components/`

-Edit CSS custom properties in `~/.opencode/skills/Telos/ReportTemplate/App/globals.css`
+Edit CSS custom properties in `~/.opencode/skills/Telos/ReportTemplate/app/globals.css`

Also applies to: 617-617, 620-620

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Telos/Workflows/WriteReport.md at line 612, Update the
maintenance copy commands that use incorrect capitalization: replace the
capitalized subpaths "Public/Fonts", "Components", and "App" in the cp commands
shown (e.g., the command starting with "cp ~/Projects/ULSite/...") with the
lowercase project directories "public/fonts", "components", and "app" so they
match the repository tree and avoid case-sensitive path errors.

@Steffen025
Copy link
Copy Markdown
Owner Author

Completed the repo-wide OpenCode path sweep and pushed commit 8f016ba.

What was done:

  • Rewired remaining .opencode runtime/tooling and skill workflow references away from legacy ~/.claude, skills/PAI, and skills/CORE paths where actionable.
  • Updated agent/skill docs and cost-aware skill-pack references to OpenCode-native conventions.
  • Added findings report: docs/REPO-PATH-SWEEP-2026-03-28.md.

Verification rerun:

  • bun run .opencode/PAI/Tools/pai.ts --help
  • bun run .opencode/PAI/Tools/algorithm.ts --help

Note:

  • One legacy fallback remains intentionally deferred in .opencode/skills/Security/WebAssessment/OsintTools/osint-api-tools.py because editing that file via current tooling introduces large CRLF/LF churn. It is documented in the findings report.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.opencode/skills/Utilities/CreateCLI/SKILL.md (1)

55-363: ⚠️ Potential issue | 🟠 Major

PAI SKILL.md structure is missing explicit MANDATORY/OPTIONAL sections

This file was modified, so it should conform to the PAI v3.0 SKILL format. The current structure does not define explicit MANDATORY and OPTIONAL sections.

As per coding guidelines, .opencode/skills/** must have SKILL.md in PAI v3.0 format including “USE WHEN triggers” and “MANDATORY/OPTIONAL sections”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Utilities/CreateCLI/SKILL.md around lines 55 - 363, The
SKILL.md is missing explicit MANDATORY and OPTIONAL sections required by PAI
v3.0; update the document (SKILL.md) to include a top-level "MANDATORY" section
listing required fields (e.g., "USE WHEN triggers", core capabilities summary,
technology stack alignment, quality gates) and an "OPTIONAL" section for
non-required items (examples, extended context, templates), ensuring "USE WHEN"
triggers are clearly labeled under MANDATORY; keep existing content but move or
rename the "WHEN TO ACTIVATE THIS SKILL" and related trigger text into a "USE
WHEN" subsection of MANDATORY, and add a brief OPTIONAL block noting examples
and extended context.
.opencode/skills/Utilities/PAIUpgrade/Workflows/CheckForUpgrades.md (1)

25-124: ⚠️ Potential issue | 🔴 Critical

Update Anthropic.ts to reference the correct paths matching the new directory structure.

The workflow documentation has been updated to reflect the new structure (.opencode/skills/Utilities/PAIUpgrade/), but the Anthropic.ts tool still references the old path (.opencode/skills/PAIUpgrade/). This causes a mismatch:

  • Workflow expects config files at: ~/.opencode/skills/Utilities/PAIUpgrade/sources.json
  • Tool looks for them at: ~/.opencode/skills/PAIUpgrade/sources.json

The tool's SKILL_DIR must be updated to include the "Utilities" tier:

const SKILL_DIR = join(HOME, '.opencode', 'skills', 'Utilities', 'PAIUpgrade');

Without this fix, the workflow will fail at runtime when it attempts to load sources and manage state.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Utilities/PAIUpgrade/Workflows/CheckForUpgrades.md around
lines 25 - 124, The Anthropic tool (Anthropic.ts) uses the old SKILL_DIR path
and therefore fails to find sources/state; update the SKILL_DIR constant in
Anthropic.ts to point to the new directory tier by including "Utilities" (i.e.,
set SKILL_DIR to join(HOME, '.opencode', 'skills', 'Utilities', 'PAIUpgrade')),
then verify any other path builds in the file (e.g., where sources.json,
State/last-check.json, youtube-channels.json are referenced) use SKILL_DIR so
all file lookups match the workflow's .opencode/skills/Utilities/PAIUpgrade
structure.
🧹 Nitpick comments (4)
.opencode/skills/Utilities/CreateCLI/SKILL.md (1)

9-9: Use OPENCODE_DIR-aware path in customization lookup docs

Line 9 hardcodes ~/.opencode/...; this can mislead users with a custom OPENCODE_DIR. Prefer documenting the path as environment-aware.

Proposed doc tweak
-`~/.opencode/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/`
+`${OPENCODE_DIR:-~/.opencode}/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/skills/Utilities/CreateCLI/SKILL.md at line 9, Replace the
hardcoded path string "~/.opencode/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/" in
SKILL.md with an OPENCODE_DIR-aware form (e.g.,
"$OPENCODE_DIR/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/" or a fallback like
"${OPENCODE_DIR:-~/.opencode}/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/") and
update the surrounding text to mention that OPENCODE_DIR may be customized so
users should substitute their OPENCODE_DIR when looking up customizations.
.opencode/PAI/Tools/pai.ts (1)

31-34: Consider renaming CLAUDE_DIR to OPENCODE_DIR for consistency.

The variable CLAUDE_DIR now points to .opencode but retains the legacy name, which may confuse future maintainers. Renaming it to OPENCODE_DIR (or BASE_DIR) would improve clarity.

♻️ Proposed rename
-const CLAUDE_DIR = process.env.OPENCODE_DIR || join(homedir(), ".opencode");
-const MCP_DIR = join(CLAUDE_DIR, "MCPs");
-const ACTIVE_MCP = join(CLAUDE_DIR, ".mcp.json");
-const BANNER_SCRIPT = join(CLAUDE_DIR, "PAI", "Tools", "Banner.ts");
+const OPENCODE_DIR = process.env.OPENCODE_DIR || join(homedir(), ".opencode");
+const MCP_DIR = join(OPENCODE_DIR, "MCPs");
+const ACTIVE_MCP = join(OPENCODE_DIR, ".mcp.json");
+const BANNER_SCRIPT = join(OPENCODE_DIR, "PAI", "Tools", "Banner.ts");

Note: This would also require updating references in cmdLaunch (line 420), cmdPrompt (line 562), and any other usages of CLAUDE_DIR throughout the file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/PAI/Tools/pai.ts around lines 31 - 34, Rename the legacy
CLAUDE_DIR constant to OPENCODE_DIR (or BASE_DIR) and update all usages in this
file (e.g., references inside cmdLaunch and cmdPrompt and any other places) to
use the new symbol; keep the same initialization logic (process.env.OPENCODE_DIR
|| join(homedir(), ".opencode")) and update derived constants (MCP_DIR,
ACTIVE_MCP, BANNER_SCRIPT) to be defined from OPENCODE_DIR so behavior is
unchanged while names are consistent.
.opencode/PAI/SKILL.md (1)

296-296: Prefer env-aware path notation in the PRD instruction.

This line documents only the default root and can drift from runtime behavior when OPENCODE_DIR is customized.

♻️ Suggested wording
-- Create PRD at `~/.opencode/MEMORY/WORK/{session-slug}/PRD-{YYYYMMDD}-{slug}.md` via `generatePRDTemplate()`.
+- Create PRD at `${OPENCODE_DIR:-~/.opencode}/MEMORY/WORK/{session-slug}/PRD-{YYYYMMDD}-{slug}.md` via `generatePRDTemplate()`.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/PAI/SKILL.md at line 296, Update the documentation line to use an
env-aware path instead of the hardcoded default: refer to OPENCODE_DIR (e.g.
"${OPENCODE_DIR:-~/.opencode}/MEMORY/WORK/{session-slug}/PRD-{YYYYMMDD}-{slug}.md")
and mention that generatePRDTemplate() writes the PRD to that OPENCODE_DIR-based
location so the docs remain accurate when OPENCODE_DIR is customized.
.opencode/PAI/Tools/OpinionTracker.ts (1)

27-27: Consider a backward-compatible env fallback.

Line 27 currently ignores PAI_DIR. Adding it as a secondary fallback would preserve older automation setups while still preferring OPENCODE_DIR.

♻️ Proposed tweak
-const PAI_DIR = process.env.OPENCODE_DIR || join(process.env.HOME!, '.opencode');
+const PAI_DIR =
+  process.env.OPENCODE_DIR ||
+  process.env.PAI_DIR ||
+  join(process.env.HOME!, '.opencode');
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.opencode/PAI/Tools/OpinionTracker.ts at line 27, Update the PAI_DIR
initialization to be backward-compatible by falling back to the legacy PAI_DIR
environment variable before using HOME; specifically change the constant
initialization (PAI_DIR) so it prefers process.env.OPENCODE_DIR, then
process.env.PAI_DIR, then join(process.env.HOME!, '.opencode') to preserve older
automation while still favoring OPENCODE_DIR.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.opencode/agents/QATester.md:
- Line 209: Align the tool name used in the constitution and examples to the
canonical Browser skill: replace all occurrences of "browser-automation" with
"Browser" (the skill located at ~/.opencode/skills/Utilities/Browser/) so Line
209's mandate and the tool declarations are consistent; update any example
invocations, tool lists, and README mentions to use the exact symbol "Browser"
and remove contradictory statements that assert "browser-automation" as the
exclusive constitutional tool.

In @.opencode/PAI/Tools/BannerRetro.ts:
- Line 23: The CLAUDE_DIR variable name is legacy while its value now uses the
OpenCode root; rename CLAUDE_DIR to something like OPENCODE_DIR (or
OPENCODE_ROOT) wherever declared/used (the constant set via const CLAUDE_DIR =
process.env.OPENCODE_DIR || join(HOME, ".opencode")) and update all references
to the new identifier, and in the hook-counting logic that inspects the hooks
subpath (the code around the hooks/counter logic at the block referencing lines
~351-353), change the order to check plugins-first: if a plugins directory
exists under the OPENCODE_ROOT use that count, otherwise fall back to the
legacy/hooks path, and ensure logging/metrics reference the new OPENCODE_ROOT
name to avoid misreporting for plugin-only setups.

In @.opencode/PAI/Tools/FeatureRegistry.ts:
- Line 32: The REGISTRY_DIR constant currently uses process.env.OPENCODE_DIR
directly which allows relative paths to cause CWD-dependent drift; normalize
OPENCODE_DIR to an absolute path before joining by resolving
process.env.OPENCODE_DIR (e.g., via path.resolve) into a local OPENCODE_DIR
variable and then build REGISTRY_DIR from that (use the existing REGISTRY_DIR
symbol and join with 'MEMORY' and 'progress' so downstream uses remain
unchanged).

In @.opencode/PAI/Tools/IntegrityMaintenance.ts:
- Around line 722-723: The verification_commands array currently contains
hardcoded paths like "~/.opencode/PAI/Tools/UpdateSearch.ts" which ignore the
configured OPENCODE_DIR; update the code that sets verification_commands in
IntegrityMaintenance (the object literal where verification_commands is defined
around the UpdateSearch.ts invocation) to build the command strings using the
OPENCODE_DIR constant or process.env.OPENCODE_DIR (falling back to "~/.opencode"
only if unset), e.g. compose commands by joining OPENCODE_DIR with
"PAI/Tools/UpdateSearch.ts" and other targets so both occurrences (the one
around lines 722 and the similar one around 752) use the runtime install
directory rather than a hardcoded path.

In @.opencode/PAI/Tools/WisdomFrameUpdater.ts:
- Line 22: Replace the unsafe process.env.HOME! usage in the BASE_DIR constant
with Node's os.homedir() and import it at the top of the module; specifically
update the BASE_DIR definition (const BASE_DIR) to use join(homedir() || '.',
'.opencode') so it won't throw when HOME is unset and matches the pattern used
in db-archive.ts/migration-v2-to-v3.ts.

In @.opencode/skills/Telos/Workflows/Update.md:
- Line 291: Fix the casing mismatch in Update.md by replacing the incorrect
directory string `~/.opencode/PAI/USER/TELOS/Backups/` with the canonical
`~/.opencode/PAI/USER/TELOS/backups/` to match earlier definitions; ensure any
other occurrences in .opencode/skills/Telos/Workflows/Update.md use the same
lowercased `backups` path so case-sensitive filesystems won’t break.
- Line 108: The file-read command uses an unvalidated variable FILE in the
expression cat ~/.opencode/PAI/USER/TELOS/"$FILE", allowing path traversal; fix
by validating FILE before any read: implement an allowlist (e.g., VALID_FILES
array) and check that FILE exactly matches one of those entries, or at minimum
reject values containing '/' or '..' (and normalize with basename) before
executing the cat command; reference the FILE variable and the cat
~/.opencode/PAI/USER/TELOS/"$FILE" invocation when adding the validation and
early exit on invalid input.

In @.opencode/skills/Utilities/System/Workflows/PrivacyCheck.md:
- Line 152: The condition using file.includes("PAI/") is too broad; update the
privacy-exception check to match only the intended PAI directory boundaries
(e.g., files under ".opencode/PAI/" or repo-root "PAI/") instead of any path
containing the substring. Replace the includes check in the PrivacyCheck logic
that currently uses file.includes("PAI/") with a path-boundary check such as
testing file.startsWith(".opencode/PAI/") || file.startsWith("PAI/") or using a
regex that enforces a directory separator (e.g., /(^|\/)PAI\//) so backup-PAI/
or external-PAI/ do not match; update any related helper/validation functions
accordingly to use the new stricter match.

---

Outside diff comments:
In @.opencode/skills/Utilities/CreateCLI/SKILL.md:
- Around line 55-363: The SKILL.md is missing explicit MANDATORY and OPTIONAL
sections required by PAI v3.0; update the document (SKILL.md) to include a
top-level "MANDATORY" section listing required fields (e.g., "USE WHEN
triggers", core capabilities summary, technology stack alignment, quality gates)
and an "OPTIONAL" section for non-required items (examples, extended context,
templates), ensuring "USE WHEN" triggers are clearly labeled under MANDATORY;
keep existing content but move or rename the "WHEN TO ACTIVATE THIS SKILL" and
related trigger text into a "USE WHEN" subsection of MANDATORY, and add a brief
OPTIONAL block noting examples and extended context.

In @.opencode/skills/Utilities/PAIUpgrade/Workflows/CheckForUpgrades.md:
- Around line 25-124: The Anthropic tool (Anthropic.ts) uses the old SKILL_DIR
path and therefore fails to find sources/state; update the SKILL_DIR constant in
Anthropic.ts to point to the new directory tier by including "Utilities" (i.e.,
set SKILL_DIR to join(HOME, '.opencode', 'skills', 'Utilities', 'PAIUpgrade')),
then verify any other path builds in the file (e.g., where sources.json,
State/last-check.json, youtube-channels.json are referenced) use SKILL_DIR so
all file lookups match the workflow's .opencode/skills/Utilities/PAIUpgrade
structure.

---

Nitpick comments:
In @.opencode/PAI/SKILL.md:
- Line 296: Update the documentation line to use an env-aware path instead of
the hardcoded default: refer to OPENCODE_DIR (e.g.
"${OPENCODE_DIR:-~/.opencode}/MEMORY/WORK/{session-slug}/PRD-{YYYYMMDD}-{slug}.md")
and mention that generatePRDTemplate() writes the PRD to that OPENCODE_DIR-based
location so the docs remain accurate when OPENCODE_DIR is customized.

In @.opencode/PAI/Tools/OpinionTracker.ts:
- Line 27: Update the PAI_DIR initialization to be backward-compatible by
falling back to the legacy PAI_DIR environment variable before using HOME;
specifically change the constant initialization (PAI_DIR) so it prefers
process.env.OPENCODE_DIR, then process.env.PAI_DIR, then join(process.env.HOME!,
'.opencode') to preserve older automation while still favoring OPENCODE_DIR.

In @.opencode/PAI/Tools/pai.ts:
- Around line 31-34: Rename the legacy CLAUDE_DIR constant to OPENCODE_DIR (or
BASE_DIR) and update all usages in this file (e.g., references inside cmdLaunch
and cmdPrompt and any other places) to use the new symbol; keep the same
initialization logic (process.env.OPENCODE_DIR || join(homedir(), ".opencode"))
and update derived constants (MCP_DIR, ACTIVE_MCP, BANNER_SCRIPT) to be defined
from OPENCODE_DIR so behavior is unchanged while names are consistent.

In @.opencode/skills/Utilities/CreateCLI/SKILL.md:
- Line 9: Replace the hardcoded path string
"~/.opencode/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/" in SKILL.md with an
OPENCODE_DIR-aware form (e.g.,
"$OPENCODE_DIR/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/" or a fallback like
"${OPENCODE_DIR:-~/.opencode}/PAI/USER/SKILLCUSTOMIZATIONS/CreateCLI/") and
update the surrounding text to mention that OPENCODE_DIR may be customized so
users should substitute their OPENCODE_DIR when looking up customizations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 792c4071-2a56-4495-a1db-3c2301aa9672

📥 Commits

Reviewing files that changed from the base of the PR and between f0a0523 and 8f016ba.

📒 Files selected for processing (140)
  • .opencode/OPENCODE.md
  • .opencode/PAI/PAISYSTEMARCHITECTURE.md
  • .opencode/PAI/SKILL.md
  • .opencode/PAI/THEDELEGATIONSYSTEM.md
  • .opencode/PAI/Tools/AddBg.ts
  • .opencode/PAI/Tools/AlgorithmPhaseReport.ts
  • .opencode/PAI/Tools/Banner.ts
  • .opencode/PAI/Tools/BannerMatrix.ts
  • .opencode/PAI/Tools/BannerNeofetch.ts
  • .opencode/PAI/Tools/BannerRetro.ts
  • .opencode/PAI/Tools/FailureCapture.ts
  • .opencode/PAI/Tools/FeatureRegistry.ts
  • .opencode/PAI/Tools/GenerateSkillIndex.ts
  • .opencode/PAI/Tools/GetCounts.ts
  • .opencode/PAI/Tools/IntegrityMaintenance.ts
  • .opencode/PAI/Tools/LearningPatternSynthesis.ts
  • .opencode/PAI/Tools/LoadSkillConfig.ts
  • .opencode/PAI/Tools/NeofetchBanner.ts
  • .opencode/PAI/Tools/OpinionTracker.ts
  • .opencode/PAI/Tools/RelationshipReflect.ts
  • .opencode/PAI/Tools/RemoveBg.ts
  • .opencode/PAI/Tools/SessionProgress.ts
  • .opencode/PAI/Tools/SkillSearch.ts
  • .opencode/PAI/Tools/ValidateSkillStructure.ts
  • .opencode/PAI/Tools/WisdomCrossFrameSynthesizer.ts
  • .opencode/PAI/Tools/WisdomDomainClassifier.ts
  • .opencode/PAI/Tools/WisdomFrameUpdater.ts
  • .opencode/PAI/Tools/YouTubeApi.ts
  • .opencode/PAI/Tools/pai.ts
  • .opencode/PAI/USER/STATUSLINE/README.md
  • .opencode/agents/Algorithm.md
  • .opencode/agents/Architect.md
  • .opencode/agents/Artist.md
  • .opencode/agents/ClaudeResearcher.md
  • .opencode/agents/CodexResearcher.md
  • .opencode/agents/Designer.md
  • .opencode/agents/Engineer.md
  • .opencode/agents/GeminiResearcher.md
  • .opencode/agents/GrokResearcher.md
  • .opencode/agents/PerplexityResearcher.md
  • .opencode/agents/QATester.md
  • .opencode/plugins/handlers/update-counts.ts
  • .opencode/skills/Agents/AgentPersonalities.md
  • .opencode/skills/Agents/ArchitectContext.md
  • .opencode/skills/Agents/ArtistContext.md
  • .opencode/skills/Agents/CodexResearcherContext.md
  • .opencode/skills/Agents/DeepResearcherContext.md
  • .opencode/skills/Agents/DesignerContext.md
  • .opencode/skills/Agents/EngineerContext.md
  • .opencode/skills/Agents/GeminiResearcherContext.md
  • .opencode/skills/Agents/GrokResearcherContext.md
  • .opencode/skills/Agents/PerplexityResearcherContext.md
  • .opencode/skills/Agents/QATesterContext.md
  • .opencode/skills/Agents/REDESIGN-SUMMARY.md
  • .opencode/skills/Agents/SKILL.md
  • .opencode/skills/Agents/Workflows/SpawnParallelAgents.md
  • .opencode/skills/ContentAnalysis/ExtractWisdom/SKILL.md
  • .opencode/skills/ContentAnalysis/SKILL.md
  • .opencode/skills/Investigation/OSINT/SKILL.md
  • .opencode/skills/Investigation/PrivateInvestigator/SKILL.md
  • .opencode/skills/Investigation/SKILL.md
  • .opencode/skills/Media/Art/SKILL.md
  • .opencode/skills/Media/Art/Workflows/AdHocYouTubeThumbnail.md
  • .opencode/skills/Media/Art/Workflows/CreatePAIPackIcon.md
  • .opencode/skills/Media/Art/Workflows/Essay.md
  • .opencode/skills/Media/Art/Workflows/Mermaid.md
  • .opencode/skills/Media/Art/Workflows/Visualize.md
  • .opencode/skills/Media/Remotion/ArtIntegration.md
  • .opencode/skills/Media/Remotion/SKILL.md
  • .opencode/skills/Media/Remotion/Tools/Theme.ts
  • .opencode/skills/Media/Remotion/Workflows/ContentToAnimation.md
  • .opencode/skills/Media/SKILL.md
  • .opencode/skills/Research/SKILL.md
  • .opencode/skills/Research/Workflows/Retrieve.md
  • .opencode/skills/Research/Workflows/WebScraping.md
  • .opencode/skills/Research/Workflows/YoutubeExtraction.md
  • .opencode/skills/Scraping/Apify/SKILL.md
  • .opencode/skills/Scraping/BrightData/SKILL.md
  • .opencode/skills/Scraping/SKILL.md
  • .opencode/skills/Security/AnnualReports/SKILL.md
  • .opencode/skills/Security/PromptInjection/SKILL.md
  • .opencode/skills/Security/Recon/SKILL.md
  • .opencode/skills/Security/SECUpdates/SKILL.md
  • .opencode/skills/Security/SKILL.md
  • .opencode/skills/Security/WebAssessment/SKILL.md
  • .opencode/skills/Security/WebAssessment/Workflows/ffuf/FfufGuide.md
  • .opencode/skills/Security/WebAssessment/Workflows/webapp/TestingGuide.md
  • .opencode/skills/Telos/SKILL.md
  • .opencode/skills/Telos/Workflows/Update.md
  • .opencode/skills/Thinking/BeCreative/SKILL.md
  • .opencode/skills/Thinking/Council/SKILL.md
  • .opencode/skills/Thinking/FirstPrinciples/SKILL.md
  • .opencode/skills/Thinking/IterativeDepth/SKILL.md
  • .opencode/skills/Thinking/RedTeam/SKILL.md
  • .opencode/skills/Thinking/SKILL.md
  • .opencode/skills/Thinking/Science/SKILL.md
  • .opencode/skills/Thinking/WorldThreatModelHarness/SKILL.md
  • .opencode/skills/USMetrics/SKILL.md
  • .opencode/skills/Utilities/Aphorisms/SKILL.md
  • .opencode/skills/Utilities/Browser/README.md
  • .opencode/skills/Utilities/Browser/SKILL.md
  • .opencode/skills/Utilities/Cloudflare/SKILL.md
  • .opencode/skills/Utilities/CreateCLI/SKILL.md
  • .opencode/skills/Utilities/CreateCLI/Workflows/CreateCli.md
  • .opencode/skills/Utilities/CreateSkill/SKILL.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/CanonicalizeSkill.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/CreateSkill.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/UpdateSkill.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/ValidateSkill.md
  • .opencode/skills/Utilities/Documents/SKILL.md
  • .opencode/skills/Utilities/Docx/SKILL.md
  • .opencode/skills/Utilities/Evals/SKILL.md
  • .opencode/skills/Utilities/Fabric/SKILL.md
  • .opencode/skills/Utilities/OpenCodeSystem/SKILL.md
  • .opencode/skills/Utilities/PAIUpgrade/SKILL.md
  • .opencode/skills/Utilities/PAIUpgrade/Workflows/CheckForUpgrades.md
  • .opencode/skills/Utilities/PAIUpgrade/Workflows/FindSources.md
  • .opencode/skills/Utilities/Parser/SKILL.md
  • .opencode/skills/Utilities/Pdf/SKILL.md
  • .opencode/skills/Utilities/Pptx/SKILL.md
  • .opencode/skills/Utilities/Prompting/SKILL.md
  • .opencode/skills/Utilities/Prompting/Templates/README.md
  • .opencode/skills/Utilities/SKILL.md
  • .opencode/skills/Utilities/Sales/SKILL.md
  • .opencode/skills/Utilities/Sales/Workflows/CreateSalesPackage.md
  • .opencode/skills/Utilities/Sales/Workflows/CreateVisual.md
  • .opencode/skills/Utilities/System/SKILL.md
  • .opencode/skills/Utilities/System/Workflows/CrossRepoValidation.md
  • .opencode/skills/Utilities/System/Workflows/IntegrityCheck.md
  • .opencode/skills/Utilities/System/Workflows/PrivacyCheck.md
  • .opencode/skills/Utilities/WriteStory/SKILL.md
  • .opencode/skills/Utilities/Xlsx/SKILL.md
  • docs/REPO-PATH-SWEEP-2026-03-28.md
  • skill-packs/cost-aware-research/README.md
  • skill-packs/cost-aware-research/SKILL.md
  • skill-packs/cost-aware-research/Workflows/ExtractAlpha.md
  • skill-packs/cost-aware-research/Workflows/Fabric.md
  • skill-packs/cost-aware-research/Workflows/Retrieve.md
  • skill-packs/cost-aware-research/Workflows/WebScraping.md
  • skill-packs/cost-aware-research/Workflows/YoutubeExtraction.md
✅ Files skipped from review due to trivial changes (85)
  • .opencode/skills/Research/Workflows/Retrieve.md
  • skill-packs/cost-aware-research/README.md
  • skill-packs/cost-aware-research/Workflows/Retrieve.md
  • .opencode/PAI/Tools/SkillSearch.ts
  • .opencode/skills/Agents/Workflows/SpawnParallelAgents.md
  • .opencode/skills/Agents/ArtistContext.md
  • .opencode/skills/Agents/ArchitectContext.md
  • .opencode/skills/Investigation/PrivateInvestigator/SKILL.md
  • .opencode/skills/Scraping/Apify/SKILL.md
  • .opencode/skills/Media/Remotion/SKILL.md
  • .opencode/skills/Media/Remotion/Tools/Theme.ts
  • .opencode/OPENCODE.md
  • .opencode/PAI/USER/STATUSLINE/README.md
  • .opencode/PAI/Tools/AddBg.ts
  • .opencode/skills/Media/Remotion/ArtIntegration.md
  • .opencode/PAI/Tools/RemoveBg.ts
  • .opencode/skills/Investigation/SKILL.md
  • .opencode/skills/ContentAnalysis/SKILL.md
  • .opencode/skills/Agents/GeminiResearcherContext.md
  • .opencode/skills/Media/Remotion/Workflows/ContentToAnimation.md
  • .opencode/PAI/Tools/ValidateSkillStructure.ts
  • .opencode/skills/Media/SKILL.md
  • .opencode/skills/Media/Art/Workflows/Visualize.md
  • .opencode/PAI/THEDELEGATIONSYSTEM.md
  • .opencode/agents/GeminiResearcher.md
  • .opencode/skills/Research/SKILL.md
  • docs/REPO-PATH-SWEEP-2026-03-28.md
  • .opencode/skills/Agents/REDESIGN-SUMMARY.md
  • .opencode/agents/GrokResearcher.md
  • .opencode/PAI/PAISYSTEMARCHITECTURE.md
  • .opencode/skills/Scraping/BrightData/SKILL.md
  • .opencode/skills/Research/Workflows/YoutubeExtraction.md
  • .opencode/PAI/Tools/GenerateSkillIndex.ts
  • .opencode/skills/Agents/GrokResearcherContext.md
  • .opencode/skills/Agents/DeepResearcherContext.md
  • .opencode/skills/Agents/EngineerContext.md
  • .opencode/agents/ClaudeResearcher.md
  • .opencode/skills/Agents/AgentPersonalities.md
  • .opencode/skills/Agents/PerplexityResearcherContext.md
  • .opencode/agents/Engineer.md
  • .opencode/agents/PerplexityResearcher.md
  • .opencode/skills/Agents/DesignerContext.md
  • .opencode/skills/Agents/CodexResearcherContext.md
  • .opencode/skills/Research/Workflows/WebScraping.md
  • .opencode/PAI/Tools/LoadSkillConfig.ts
  • .opencode/skills/Media/Art/Workflows/Mermaid.md
  • .opencode/PAI/Tools/YouTubeApi.ts
  • .opencode/skills/Security/WebAssessment/SKILL.md
  • .opencode/agents/Architect.md
  • .opencode/agents/CodexResearcher.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/ValidateSkill.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/CanonicalizeSkill.md
  • .opencode/skills/Utilities/CreateSkill/SKILL.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/UpdateSkill.md
  • .opencode/skills/Utilities/PAIUpgrade/Workflows/FindSources.md
  • skill-packs/cost-aware-research/Workflows/Fabric.md
  • .opencode/skills/Utilities/Fabric/SKILL.md
  • .opencode/skills/Utilities/CreateCLI/Workflows/CreateCli.md
  • skill-packs/cost-aware-research/Workflows/YoutubeExtraction.md
  • .opencode/skills/Utilities/Prompting/SKILL.md
  • .opencode/skills/Utilities/Evals/SKILL.md
  • .opencode/skills/Agents/QATesterContext.md
  • .opencode/skills/Thinking/IterativeDepth/SKILL.md
  • .opencode/skills/Security/SKILL.md
  • .opencode/skills/Utilities/Browser/README.md
  • .opencode/skills/Thinking/FirstPrinciples/SKILL.md
  • .opencode/skills/Thinking/WorldThreatModelHarness/SKILL.md
  • .opencode/skills/Utilities/Aphorisms/SKILL.md
  • .opencode/skills/Thinking/RedTeam/SKILL.md
  • .opencode/skills/Telos/SKILL.md
  • .opencode/skills/Thinking/SKILL.md
  • .opencode/skills/Utilities/Cloudflare/SKILL.md
  • .opencode/skills/Scraping/SKILL.md
  • .opencode/skills/Media/Art/Workflows/CreatePAIPackIcon.md
  • .opencode/skills/Utilities/Sales/SKILL.md
  • .opencode/skills/Utilities/Sales/Workflows/CreateSalesPackage.md
  • skill-packs/cost-aware-research/Workflows/ExtractAlpha.md
  • .opencode/skills/Utilities/Sales/Workflows/CreateVisual.md
  • .opencode/skills/Utilities/Prompting/Templates/README.md
  • .opencode/skills/Security/AnnualReports/SKILL.md
  • .opencode/skills/Utilities/CreateSkill/Workflows/CreateSkill.md
  • .opencode/skills/Utilities/OpenCodeSystem/SKILL.md
  • .opencode/skills/Utilities/System/Workflows/CrossRepoValidation.md
  • .opencode/skills/Utilities/Docx/SKILL.md
  • .opencode/skills/Utilities/System/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .opencode/plugins/handlers/update-counts.ts

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.opencode/PAI/Tools/BannerRetro.ts:
- Around line 352-360: The countHooks() routine undercounts because it only
iterates top-level entries in targetDir (selected from pluginsDir or hooksDir)
and only counts top-level *.ts files; update countHooks to perform a recursive
directory traversal starting at targetDir (e.g., a depth-first walk) and
increment the count for all files matching the hook file pattern (e.g., *.ts)
found in nested subdirectories; reference the existing symbols targetDir,
pluginsDir, hooksDir and the countHooks function when making the change so the
traversal replaces the current readdirSync(..., { withFileTypes: true }) loop.

In @.opencode/skills/Utilities/PAIUpgrade/Tools/Anthropic.ts:
- Around line 82-85: saveState() may attempt to write STATE_FILE before
STATE_DIR exists; update saveState() to ensure STATE_DIR (derived from SKILL_DIR
and STATE_DIR constants) is created (e.g., fs.mkdir or a mkdirp equivalent with
{ recursive: true }) before writing STATE_FILE, then proceed to write the JSON
and handle/log any mkdir or write errors; reference SKILL_DIR, STATE_DIR,
STATE_FILE and the saveState() function when making the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 380b500b-be48-421d-95ec-747414163465

📥 Commits

Reviewing files that changed from the base of the PR and between 8f016ba and bde2084.

📒 Files selected for processing (12)
  • .opencode/PAI/SKILL.md
  • .opencode/PAI/Tools/BannerRetro.ts
  • .opencode/PAI/Tools/FeatureRegistry.ts
  • .opencode/PAI/Tools/IntegrityMaintenance.ts
  • .opencode/PAI/Tools/OpinionTracker.ts
  • .opencode/PAI/Tools/WisdomFrameUpdater.ts
  • .opencode/PAI/Tools/pai.ts
  • .opencode/agents/QATester.md
  • .opencode/skills/Telos/Workflows/Update.md
  • .opencode/skills/Utilities/CreateCLI/SKILL.md
  • .opencode/skills/Utilities/PAIUpgrade/Tools/Anthropic.ts
  • .opencode/skills/Utilities/System/Workflows/PrivacyCheck.md
✅ Files skipped from review due to trivial changes (2)
  • .opencode/PAI/SKILL.md
  • .opencode/PAI/Tools/OpinionTracker.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • .opencode/PAI/Tools/WisdomFrameUpdater.ts
  • .opencode/skills/Utilities/System/Workflows/PrivacyCheck.md
  • .opencode/PAI/Tools/IntegrityMaintenance.ts
  • .opencode/agents/QATester.md
  • .opencode/skills/Telos/Workflows/Update.md
  • .opencode/PAI/Tools/pai.ts
  • .opencode/PAI/Tools/FeatureRegistry.ts

@Steffen025 Steffen025 merged commit c6d9ada into main Mar 28, 2026
3 checks passed
@Steffen025 Steffen025 deleted the feat/release-blocker-cleanup branch March 28, 2026 20:19
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