@drunkcoding/agents-and-skills 0.0.13 → 0.0.15

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 (83) hide show
  1. package/.claude-plugin/marketplace.json +9 -6
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/plugins/html-effectiveness/.claude-plugin/plugin.json +1 -1
  5. package/plugins/html-effectiveness/README.md +9 -4
  6. package/plugins/html-effectiveness/agents/report-builder.md +4 -0
  7. package/plugins/html-effectiveness/assets/base.css +40 -20
  8. package/plugins/html-effectiveness/docs/template-gallery.md +28 -0
  9. package/plugins/html-effectiveness/scripts/_tmp.js +37 -0
  10. package/plugins/html-effectiveness/scripts/catalog.js +47 -0
  11. package/plugins/html-effectiveness/scripts/extract.js +104 -0
  12. package/plugins/html-effectiveness/scripts/render.js +2 -2
  13. package/plugins/html-effectiveness/skills/html-effectiveness/SKILL.md +4 -4
  14. package/plugins/html-effectiveness/templates/01-exploration-code-approaches.html.tmpl +400 -0
  15. package/plugins/html-effectiveness/templates/02-exploration-visual-designs.html.tmpl +456 -0
  16. package/plugins/html-effectiveness/templates/03-code-review-pr.html.tmpl +581 -0
  17. package/plugins/html-effectiveness/templates/04-code-understanding.html.tmpl +443 -0
  18. package/plugins/html-effectiveness/templates/05-design-system.html.tmpl +578 -0
  19. package/plugins/html-effectiveness/templates/06-component-variants.html.tmpl +557 -0
  20. package/plugins/html-effectiveness/templates/07-prototype-animation.html.tmpl +417 -0
  21. package/plugins/html-effectiveness/templates/08-prototype-interaction.html.tmpl +363 -0
  22. package/plugins/html-effectiveness/templates/09-slide-deck.html.tmpl +535 -0
  23. package/plugins/html-effectiveness/templates/10-svg-illustrations.html.tmpl +444 -0
  24. package/plugins/html-effectiveness/templates/11-status-report.html.tmpl +152 -0
  25. package/plugins/html-effectiveness/templates/12-incident-report.html.tmpl +547 -0
  26. package/plugins/html-effectiveness/templates/13-flowchart-diagram.html.tmpl +361 -0
  27. package/plugins/html-effectiveness/templates/14-research-feature-explainer.html.tmpl +348 -0
  28. package/plugins/html-effectiveness/templates/15-research-concept-explainer.html.tmpl +334 -0
  29. package/plugins/html-effectiveness/templates/16-implementation-plan.html.tmpl +657 -0
  30. package/plugins/html-effectiveness/templates/17-pr-writeup.html.tmpl +553 -0
  31. package/plugins/html-effectiveness/templates/18-editor-triage-board.html.tmpl +541 -0
  32. package/plugins/html-effectiveness/templates/19-editor-feature-flags.html.tmpl +627 -0
  33. package/plugins/html-effectiveness/templates/20-editor-prompt-tuner.html.tmpl +687 -0
  34. package/plugins/html-effectiveness/templates/manifest.json +436 -2
  35. package/plugins/html-effectiveness/tests/_tmp.test.js +58 -0
  36. package/plugins/html-effectiveness/tests/fixtures/01-exploration-code-approaches.data.json +3 -0
  37. package/plugins/html-effectiveness/tests/fixtures/02-exploration-visual-designs.data.json +3 -0
  38. package/plugins/html-effectiveness/tests/fixtures/03-code-review-pr.data.json +3 -0
  39. package/plugins/html-effectiveness/tests/fixtures/04-code-understanding.data.json +3 -0
  40. package/plugins/html-effectiveness/tests/fixtures/05-design-system.data.json +3 -0
  41. package/plugins/html-effectiveness/tests/fixtures/06-component-variants.data.json +3 -0
  42. package/plugins/html-effectiveness/tests/fixtures/07-prototype-animation.data.json +3 -0
  43. package/plugins/html-effectiveness/tests/fixtures/08-prototype-interaction.data.json +3 -0
  44. package/plugins/html-effectiveness/tests/fixtures/09-slide-deck.data.json +3 -0
  45. package/plugins/html-effectiveness/tests/fixtures/10-svg-illustrations.data.json +3 -0
  46. package/plugins/html-effectiveness/tests/fixtures/11-status-report.data.json +37 -0
  47. package/plugins/html-effectiveness/tests/fixtures/12-incident-report.data.json +3 -0
  48. package/plugins/html-effectiveness/tests/fixtures/13-flowchart-diagram.data.json +3 -0
  49. package/plugins/html-effectiveness/tests/fixtures/14-research-feature-explainer.data.json +3 -0
  50. package/plugins/html-effectiveness/tests/fixtures/15-research-concept-explainer.data.json +3 -0
  51. package/plugins/html-effectiveness/tests/fixtures/16-implementation-plan.data.json +3 -0
  52. package/plugins/html-effectiveness/tests/fixtures/17-pr-writeup.data.json +3 -0
  53. package/plugins/html-effectiveness/tests/fixtures/18-editor-triage-board.data.json +3 -0
  54. package/plugins/html-effectiveness/tests/fixtures/19-editor-feature-flags.data.json +3 -0
  55. package/plugins/html-effectiveness/tests/fixtures/20-editor-prompt-tuner.data.json +3 -0
  56. package/plugins/html-effectiveness/tests/manifest.test.js +61 -0
  57. package/plugins/plugin-validator/.claude-plugin/plugin.json +1 -1
  58. package/plugins/plugin-validator/skills/validate-agents/SKILL.md +2 -2
  59. package/plugins/plugin-validator/skills/validate-commands/SKILL.md +2 -2
  60. package/plugins/plugin-validator/skills/validate-hooks/SKILL.md +57 -18
  61. package/plugins/team-superpower/.claude-plugin/plugin.json +7 -39
  62. package/plugins/team-superpower/README.md +85 -24
  63. package/plugins/team-superpower/agents/backend-developer.md +82 -0
  64. package/plugins/team-superpower/agents/designer.md +5 -1
  65. package/plugins/team-superpower/agents/frontend-developer.md +96 -0
  66. package/plugins/team-superpower/agents/planner.md +144 -16
  67. package/plugins/team-superpower/agents/qa-engineer.md +30 -0
  68. package/plugins/team-superpower/agents/reviewer.md +68 -22
  69. package/plugins/team-superpower/agents/security-engineer.md +110 -0
  70. package/plugins/team-superpower/agents/software-architect.md +30 -0
  71. package/plugins/team-superpower/assets/CLAUDE.md.template +96 -0
  72. package/plugins/team-superpower/assets/ESCALATION.md +19 -5
  73. package/plugins/team-superpower/assets/SESSION_README.md +119 -11
  74. package/plugins/team-superpower/commands/team-feature-resume.md +72 -6
  75. package/plugins/team-superpower/commands/team-feature.md +329 -28
  76. package/plugins/team-superpower/hooks/hooks.json +0 -3
  77. package/plugins/team-superpower/hooks/task-completed.sh +54 -5
  78. package/plugins/team-superpower/hooks/task-created.sh +79 -4
  79. package/plugins/team-superpower/scripts/detect-stack.sh +434 -0
  80. package/plugins/team-superpower/scripts/parse-claudemd.sh +194 -0
  81. package/plugins/tech-graph/.claude-plugin/plugin.json +1 -1
  82. package/plugins/tech-graph/agents/tech-graph.md +8 -0
  83. package/plugins/team-superpower/agents/implementer.md +0 -46
@@ -0,0 +1,194 @@
1
+ #!/usr/bin/env bash
2
+ # parse-claudemd.sh — extract the team-superpower YAML block from CLAUDE.md.
3
+ #
4
+ # Usage:
5
+ # parse-claudemd.sh extract [<path-to-CLAUDE.md>] prints the YAML block to stdout
6
+ # parse-claudemd.sh shape [<path-to-CLAUDE.md>] prints "full-stack" | "be-only" | "fe-only" | "none"
7
+ # parse-claudemd.sh get <dotted.key> [<path>] prints a single scalar value
8
+ # (limited: top-level group + leaf, e.g. backend.test_command)
9
+ #
10
+ # Exit codes:
11
+ # 0 success
12
+ # 1 CLAUDE.md missing or contains no `team-superpower` fenced block
13
+ # 2 bad arguments
14
+ # 3 key not found (only for `get`)
15
+ #
16
+ # Notes:
17
+ # - The fenced block is recognised by the literal opener "```team-superpower"
18
+ # (with no language indent) and the matching "```" closer.
19
+ # - Comments starting with `#` (after optional whitespace) are stripped before
20
+ # value extraction. Inline `# comment` tails are also stripped.
21
+ # - This is a deliberately tiny parser. It does NOT validate the schema.
22
+ # Schema validation is the lead's job (it halts on bad values per the spec).
23
+
24
+ set -euo pipefail
25
+
26
+ usage() {
27
+ sed -n '2,30p' "$0" | sed 's/^# \{0,1\}//'
28
+ }
29
+
30
+ CLAUDE_FILE_DEFAULT="${CLAUDE_PROJECT_DIR:-$PWD}/CLAUDE.md"
31
+
32
+ extract_block() {
33
+ local file="$1"
34
+ [ -f "$file" ] || return 1
35
+ # awk: print lines strictly between the opener and closer fences.
36
+ awk '
37
+ /^```team-superpower[[:space:]]*$/ { in_block = 1; next }
38
+ in_block && /^```[[:space:]]*$/ { in_block = 0; exit }
39
+ in_block { print }
40
+ ' "$file"
41
+ }
42
+
43
+ block_has_content() {
44
+ # Returns 0 if the YAML block extracted to stdin has at least one non-comment,
45
+ # non-blank line; 1 otherwise.
46
+ local payload
47
+ payload="$(cat || true)"
48
+ printf '%s' "$payload" | grep -vE '^[[:space:]]*(#|$)' | head -n1 | grep -q .
49
+ }
50
+
51
+ # Strip an inline `# comment` tail (but not `#` inside a quoted string — we
52
+ # tolerate the simple case here, the spec doesn't ship complex YAML values).
53
+ strip_comment() {
54
+ sed -E 's/[[:space:]]+#[^"\x27]*$//' | sed -E 's/^[[:space:]]*#.*$//'
55
+ }
56
+
57
+ cmd_extract() {
58
+ local file="${1:-$CLAUDE_FILE_DEFAULT}"
59
+ if [ ! -f "$file" ]; then
60
+ echo "parse-claudemd: $file does not exist" >&2
61
+ return 1
62
+ fi
63
+ local block
64
+ block="$(extract_block "$file")"
65
+ if [ -z "$block" ] || ! printf '%s' "$block" | block_has_content; then
66
+ echo "parse-claudemd: no \`team-superpower\` block found in $file" >&2
67
+ return 1
68
+ fi
69
+ printf '%s\n' "$block"
70
+ }
71
+
72
+ # Read a top-level scalar like `backend: none` or detect whether a group is
73
+ # explicitly "none".
74
+ group_is_none() {
75
+ # group_is_none <yaml-block-on-stdin> <group-name>
76
+ local group="$2"
77
+ awk -v g="$group" '
78
+ BEGIN { found = 0 }
79
+ {
80
+ sub(/[[:space:]]+#[^"\x27]*$/, "")
81
+ sub(/^[[:space:]]*#.*$/, "")
82
+ }
83
+ $0 ~ "^"g":[[:space:]]+none[[:space:]]*$" { found = 1; exit }
84
+ END { exit found ? 0 : 1 }
85
+ ' <<<"$1"
86
+ }
87
+
88
+ # A group is "present" if there is `group:` followed (on subsequent indented
89
+ # lines) by at least one non-comment, non-blank key/value pair.
90
+ group_is_present() {
91
+ # group_is_present <yaml-block> <group-name>
92
+ local group="$2"
93
+ awk -v g="$group" '
94
+ BEGIN { state = 0; has_keys = 0 }
95
+ {
96
+ line = $0
97
+ # strip comments
98
+ sub(/[[:space:]]+#[^"\x27]*$/, "", line)
99
+ sub(/^[[:space:]]*#.*$/, "", line)
100
+ }
101
+ line ~ "^"g":[[:space:]]*$" { state = 1; next }
102
+ line ~ "^"g":[[:space:]]+none" { state = 0; exit }
103
+ state == 1 && line ~ /^[^[:space:]]/ { state = 0 }
104
+ state == 1 && line ~ /^[[:space:]]+[A-Za-z_][A-Za-z0-9_]*:/ { has_keys = 1 }
105
+ END { exit has_keys ? 0 : 1 }
106
+ ' <<<"$1"
107
+ }
108
+
109
+ cmd_shape() {
110
+ local file="${1:-$CLAUDE_FILE_DEFAULT}"
111
+ local block
112
+ block="$(cmd_extract "$file")" || return 1
113
+
114
+ local be_present=1 fe_present=1
115
+ group_is_present "$block" backend || be_present=0
116
+ group_is_present "$block" frontend || fe_present=0
117
+
118
+ if [ "$be_present" -eq 1 ] && [ "$fe_present" -eq 1 ]; then echo "full-stack"
119
+ elif [ "$be_present" -eq 1 ]; then echo "be-only"
120
+ elif [ "$fe_present" -eq 1 ]; then echo "fe-only"
121
+ else echo "none"
122
+ fi
123
+ }
124
+
125
+ cmd_get() {
126
+ local key="${1:-}"
127
+ local file="${2:-$CLAUDE_FILE_DEFAULT}"
128
+ if [ -z "$key" ]; then usage >&2; return 2; fi
129
+ local block
130
+ block="$(cmd_extract "$file")" || return 1
131
+
132
+ case "$key" in
133
+ *.*)
134
+ local group leaf
135
+ group="${key%%.*}"
136
+ leaf="${key#*.}"
137
+ local value
138
+ value="$(awk -v g="$group" -v k="$leaf" '
139
+ BEGIN { in_group = 0; pat = "^[[:space:]]+" k "[[:space:]]*:[[:space:]]*" }
140
+ {
141
+ line = $0
142
+ sub(/[[:space:]]+#[^"\x27]*$/, "", line)
143
+ sub(/^[[:space:]]*#.*$/, "", line)
144
+ }
145
+ line ~ "^"g":[[:space:]]*$" { in_group = 1; next }
146
+ in_group && line ~ /^[^[:space:]]/ { in_group = 0 }
147
+ in_group && line ~ pat {
148
+ v = line
149
+ sub(pat, "", v)
150
+ sub(/[[:space:]]+$/, "", v)
151
+ gsub(/^"|"$/, "", v)
152
+ gsub(/^\x27|\x27$/, "", v)
153
+ print v
154
+ exit
155
+ }
156
+ ' <<<"$block")"
157
+ if [ -z "$value" ]; then return 3; fi
158
+ printf '%s\n' "$value"
159
+ ;;
160
+ *)
161
+ # Top-level scalar (e.g. "backend" for `backend: none`)
162
+ local value
163
+ value="$(awk -v k="$key" '
164
+ BEGIN { pat = "^" k ":[[:space:]]+" }
165
+ {
166
+ line = $0
167
+ sub(/[[:space:]]+#[^"\x27]*$/, "", line)
168
+ sub(/^[[:space:]]*#.*$/, "", line)
169
+ }
170
+ line ~ pat {
171
+ v = line; sub(pat, "", v); sub(/[[:space:]]+$/, "", v)
172
+ print v
173
+ exit
174
+ }
175
+ ' <<<"$block")"
176
+ if [ -z "$value" ]; then return 3; fi
177
+ printf '%s\n' "$value"
178
+ ;;
179
+ esac
180
+ }
181
+
182
+ main() {
183
+ local sub="${1:-}"
184
+ shift || true
185
+ case "$sub" in
186
+ extract) cmd_extract "$@" ;;
187
+ shape) cmd_shape "$@" ;;
188
+ get) cmd_get "$@" ;;
189
+ -h|--help|"") usage; [ -z "$sub" ] && return 2 || return 0 ;;
190
+ *) echo "unknown subcommand: $sub" >&2; usage >&2; return 2 ;;
191
+ esac
192
+ }
193
+
194
+ main "$@"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tech-graph",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Step-by-step wizard for generating technical diagrams as SVG+PNG.",
5
5
  "author": {
6
6
  "name": "steven"
@@ -9,6 +9,14 @@ model: sonnet
9
9
 
10
10
  You are a diagram wizard. Walk the user through 6 steps **one at a time**, then render an SVG (and optionally PNG) by delegating to the upstream `fireworks-tech-graph` skill at `plugins/tech-graph/skills/tech-graph/`.
11
11
 
12
+ ## Workflow
13
+
14
+ Six-step wizard (purpose → type → style → format → density → confirm), then the render protocol below. Each step asks one multiple-choice question; wizard state is held as JSON in working memory until step 6.
15
+
16
+ ## Output
17
+
18
+ An SVG (and optionally PNG) written to `<outdir>/<topic-slug>-<type>-<style>.svg`. The absolute path of every file written is reported to the user with a `snip open <path>` suggestion for visual review.
19
+
12
20
  ## Hard Rules
13
21
 
14
22
  1. **One question per message.** Always multiple-choice. Mark the default with `★`.
@@ -1,46 +0,0 @@
1
- ---
2
- name: implementer
3
- description: Executes one `impl:` task at a time via Superpowers `subagent-driven-development` with `test-driven-development` (RED-GREEN-REFACTOR). Owns phase 4 of the team-superpower workflow. Cannot modify the plan or touch files outside its assigned task.
4
- tools: Read, Write, Edit, Bash, Glob, Grep
5
- model: sonnet
6
- ---
7
-
8
- # Implementer — Phase 4 (Implementation)
9
-
10
- You are an **implementer** teammate. There may be one or more of you running in parallel. Your only job: self-claim `impl:`-prefixed tasks from the shared task list and complete each one through the canonical Superpowers chain.
11
-
12
- ## Hard rules
13
-
14
- 1. For every task, run the unmodified Superpowers `subagent-driven-development` skill at `~/.claude/plugins/superpowers/skills/subagent-driven-development/SKILL.md`. It dispatches a fresh subagent for the task and applies the two-stage review (spec compliance, then code quality). Read the SKILL.md before claiming your first task.
15
- 2. Inside that flow, every code change MUST go through the canonical `test-driven-development` skill: RED (failing test first) → GREEN (minimal code to pass) → REFACTOR. **If you ever realise you wrote production code before a failing test existed, delete that code and start the task over.** This is non-negotiable per the TDD skill.
16
- 3. You **may not modify the plan**. If the plan is wrong, halt and escalate to the lead via the §7 template (`docs/superpowers/ESCALATION.md`). The lead will route it to the planner; a plan change requires owner approval.
17
- 4. You **may not edit files assigned to another active implementer task**. Before opening any file, read the shared task list and confirm no `in-progress` task on a peer claims that path. If overlap is unavoidable, post a coordination message to the lead and wait.
18
- 5. Mark a task complete **only** after the two-stage review inside `subagent-driven-development` passes. The `TaskCompleted` hook will reject your completion if `metadata.plan_approved_at` is missing — make sure it's stamped from the lead's plan-approval handoff.
19
- 6. One task at a time. Do not batch.
20
-
21
- ## Task claiming protocol
22
-
23
- 1. Read the shared task list. Pick the lowest-numbered `impl:` task whose dependencies are all complete and whose file scope does not overlap an in-progress peer task.
24
- 2. Mark it in-progress with your teammate id.
25
- 3. Run subagent-driven-development.
26
- 4. On completion (two-stage review passed): mark the task complete with the required metadata.
27
-
28
- ## When the plan is wrong
29
-
30
- Escalate. Do NOT silently work around it. Example escalation:
31
-
32
- ```
33
- BLOCKED: Task impl:add-user-endpoint specifies POST /users but design doc says PUT /users/{id}. Which is correct?
34
- Phase: implementation
35
- Context: Plan task 4 reads "POST /users → 201". Design doc §3 reads "PUT /users/{id} idempotent". I can write either but they are not equivalent and the test I'd write differs.
36
- Options:
37
- A. Follow the plan (POST) and let reviewer flag if wrong.
38
- B. Halt; planner amends; owner re-approves the plan delta.
39
- C. Owner clarifies design intent directly.
40
- Recommendation: B — the plan is the source of truth for code, and a plan that contradicts the approved design must be reconciled before more tasks are claimed.
41
- Need from you: choose A/B/C.
42
- ```
43
-
44
- ## When you idle
45
-
46
- After a task completes, claim the next eligible one. If none are available and you have no unanswered inbound mail, idle. The `TeammateIdle` hook will block idle if peer mail is unanswered.