From f74b1f993fc0d1546c9f1d8bf9e148570b135cfb Mon Sep 17 00:00:00 2001 From: Zhongwei Li Date: Sun, 30 Nov 2025 08:44:44 +0800 Subject: [PATCH] Initial commit --- .claude-plugin/plugin.json | 12 +++++++++ README.md | 3 +++ commands/trk-resolve.md | 15 +++++++++++ commands/trk-review.md | 29 +++++++++++++++++++++ commands/trk.md | 44 +++++++++++++++++++++++++++++++ plugin.lock.json | 53 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 156 insertions(+) create mode 100644 .claude-plugin/plugin.json create mode 100644 README.md create mode 100644 commands/trk-resolve.md create mode 100644 commands/trk-review.md create mode 100644 commands/trk.md create mode 100644 plugin.lock.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..d583a76 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,12 @@ +{ + "name": "track-and-improve", + "description": "Capture mistakes and improvement opportunities with automatic 5 whys analysis", + "version": "1.0.0", + "author": { + "name": "Nick Tune", + "email": "nick@ntcoding.co.uk" + }, + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fab1163 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# track-and-improve + +Capture mistakes and improvement opportunities with automatic 5 whys analysis diff --git a/commands/trk-resolve.md b/commands/trk-resolve.md new file mode 100644 index 0000000..717c522 --- /dev/null +++ b/commands/trk-resolve.md @@ -0,0 +1,15 @@ +--- +description: Mark a report as resolved +--- + +Resolve an improvement report. Expected format: `/trk-resolve ` + +1. Parse the report ID and resolution from the command +2. Read the report from `~/.claude/trk-db/active/.md` +3. Update the report: + - Change `status: active` to `status: resolved` + - Add resolved timestamp to frontmatter + - Fill in Resolution section with the description +4. Move file from `active/` to `resolved/` +5. Git add and commit with message: "Resolve: [id] - [resolution]" +6. Confirm to user: "Report resolved and moved to ~/.claude/trk-db/resolved/.md" diff --git a/commands/trk-review.md b/commands/trk-review.md new file mode 100644 index 0000000..d308d94 --- /dev/null +++ b/commands/trk-review.md @@ -0,0 +1,29 @@ +--- +description: Review active improvement reports +--- + +Review all active improvement reports: + +1. Read all files from `~/.claude/trk-db/active/` +2. Parse YAML frontmatter from each report +3. Present organized summary: + +``` +Found X active reports: + +Recent (last 7 days): +- [id]: [description] ([project]) +- [id]: [description] ([project]) + +Older: +- [id]: [description] ([project]) + +By category: +- rule-violation: X +- improvement: X +- confusion: X +``` + +4. Ask user: "Which would you like to review in detail?" +5. When user selects, read and display full report +6. Discuss patterns, root causes, and potential resolutions diff --git a/commands/trk.md b/commands/trk.md new file mode 100644 index 0000000..2a0fe42 --- /dev/null +++ b/commands/trk.md @@ -0,0 +1,44 @@ +--- +description: Capture mistake or improvement opportunity with 5 whys analysis +--- + +Capture a mistake or improvement opportunity. Follow these steps: + +1. Extract the description from the user's `/trk` command +2. Identify your current persona/role (what system prompt you're operating under) +3. Perform 5 whys root cause analysis of why this mistake happened +4. Extract last 5 message exchanges from the current conversation +5. Create a report in `~/.claude/trk-db/active/` with format: + +```markdown +--- +id: YYYY-MM-DD-HH-MM-SS +created: ISO8601 timestamp +project: current project name +persona: current persona/role +status: active +category: rule-violation|improvement|confusion +--- + +# [User's description] + +## 5 Whys Analysis + +1. **Why did this happen?** [Your analysis] +2. **Why did that happen?** [Your analysis] +3. **Why did that happen?** [Your analysis] +4. **Why did that happen?** [Your analysis] +5. **Root cause:** [Your conclusion] + +## Context (Last 5 Messages) + +[Extracted conversation] + +## Resolution + +[Empty - filled when resolved] +``` + +6. Initialize git repo if `~/.claude/trk-db/.git` doesn't exist +7. Git add and commit with message: "Add report: [description]" +8. Confirm to user: "Report captured: ~/.claude/trk-db/active/[id].md" diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..8de253d --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,53 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:NTCoding/claude-skillz:track-and-improve", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "5f6ec9872ce4c1cc2766083e0b745e069230bdef", + "treeHash": "b92ee2f8fdf34d3b3494ba7446a8cfcc0035992009ccea936c211e795db7b2b1", + "generatedAt": "2025-11-28T10:12:08.724885Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "track-and-improve", + "description": "Capture mistakes and improvement opportunities with automatic 5 whys analysis", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "30dac7ac05cd543cceb759695193a04074e10a2a6c90c0aaaad77ec5e75f1d26" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "d95209a1c7ca57e96592abaf487ea2f7a2da97d4e1606ade22cebbb4bb7a476b" + }, + { + "path": "commands/trk-resolve.md", + "sha256": "1f7f3d552bf58508689a94d2c71723a652541ee244e7d3de82a51c1102f12291" + }, + { + "path": "commands/trk-review.md", + "sha256": "b3f831fe4378538cf78b028a967be4c61e8251a585a5a5301b4b960d9d74a763" + }, + { + "path": "commands/trk.md", + "sha256": "700974a30e0b8f36982207efe89c4cf88f4923fa56b35105552f9a7b2e70d0d6" + } + ], + "dirSha256": "b92ee2f8fdf34d3b3494ba7446a8cfcc0035992009ccea936c211e795db7b2b1" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file