Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

[Bug Report] Unresolved placeholders and phantom refs in 8+ skills

Open rikitikitavi2012-debug opened this issue 9 months ago • 3 comments

Summary

Systematic audit of PAI skills revealed 47+ unresolved placeholders and 30+ phantom references across 8 skills and PAI infrastructure docs. This is the fourth in a series of audits:

  1. Agent System — 40+ phantom refs fixed (commits b73f783, 209cdaa, d4c98e0)
  2. Research Skill — 6 bugs fixed, orphaned agents removed (commit 79f8f0d)
  3. Telos Skill — 9 bugs fixed (commit c882208)
  4. This audit — 8 skills + infrastructure, 47 bugs fixed

Affected Skills

Skill Placeholders Phantom Refs Broken Paths Files Changed
Agents 8 ({PRINCIPAL.NAME} ×5, {DAIDENTITY.NAME} ×2, YOUR_VOICE_ID ×1) 0 0 3
ExtractWisdom 3 ({PRINCIPAL.NAME} ×3) 1 (WRITINGSTYLE.md missing) 0 2
WorldThreatModelHarness 5 (YOUR_VOICE_ID_HERE ×5) 0 0 3
Recon 8 ({DAIDENTITY.NAME} ×7, {PRINCIPAL.TIMEZONE} ×1) 2 (AsnRecon.md workflow, tools missing) 4 (README casing) 4
PromptInjection 5 ({PRINCIPAL.NAME} ×5) 4 (phantom dirs in README) 0 4
Parser 3 ({DAIDENTITY.NAME} ×3) 8+ (wrong casing, phantom subdirs) 12+ (case-sensitive paths) 5
Sales 2 ({DAIDENTITY.NAME} ×2) 3 (kebab-case workflow names) 2 (wrong skill casing) 3
PAIUpgrade 1 ({PRINCIPAL.NAME} ×1) 1 (FindSources.md phantom) 0 1
PAI Infrastructure 12 (docs + actions) 0 0 4

Types of Issues Found

1. Unresolved Template Placeholders

Raw {PRINCIPAL.NAME}, {DAIDENTITY.NAME}, and YOUR_VOICE_ID_HERE appearing in skill workflow files. These are template variables that should be resolved during build but were left as-is in committed files.

2. Phantom References

  • Missing workflow files referenced in SKILL.md (e.g., AsnRecon.md, FindSources.md)
  • Missing tool files (e.g., cert-transparency.ts, report-generator.ts)
  • References to WRITINGSTYLE.md that doesn't exist

3. Case-Sensitivity Issues (Linux)

  • README files using kebab-case (parse-content.md) while actual files use PascalCase (ParseContent.md)
  • Lowercase skill paths (skills/parser/) when actual is skills/Parser/
  • Lowercase directory references (schema/, prompts/) when actual is PascalCase

4. Intentional Placeholders (NOT bugs)

  • PAI/Components/Algorithm/v*.md — Template files processed by RebuildPAI.ts
  • PAI/Tools/RebuildPAI.ts lines 29-42 — The placeholder mapping itself
  • PAI/Tools/OpinionTracker.ts, RelationshipReflect.ts — Template strings in TypeScript

Root Cause

The placeholder resolution system (RebuildPAI.ts) processes Components into SKILL.md at build time, but skill workflow files (inside each skill's Workflows/ directory) are NOT processed by the build system. Placeholders in these files remain unresolved.

Recommendation

Consider either:

  1. Extending RebuildPAI.ts to process all .md files in skills/*/Workflows/
  2. Adding a CI check: grep -r '{PRINCIPAL.NAME}\|{DAIDENTITY.NAME}\|YOUR_VOICE_ID' skills/ --include='*.md' | grep -v Components/ | grep -v RebuildPAI should return empty

Happy to submit a PR with fixes if the community is interested.

rikitikitavi2012-debug avatar Feb 27 '26 09:02 rikitikitavi2012-debug

This is a thorough audit — thanks for the detailed work. 47+ changes across 8 skills requires careful handling (either extending RebuildPAI.ts or manual replacement). Keeping open for a dedicated pass. PRs welcome!

kaimagnus avatar Mar 01 '26 02:03 kaimagnus

Yes, thank you for monitoring and paying attention to the problems. I'm impressed that PAI is ready to invest in improving the system. I'm from Russia, and there's no community here.

rikitikitavi2012-debug avatar Mar 01 '26 10:03 rikitikitavi2012-debug

Hey @rikitikitavi2012-debug — Kai here, Daniel's AI assistant, doing a first-pass triage on the PAI repo.

Closing this out because it's a v4.0.x template/placeholder bug, and the skill+template layout has been replaced in v5.0.0, and PAI v5.0.0 is a substantial rewrite that supersedes the relevant layer.

If this still reproduces in v5.0.0, please reopen or file a fresh issue against the new release. Thanks for taking the time to file this — really appreciated.

— Kai 🤖

danielmiessler avatar May 01 '26 19:05 danielmiessler