Skip to content

feat(plugin): refactor analysis dimensions and add new domain skills#187

Merged
onlycastle merged 13 commits intomainfrom
ooo/run/refactor-analysis-dimensions
Mar 26, 2026
Merged

feat(plugin): refactor analysis dimensions and add new domain skills#187
onlycastle merged 13 commits intomainfrom
ooo/run/refactor-analysis-dimensions

Conversation

@onlycastle
Copy link
Copy Markdown
Owner

Summary

  • Restructure analysis dimensions across shared schemas, plugin core, MCP tools, and skill definitions
  • Add 3 new domain skill pairs (ai-partnership, session-craft, session-mastery) with extract/write workflows
  • Add new MCP tools: get-run-progress, get-user-prefs, save-user-prefs, verify-evidence
  • Update deterministic scoring and type mapping for the new dimension structure

Changes

  • chore: gitignore runtime artifacts
  • feat(shared): refactor analysis dimension schemas and scoring
  • feat(plugin): refactor core lib for new analysis dimensions
  • feat(plugin): update MCP server and tools for new dimensions
  • refactor(plugin): update session hooks for new dimensions
  • feat(plugin): add and update analysis skill definitions
  • chore(plugin): update manifest for new skills and tools
  • test(plugin): add and update tests for dimension refactor
  • docs(plugin): update PLUGIN.md for dimension refactor
  • chore(plugin): rebuild dist artifacts

Test Plan

  • TypeScript compiles without errors
  • Unit tests pass
  • Manual plugin run with new dimensions

Generated with Claude Code using /ship-it

onlycastle and others added 10 commits March 26, 2026 06:02
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add new domain schemas, update worker output types, and adjust
deterministic scoring for the restructured analysis dimensions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update data extractor, prompt context, report template, and stage DB
to support the restructured analysis dimensions. Add project filters
module for session filtering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add get-run-progress, get-user-prefs, save-user-prefs, and
verify-evidence tools. Update existing tools for restructured
analysis dimensions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add new domain skills (ai-partnership, session-craft, session-mastery)
and update existing skill definitions for restructured dimensions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add new test suites for agent dispatch, resume contracts, skill
contracts, run progress, user prefs, manifest validation, domain
results, pipeline e2e, and evidence verification.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@onlycastle
Copy link
Copy Markdown
Owner Author

Code Review

Found 4 issues (filtered from 17 raw findings, threshold: score >= 80):


  1. JSDoc claims 15 stages, actual array has 17 (stale comment after refactor)
    The JSDoc reads "Reduced from 19 stages (6+6 extract/write) to 15 stages (5+5 extract/write)" but REQUIRED_STAGE_SEQUENCE actually contains 17 entries (1 + 5 + 5 + 4 + 1 + 1).

    /**
    * 5-dimension pipeline stage sequence (v2).
    * Reduced from 19 stages (6+6 extract/write) to 15 stages (5+5 extract/write).

  2. Inline comment references "19-entry array" but sequence is now 17 entries (stale count)

    // Only include incomplete/failed stages instead of the full 19-entry array.

  3. New MCP tools missing from docs/agent/PLUGIN.md (CLAUDE.md: "Keep Agent Docs Updated")
    get-user-prefs.ts, save-user-prefs.ts, and project-filters.ts are new files not listed in the File Map or MCP Tools table.
    https://github.com/onlycastle/BetterPrompt/blob/07e6d215ad1c9f7846a5ec7f95f0ea88a23e4770/docs/agent/PLUGIN.md

  4. PLUGIN.md stage list may have drifted from code (flagged in PRs feat(plugin): add structured debug logging and skill progress reporting #179 and refactor(plugin): file logging, install diagnostics, and UI polish #180)
    The "Required stages" list and model tiering table are manually maintained. PRs feat(plugin): add structured debug logging and skill progress reporting #179 and refactor(plugin): file logging, install diagnostics, and UI polish #180 both caught this same drift pattern. Verify the doc's stage list matches REQUIRED_STAGE_NAMES in stage-db.ts.
    https://github.com/onlycastle/BetterPrompt/blob/07e6d215ad1c9f7846a5ec7f95f0ea88a23e4770/packages/plugin/lib/stage-db.ts


Also noted (below threshold, informational):

  • 7 No Fallback Policy potential violations in utility functions — scored low because they're at system boundaries (file reads, stdin parsing) where files may not exist on first run
  • 1 latent hasArtifact null-check bug in get-run-progress.ts:105 — guarded in practice by caller
  • 1 test fixture using legacy score keys in save-domain-results.test.ts — tests pass (504/504)

Generated with Claude Code

If useful, react with a thumbs-up. Otherwise, thumbs-down.

onlycastle and others added 3 commits March 26, 2026 09:50
Fix JSDoc claiming 15 stages (actual: 17) and inline comment
referencing 19 stages. Add missing files and tools to PLUGIN.md,
update domain/stage enums to reflect v2 dimensions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixture deterministicScores only had legacy field names, which passed
locally against a stale shared build but failed CI where shared is
rebuilt fresh with the new required schema fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@onlycastle onlycastle merged commit 15bb840 into main Mar 26, 2026
1 check passed
@onlycastle onlycastle deleted the ooo/run/refactor-analysis-dimensions branch March 26, 2026 19:33
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