feat: PDS v5.0.0 — observability, hook exploitation, instinct activation#99
Merged
feat: PDS v5.0.0 — observability, hook exploitation, instinct activation#99
Conversation
…ling Reverse-engineered analysis of Claude Code CLI internals from March 2026 source. Covers: system prompt pipeline (5-stage assembly), agentic loop, 28 hook events (PDS uses 6), plugin/settings hierarchy, LLM coupling (zero abstraction — deeply Anthropic), 30+ feature flags, and cost model. Establishes the knowledge base for PDS v5.0.0 observability and hook exploitation work (#82-#98). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
-#98) PDS v5.0.0 foundational work — 12 hook events (was 6), 20 skills (was 18), opt-in telemetry, status line, and auto-instinct detection. New hooks: PostToolUse (telemetry + file tracking), SubagentStart (roster enforcement), PreCompact/PostCompact (context preservation), UserPromptSubmit (skill discovery). WorktreeCreate/InstructionsLoaded consolidated to JSONL telemetry format. New skills: /pds:telemetry (on/off/view/rotate), /pds:inspect (real-time PDS state). New scripts: telemetry-summary.sh, detect-patterns.sh. Scout agent updated with telemetry analysis in Phase 6. Swarm skill updated with telemetry-detected patterns. Whitepaper updated with Observability section. Extension catalog added to docs/. All telemetry is opt-in (PDS_TELEMETRY=1), disabled by default. Zero PII in any telemetry data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, hook fixes - install.sh: add jq preflight check, telemetry opt-in prompt, statusLine managed key, update version string to v5 - agents/scout.md: add Edit tool, Usage and Telemetry-Detected Patterns output sections, step 7a for detect-patterns integration - skills/swarm/SKILL.md: add telemetry analysis step to Phase 6, update scout prompt, renumber steps - hooks/hooks.json: fix WorktreeCreate to produce stdout (was blocking agent spawns with "no successful output") - scripts/telemetry-summary.sh: fix file modification field (.name → .ext) - docs/whitepaper.md: add Telemetry, Context Preservation, Auto-Instinct glossary terms - CLAUDE.md: add WorktreeCreate, InstructionsLoaded to hooks list Refs #82, #84, #85, #86, #87, #88, #89, #90, #91, #92, #93 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…list Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
418606d to
a586caa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/claude-code-source-analysis.md). Covers system prompt pipeline, agentic loop, 28 hook events, LLM coupling, 30+ feature flags, cost model. Dated March 2026 snapshot.PDS_TELEMETRY=1. Logs skill invocations, agent spawns, file modifications, worktree events to.claude/telemetry.jsonl. New/pds:telemetryskill (on/off/view/rotate). New/pds:inspectskill for real-time PDS state.scripts/detect-patterns.shauto-detects instinct-worthy patterns from telemetry. Scout agent updated to consume telemetry in Phase 6 with Usage and Telemetry-Detected Patterns sections.hooks/scripts/status-line.shshows PDS version, swarm phase/tier, telemetry status.Files Changed (23 files, ~1,600 lines added)
New files (15):
docs/claude-code-source-analysis.md— Architecture analysisdocs/claude-code-extension-catalog.md— Hook/settings referencehooks/scripts/telemetry-log.sh— Skill/Agent telemetryhooks/scripts/file-telemetry-log.sh— Write/Edit trackinghooks/scripts/roster-check.sh— Agent roster enforcementhooks/scripts/pre-compact-snapshot.sh— PreCompact state snapshothooks/scripts/post-compact-inject.sh— PostCompact state injectionhooks/scripts/skill-hint.sh— Prompt-based skill suggestionshooks/scripts/status-line.sh— CLI status linescripts/telemetry-summary.sh— Usage report generatorscripts/detect-patterns.sh— Auto-instinct pattern detectionskills/telemetry/SKILL.md+EVAL.md— Telemetry skillskills/inspect/SKILL.md+EVAL.md— Inspect skillModified files (8):
hooks/hooks.json— 12 events (was 7)agents/scout.md— Telemetry analysis in Phase 6skills/swarm/SKILL.md— Phase 6 telemetry mentiondocs/whitepaper.md— Observability sectiondocs/skills.md— New skill entriesCLAUDE.md— 20 skills, expanded hooksREADME.md— 20 skills, new docs, updated structure.gitignore— Telemetry file, swarm artifactsIssues Addressed
#82, #83, #84, #85, #86, #87, #88, #89, #90, #91, #92, #93, #95, #96, #97
Still Needed (follow-up)
install.shupdates: telemetry opt-in prompt, jq preflight check, statusLine config (feat: add jq to install preflight and telemetry opt-in prompt #98)Test Plan
PDS_TELEMETRY=1, run a skill, verify.claude/telemetry.jsonlhas an entry/pds:telemetry view— verify report output/pds:inspectduring swarm — verify phase/tier shownhooks/hooks.jsonis valid JSONGenerated with PDS