compound-workflow 0.1.1

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 (55) hide show
  1. package/.claude-plugin/marketplace.json +11 -0
  2. package/.claude-plugin/plugin.json +12 -0
  3. package/.cursor-plugin/plugin.json +12 -0
  4. package/README.md +155 -0
  5. package/package.json +22 -0
  6. package/scripts/install-cli.mjs +313 -0
  7. package/scripts/sync-into-repo.sh +103 -0
  8. package/src/.agents/agents/research/best-practices-researcher.md +132 -0
  9. package/src/.agents/agents/research/framework-docs-researcher.md +134 -0
  10. package/src/.agents/agents/research/git-history-analyzer.md +62 -0
  11. package/src/.agents/agents/research/learnings-researcher.md +288 -0
  12. package/src/.agents/agents/research/repo-research-analyst.md +146 -0
  13. package/src/.agents/agents/review/agent-native-reviewer.md +299 -0
  14. package/src/.agents/agents/workflow/bug-reproduction-validator.md +87 -0
  15. package/src/.agents/agents/workflow/lint.md +20 -0
  16. package/src/.agents/agents/workflow/spec-flow-analyzer.md +149 -0
  17. package/src/.agents/commands/assess.md +60 -0
  18. package/src/.agents/commands/install.md +53 -0
  19. package/src/.agents/commands/metrics.md +59 -0
  20. package/src/.agents/commands/setup.md +9 -0
  21. package/src/.agents/commands/sync.md +9 -0
  22. package/src/.agents/commands/test-browser.md +393 -0
  23. package/src/.agents/commands/workflow/brainstorm.md +252 -0
  24. package/src/.agents/commands/workflow/compound.md +142 -0
  25. package/src/.agents/commands/workflow/plan.md +737 -0
  26. package/src/.agents/commands/workflow/review-v2.md +148 -0
  27. package/src/.agents/commands/workflow/review.md +110 -0
  28. package/src/.agents/commands/workflow/triage.md +54 -0
  29. package/src/.agents/commands/workflow/work.md +439 -0
  30. package/src/.agents/references/README.md +12 -0
  31. package/src/.agents/references/standards/README.md +9 -0
  32. package/src/.agents/scripts/self-check.mjs +227 -0
  33. package/src/.agents/scripts/sync-opencode.mjs +355 -0
  34. package/src/.agents/skills/agent-browser/SKILL.md +223 -0
  35. package/src/.agents/skills/audit-traceability/SKILL.md +260 -0
  36. package/src/.agents/skills/brainstorming/SKILL.md +250 -0
  37. package/src/.agents/skills/compound-docs/SKILL.md +533 -0
  38. package/src/.agents/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  39. package/src/.agents/skills/compound-docs/assets/resolution-template.md +97 -0
  40. package/src/.agents/skills/compound-docs/references/yaml-schema.md +87 -0
  41. package/src/.agents/skills/compound-docs/schema.project.yaml +18 -0
  42. package/src/.agents/skills/compound-docs/schema.yaml +119 -0
  43. package/src/.agents/skills/data-foundations/SKILL.md +185 -0
  44. package/src/.agents/skills/document-review/SKILL.md +108 -0
  45. package/src/.agents/skills/file-todos/SKILL.md +177 -0
  46. package/src/.agents/skills/file-todos/assets/todo-template.md +106 -0
  47. package/src/.agents/skills/financial-workflow-integrity/SKILL.md +423 -0
  48. package/src/.agents/skills/git-worktree/SKILL.md +268 -0
  49. package/src/.agents/skills/pii-protection-prisma/SKILL.md +629 -0
  50. package/src/.agents/skills/process-metrics/SKILL.md +46 -0
  51. package/src/.agents/skills/process-metrics/assets/daily-template.md +37 -0
  52. package/src/.agents/skills/process-metrics/assets/monthly-template.md +21 -0
  53. package/src/.agents/skills/process-metrics/assets/weekly-template.md +25 -0
  54. package/src/.agents/skills/technical-review/SKILL.md +83 -0
  55. package/src/AGENTS.md +213 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: compound
3
+ invocation: workflow:compound
4
+ description: Document a recently solved problem into docs/solutions/ to compound institutional knowledge
5
+ argument-hint: "[optional: brief context about the fix]"
6
+ ---
7
+
8
+ # /workflow:compound
9
+
10
+ Capture a solved problem while context is fresh.
11
+
12
+ ## Purpose
13
+
14
+ Create a single structured solution document in `docs/solutions/` with YAML frontmatter for searchability and future reference.
15
+
16
+ **Why "compound"?** Each documented solution compounds your team's knowledge. The first time you solve a problem takes research. Document it, and the next occurrence takes minutes. Knowledge compounds.
17
+
18
+ ## Execution contract
19
+
20
+ **The `compound-docs` skill is the source of truth** for capture steps, YAML validation (against `schema.yaml` and, if present, `schema.project.yaml`), category mapping, filename generation, and the post-capture decision menu. This command does not redefine that contract.
21
+
22
+ <critical_requirement>
23
+ **Primary capture writes ONE file: the final solution documentation.**
24
+
25
+ Do not create drafts, notes, or intermediate files.
26
+
27
+ After the primary solution doc is written, optional post-capture actions (by explicit user choice) may update other references (e.g. patterns indexes).
28
+ </critical_requirement>
29
+
30
+ ## Usage
31
+
32
+ ```bash
33
+ /workflow:compound # Document the most recent fix
34
+ /workflow:compound [brief context] # Provide additional context hint
35
+ ```
36
+
37
+ **Spike outcomes:** When a spike (timeboxed investigation) resolved a blocker and produced reusable learning, run `/workflow:compound` with the spike context to capture the outcome in `docs/solutions/`. For solution docs that originated from a spike, include `spike` in the doc's `tags` frontmatter (e.g. `tags: [spike, ...]`) so spike-origin learnings are searchable.
38
+
39
+ ## Guardrails
40
+
41
+ - Do not modify code. Do not create commits or push.
42
+ - Only update other files when the user explicitly selects a post-capture action from the `compound-docs` decision menu.
43
+
44
+ ## Command flow
45
+
46
+ ### 1. Preconditions (required)
47
+
48
+ - Confirm the problem is solved, verified working, and non-trivial.
49
+ - If critical context is missing, ask targeted questions and wait. Then **invoke the `compound-docs` skill** (it defines required fields, validation gates, and template).
50
+
51
+ ### 2. Optional enrichment (before write)
52
+
53
+ Run only agents that exist in this `.agents` workspace. **Enrichment is read-only**—it informs the doc content but must not write files.
54
+
55
+ - Related docs: `Task learnings-researcher(<symptom/module/root cause keywords>)`
56
+ - Optional: `Task best-practices-researcher(<topic>)`, `Task framework-docs-researcher(<topic>)`
57
+
58
+ Complete enrichment before assembly. Report which ran vs skipped.
59
+
60
+ ### 3. Capture
61
+
62
+ Execute the capture by following the **`compound-docs` skill**: gather context, check existing docs, validate YAML (including `schema.project.yaml` if present), write the single solution file, then present the **skill's decision menu** and wait for user choice. Do not present a different "What's next?" menu.
63
+
64
+ ### 4. Optional review after capture
65
+
66
+ User may optionally run `document-review` on the created doc. If the repo has domain guardrail skills that match the doc's problem type/component and those skills exist under `.agents/skills/`, they may be invoked only when the user requests deeper review; do not name or assume skills that are not present.
67
+
68
+ ## Preconditions
69
+
70
+ <preconditions enforcement="advisory">
71
+ <check condition="problem_solved">
72
+ Problem has been solved (not in-progress)
73
+ </check>
74
+ <check condition="solution_verified">
75
+ Solution has been verified working
76
+ </check>
77
+ <check condition="non_trivial">
78
+ Non-trivial problem (not simple typo or obvious error)
79
+ </check>
80
+ </preconditions>
81
+
82
+ ## What It Captures
83
+
84
+ - **Problem symptom**: Exact error messages, observable behavior
85
+ - **Investigation steps tried**: What didn't work and why
86
+ - **Root cause analysis**: Technical explanation
87
+ - **Working solution**: Step-by-step fix with code examples
88
+ - **Prevention strategies**: How to avoid in future
89
+ - **Cross-references**: Links to related issues and docs
90
+
91
+ ## What It Creates
92
+
93
+ - File: `docs/solutions/<category>/<filename>.md` (category from `problem_type` per `compound-docs` / `yaml-schema.md`).
94
+
95
+ ## Common Mistakes to Avoid
96
+
97
+ | Wrong | Correct |
98
+ |-------|---------|
99
+ | Subagents write files like `context-analysis.md`, `solution-draft.md` | Use `compound-docs`; write the primary solution doc only |
100
+ | Research and assembly in parallel | Enrichment completes, then capture runs |
101
+ | Unrequested side-effect file changes | Only update other files when user explicitly selects post-capture actions from the skill menu |
102
+ | Presenting a different post-capture menu | Use the `compound-docs` decision menu as-is |
103
+
104
+ ## Success output (shape)
105
+
106
+ Report which optional enrichments ran vs skipped. Then output the path of the created file. Present the **`compound-docs` decision menu** (see skill) and wait for user choice—do not substitute a shorter custom menu.
107
+
108
+ Example summary (generic, portable):
109
+
110
+ ```
111
+ ✓ Documentation complete
112
+
113
+ Optional enrichments: related-docs ran|skipped, best-practices ran|skipped, framework-docs ran|skipped
114
+
115
+ File created: docs/solutions/<category>/YYYY-MM-DD-<module-slug>-<symptom-slug>.md
116
+
117
+ This documentation will be searchable for future reference when similar issues occur.
118
+
119
+ [Then present the compound-docs decision menu and wait.]
120
+ ```
121
+
122
+ ## Auto-Invoke
123
+
124
+ <auto_invoke>
125
+ <trigger_phrases>
126
+ - "that worked"
127
+ - "it's fixed"
128
+ - "working now"
129
+ - "problem solved"
130
+ - "that did it"
131
+ </trigger_phrases>
132
+ <manual_override>Use /workflow:compound [context] to document immediately without waiting for auto-detection.</manual_override>
133
+ </auto_invoke>
134
+
135
+ ## Routes To
136
+
137
+ `compound-docs` skill
138
+
139
+ ## Related Commands
140
+
141
+ - `/workflow:plan` - Planning workflow (references documented solutions)
142
+ - `/workflow:review` - Review may suggest compound when a systemic learning emerges