← Back to Pull requests

workspace: trim skill prose, move deterministic steps into scripts #348

Closed
unknown closed this pull request without merging on Nov 25, 2026 10:28 UTC
View on GitHub
unknown unknown commented on Nov 24, 2026 15:01 UTC
Author

Summary

Trims the workspace plugin. Skill prose goes from 2,389 to 599 lines with no loss of the functions in use. Deterministic steps move from SKILL.md prose into scripts that print JSON. Each non-ok result has an error_message that tells the skill what to do next. The skills keep only judgment, questions to the user, file contracts, and gates on destructive actions.

The handoff move to /next:go is not in this PR. workspace:handoff stays.

Scripts (commit 1)

  • New scripts/project.py

  • - new: folder, .gitignore, frontmatter, section skeleton, and worktrees.
    - worktree create|status: multi-repo, self-repo, and PR worktrees.
    - close: removes worktrees and local branches, and updates the frontmatter and closing notes. It refuses uncommitted or unpushed work unless --force or --keep-worktrees is given. It clears the handoff marker.
    - touch: stamps last-active, and consolidates when CLAUDE.md is over 100 lines.
  • workspace_lib.py: one shared parse_frontmatter (it replaces four copies), frontmatter field editing, atomic write, and worktree status. PyYAML is imported lazily, so the SessionStart hook stays yaml-free.

  • resume-project.py: an instructive error_message for every status, the restored no-projects bounds check, no skill suggestions (they named plugins that are not in this marketplace), and self-repo worktrees in worktree_status.

  • domain-info.py --record: appends the UPDATES.md entry and copies edited context/<repo>.md files over DOMAIN-CONTEXT.md.

  • consolidate-project.py: atomic writes.

  • skills.py link-all: replaces the per-project verify and unlink-check.

  • setup.sh:

  • - New detect command.
    - init --self takes --summary and --ignore-projects.
    - clone applies the settings template, links repo skills, and writes the root CLAUDE.md from templates/workspace-CLAUDE.md.template. Only the content between the AUTO-GENERATED markers is refreshed.
  • Removes TODO.md (the items are done here) and six 3-line placeholder files in domains/tnf/supplemental/.
  • Skills and docs (commit 2)

  • update-project edits inline (no fork) and calls project.py touch.

  • auto-update is removed, with its cron and --auto logic.

  • consolidate-project is a short on-demand wrapper. update-project runs consolidation automatically.

  • Repo skills are linked once at clone. The per-project skills: frontmatter and its steps are removed.

  • new-project: one confirmation round. There are no type templates and no empty starter files.

  • The skills table is only in README.md. CLAUDE.md now lists the correct layout and tests.

  • The version goes from 0.3.0 to 0.4.0 (breaking: auto-update is removed).
  • | Skill | Before | After |
    |---|---|---|
    | new-project | 681 | 66 |
    | setup-environment | 319 | 81 |
    | close-project | 305 | 41 |
    | resume-project | 282 | 50 |
    | create-domain | 201 | 59 |
    | update-project | 196 | 46 |
    | update-domain | 184 | 155 |
    | consolidate-project | 93 | 21 |
    | handoff | 85 | 80 |
    | auto-update | 43 | removed |

    Not changed

  • The domain settings.local.json.tpl files are kept. They add permissions that the generic template does not have.

  • The domain context files and docs.
  • Testing

  • bash plugins/workspace/tests/test_setup.sh: 104 passed (new cases for detect, init --self flags, the root CLAUDE.md, and skill linking at clone).

  • All plugins/workspace/tests/test_.py pass. test_project.py is new and covers project.py and resume-project.py.

  • npx markdownlint-cli2 '/.md': no findings in plugins/workspace.

  • claude plugin validate plugins/workspace --strict: the only finding is the warning about CLAUDE.md at the plugin root, which is also on main.

  • The manual checks with claude --plugin-dir are not done yet.
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Workspace setup can detect workspace types, initialize or refresh workspace guidance, apply domain settings, and link skills from cloned repositories.
    Project workflows support project creation, worktree management, status checks, closure, and activity tracking.
    Domain updates can be recorded with dated entries and copied to matching context files.
    Improvements
    Workspace and project workflows provide clearer error messages and next steps.
    Large project summaries can be consolidated automatically when updated.
    Documentation
    Updated workspace setup, project, and domain workflow guidance.
    Removed
    * Automatic update scheduling and skill verification commands are no longer available.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 611 lines (+458 / -153) across 7 files Reviewer: fonta-rh Review duration: 1166m
    All Vouch review confidence checks passed
    Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.55 · 611 lines diff across 7 files
    0.55
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.384
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #348"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 55.2% (MEDIUM) · Higher = larger blast radius
    55.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.8% · Safe to merge
    21.8%