@abdullahsahmad/work-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +147 -0
  2. package/cli/bin/work-kit.mjs +18 -0
  3. package/cli/src/commands/complete.ts +123 -0
  4. package/cli/src/commands/completions.ts +137 -0
  5. package/cli/src/commands/context.ts +41 -0
  6. package/cli/src/commands/doctor.ts +79 -0
  7. package/cli/src/commands/init.test.ts +116 -0
  8. package/cli/src/commands/init.ts +184 -0
  9. package/cli/src/commands/loopback.ts +64 -0
  10. package/cli/src/commands/next.ts +172 -0
  11. package/cli/src/commands/observe.ts +144 -0
  12. package/cli/src/commands/setup.ts +159 -0
  13. package/cli/src/commands/status.ts +50 -0
  14. package/cli/src/commands/uninstall.ts +89 -0
  15. package/cli/src/commands/upgrade.ts +12 -0
  16. package/cli/src/commands/validate.ts +34 -0
  17. package/cli/src/commands/workflow.ts +125 -0
  18. package/cli/src/config/agent-map.ts +62 -0
  19. package/cli/src/config/loopback-routes.ts +45 -0
  20. package/cli/src/config/phases.ts +119 -0
  21. package/cli/src/context/extractor.test.ts +77 -0
  22. package/cli/src/context/extractor.ts +73 -0
  23. package/cli/src/context/prompt-builder.ts +70 -0
  24. package/cli/src/engine/loopbacks.test.ts +33 -0
  25. package/cli/src/engine/loopbacks.ts +32 -0
  26. package/cli/src/engine/parallel.ts +60 -0
  27. package/cli/src/engine/phases.ts +23 -0
  28. package/cli/src/engine/transitions.test.ts +117 -0
  29. package/cli/src/engine/transitions.ts +97 -0
  30. package/cli/src/index.ts +248 -0
  31. package/cli/src/observer/data.ts +237 -0
  32. package/cli/src/observer/renderer.ts +316 -0
  33. package/cli/src/observer/watcher.ts +99 -0
  34. package/cli/src/state/helpers.test.ts +91 -0
  35. package/cli/src/state/helpers.ts +65 -0
  36. package/cli/src/state/schema.ts +113 -0
  37. package/cli/src/state/store.ts +82 -0
  38. package/cli/src/state/validators.test.ts +105 -0
  39. package/cli/src/state/validators.ts +81 -0
  40. package/cli/src/utils/colors.ts +12 -0
  41. package/package.json +49 -0
  42. package/skills/auto-kit/SKILL.md +214 -0
  43. package/skills/build/SKILL.md +88 -0
  44. package/skills/build/stages/commit.md +43 -0
  45. package/skills/build/stages/core.md +48 -0
  46. package/skills/build/stages/integration.md +44 -0
  47. package/skills/build/stages/migration.md +41 -0
  48. package/skills/build/stages/red.md +44 -0
  49. package/skills/build/stages/refactor.md +48 -0
  50. package/skills/build/stages/setup.md +42 -0
  51. package/skills/build/stages/ui.md +51 -0
  52. package/skills/deploy/SKILL.md +62 -0
  53. package/skills/deploy/stages/merge.md +47 -0
  54. package/skills/deploy/stages/monitor.md +39 -0
  55. package/skills/deploy/stages/remediate.md +54 -0
  56. package/skills/full-kit/SKILL.md +195 -0
  57. package/skills/plan/SKILL.md +77 -0
  58. package/skills/plan/stages/architecture.md +53 -0
  59. package/skills/plan/stages/audit.md +58 -0
  60. package/skills/plan/stages/blueprint.md +60 -0
  61. package/skills/plan/stages/clarify.md +61 -0
  62. package/skills/plan/stages/investigate.md +47 -0
  63. package/skills/plan/stages/scope.md +46 -0
  64. package/skills/plan/stages/sketch.md +44 -0
  65. package/skills/plan/stages/ux-flow.md +49 -0
  66. package/skills/review/SKILL.md +104 -0
  67. package/skills/review/stages/compliance.md +48 -0
  68. package/skills/review/stages/handoff.md +59 -0
  69. package/skills/review/stages/performance.md +45 -0
  70. package/skills/review/stages/security.md +49 -0
  71. package/skills/review/stages/self-review.md +41 -0
  72. package/skills/test/SKILL.md +83 -0
  73. package/skills/test/stages/e2e.md +44 -0
  74. package/skills/test/stages/validate.md +51 -0
  75. package/skills/test/stages/verify.md +41 -0
  76. package/skills/wrap-up/SKILL.md +107 -0
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: wrap-up
3
+ description: "Final step: Synthesize all phase outputs into a work-kit log summary and clean up."
4
+ user-invocable: false
5
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6
+ ---
7
+
8
+ # Wrap-up
9
+
10
+ **Role:** Work Historian
11
+ **Goal:** Produce a concise, useful summary of what was built and why — then clean up.
12
+
13
+ ## Instructions
14
+
15
+ 1. **Read the full `.work-kit/state.md`** — every phase output from Plan through the last completed phase
16
+ 2. **Archive the full state** — copy `.work-kit/state.md` to `.claude/work-kit/archive/<YYYY-MM-DD>-<slug>.md` on the **main branch** (this is the unedited, complete record)
17
+ 3. **Synthesize the work-kit log entry** — not a copy-paste of state, but a distilled record that a future developer (or agent) would find useful
18
+ 4. **Write the summary file** to `.claude/work-kit/<date>-<slug>.md` on the **main branch** (not the worktree)
19
+ 5. **Append to the index** in `.claude/work-kit/index.md`
20
+ 6. **Ask the user** if they want the worktree removed
21
+
22
+ ## Work-Kit Log Entry Format
23
+
24
+ Write to `.claude/work-kit/<YYYY-MM-DD>-<slug>.md`:
25
+
26
+ ```markdown
27
+ ---
28
+ slug: <slug>
29
+ branch: feature/<slug>
30
+ pr: <#number or n/a>
31
+ started: <YYYY-MM-DD>
32
+ completed: <YYYY-MM-DD>
33
+ status: <completed | partial | rolled-back>
34
+ ---
35
+
36
+ ## Summary
37
+ <2-3 sentences: what was built, why it was needed, and the end state>
38
+
39
+ ## Criteria
40
+ <copy the final criteria checklist from state.md — checked and unchecked>
41
+
42
+ ## Key Decisions
43
+ <only the non-obvious ones — decisions where the alternative was reasonable>
44
+ - <decision>: <what was chosen> — <why, in one line>
45
+
46
+ ## Deviations from Plan
47
+ <anything that changed between Blueprint and final implementation — skip if none>
48
+ - <what changed and why>
49
+ ```
50
+
51
+ ## Index Entry
52
+
53
+ Append one row to `.claude/work-kit/index.md`:
54
+
55
+ ```
56
+ | <YYYY-MM-DD> | <slug> | <#PR or n/a> | <completed/partial/rolled-back> | <phases completed, e.g. "all 6" or "plan→review (no deploy)"> |
57
+ ```
58
+
59
+ ## What to Include vs. Exclude
60
+
61
+ **Include:**
62
+ - Decisions where you chose between real alternatives
63
+ - Deviations from the Blueprint (and why)
64
+ - Anything a future developer would need to understand the "why" behind the code
65
+ - Criteria status — what was met, what wasn't
66
+
67
+ **Exclude:**
68
+ - Artifact lists (files, PRs, migrations) — derivable from git
69
+ - Routine implementation details ("created file X, modified file Y")
70
+ - Full phase outputs — the summary is a distillation, not a dump
71
+ - Internal process notes ("ran tests 3 times before they passed")
72
+ - Anything derivable from the git diff or PR description
73
+
74
+ ## Archive
75
+
76
+ The archive is the full, unedited copy of `.work-kit/state.md` — every phase output, every decision, every deviation. It exists so you can always go back to the complete record.
77
+
78
+ When archiving, prepend a reference header to the copy so the archive knows where its summary lives:
79
+
80
+ ```markdown
81
+ > **Summary:** [<YYYY-MM-DD>-<slug>](../<YYYY-MM-DD>-<slug>.md)
82
+
83
+ <rest of state.md content>
84
+ ```
85
+
86
+ ```bash
87
+ # From the worktree, copy state to the archive on main
88
+ cp .work-kit/state.md <main-repo-root>/.claude/work-kit/archive/<YYYY-MM-DD>-<slug>.md
89
+ # Then prepend the summary reference to the archive file
90
+ ```
91
+
92
+ ## Cleanup
93
+
94
+ After writing the archive, summary, and index:
95
+
96
+ 1. Switch to main branch: `cd` back to the main repo root
97
+ 2. Stage and commit all work-kit log files:
98
+ ```bash
99
+ git add .claude/work-kit/
100
+ git commit -m "work-kit: <slug>"
101
+ ```
102
+ 3. Ask the user: "Remove the worktree `worktrees/<slug>`?"
103
+ 4. If yes:
104
+ ```bash
105
+ git worktree remove worktrees/<slug>
106
+ ```
107
+ 5. Report: summary written, worktree status, done.