compound-workflow 1.7.3 → 1.9.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 (92) hide show
  1. package/README.md +61 -69
  2. package/package.json +2 -8
  3. package/scripts/check-pack-readme.mjs +1 -16
  4. package/scripts/check-workflow-contracts.mjs +34 -44
  5. package/scripts/install-cli.mjs +273 -417
  6. package/src/AGENTS.md +59 -192
  7. package/src/{.agents/agents → agents}/research/best-practices-researcher.md +2 -2
  8. package/src/{.agents/commands → commands}/assess.md +4 -4
  9. package/src/commands/install.md +43 -0
  10. package/src/{.agents/commands → commands}/metrics.md +1 -1
  11. package/src/commands/workflow-agents.md +101 -0
  12. package/src/{.agents/commands → commands}/workflow-compound.md +1 -1
  13. package/src/{.agents/commands → commands}/workflow-plan.md +24 -33
  14. package/src/commands/workflow-work.md +836 -0
  15. package/src/{.agents/references → references}/README.md +1 -1
  16. package/src/{.agents/skills → skills}/capture-skill/SKILL.md +1 -1
  17. package/src/{.agents/skills → skills}/compound-docs/SKILL.md +6 -6
  18. package/src/{.agents/skills → skills}/compound-docs/references/yaml-schema.md +2 -2
  19. package/src/skills/setup-agents/SKILL.md +250 -0
  20. package/src/skills/standards/SKILL.md +79 -0
  21. package/src/skills/standards/references/architecture.md +228 -0
  22. package/src/skills/standards/references/code-quality.md +192 -0
  23. package/src/skills/standards/references/presentation.md +515 -0
  24. package/src/skills/standards/references/services.md +172 -0
  25. package/src/skills/standards/references/state-management.md +936 -0
  26. package/.claude-plugin/plugin.json +0 -7
  27. package/.cursor-plugin/plugin.json +0 -20
  28. package/.cursor-plugin/registration.json +0 -5
  29. package/scripts/check-version-parity.mjs +0 -36
  30. package/scripts/generate-platform-artifacts.mjs +0 -230
  31. package/src/.agents/commands/install.md +0 -51
  32. package/src/.agents/commands/workflow-work.md +0 -690
  33. package/src/.agents/registry.json +0 -48
  34. package/src/.agents/scripts/self-check.mjs +0 -227
  35. package/src/.agents/scripts/sync-opencode.mjs +0 -362
  36. package/src/.agents/skills/presentation-composability/SKILL.md +0 -72
  37. package/src/.agents/skills/react-ddd-mvc-frontend/SKILL.md +0 -51
  38. package/src/.agents/skills/react-ddd-mvc-frontend/references/feature-structure.md +0 -25
  39. package/src/.agents/skills/react-ddd-mvc-frontend/references/implementation-principles.md +0 -21
  40. package/src/.agents/skills/react-ddd-mvc-frontend/references/responsibility-gates.md +0 -41
  41. package/src/.agents/skills/react-ddd-mvc-frontend/references/source-map.md +0 -11
  42. package/src/.agents/skills/standards/SKILL.md +0 -747
  43. package/src/.agents/skills/xstate-actor-orchestration/SKILL.md +0 -197
  44. package/src/.agents/skills/xstate-actor-orchestration/agents/openai.yaml +0 -4
  45. package/src/.agents/skills/xstate-actor-orchestration/assets/statecharts/.gitkeep +0 -0
  46. package/src/.agents/skills/xstate-actor-orchestration/references/actor-system-patterns.md +0 -71
  47. package/src/.agents/skills/xstate-actor-orchestration/references/event-contracts.md +0 -73
  48. package/src/.agents/skills/xstate-actor-orchestration/references/functional-domain-patterns.md +0 -53
  49. package/src/.agents/skills/xstate-actor-orchestration/references/machine-structure-and-tags.md +0 -36
  50. package/src/.agents/skills/xstate-actor-orchestration/references/react-container-pattern.md +0 -45
  51. package/src/.agents/skills/xstate-actor-orchestration/references/reliability-observability.md +0 -39
  52. package/src/.agents/skills/xstate-actor-orchestration/references/skill-validation.md +0 -33
  53. package/src/.agents/skills/xstate-actor-orchestration/references/source-map.md +0 -44
  54. package/src/.agents/skills/xstate-actor-orchestration/references/statechart-review-and-signoff.md +0 -59
  55. package/src/.agents/skills/xstate-actor-orchestration/references/testing-strategy.md +0 -35
  56. package/src/.agents/skills/xstate-actor-orchestration/scripts/create-statechart-artifact.sh +0 -71
  57. package/src/.agents/skills/xstate-actor-orchestration/scripts/validate-skill.sh +0 -138
  58. package/src/generated/opencode.managed.json +0 -115
  59. /package/src/{.agents/agents → agents}/research/framework-docs-researcher.md +0 -0
  60. /package/src/{.agents/agents → agents}/research/git-history-analyzer.md +0 -0
  61. /package/src/{.agents/agents → agents}/research/learnings-researcher.md +0 -0
  62. /package/src/{.agents/agents → agents}/research/repo-research-analyst.md +0 -0
  63. /package/src/{.agents/agents → agents}/review/agent-native-reviewer.md +0 -0
  64. /package/src/{.agents/agents → agents}/review/planning-technical-reviewer.md +0 -0
  65. /package/src/{.agents/agents → agents}/workflow/bug-reproduction-validator.md +0 -0
  66. /package/src/{.agents/agents → agents}/workflow/lint.md +0 -0
  67. /package/src/{.agents/agents → agents}/workflow/spec-flow-analyzer.md +0 -0
  68. /package/src/{.agents/commands → commands}/test-browser.md +0 -0
  69. /package/src/{.agents/commands → commands}/workflow-brainstorm.md +0 -0
  70. /package/src/{.agents/commands → commands}/workflow-review.md +0 -0
  71. /package/src/{.agents/commands → commands}/workflow-tech-review.md +0 -0
  72. /package/src/{.agents/commands → commands}/workflow-triage.md +0 -0
  73. /package/src/{.agents/references → references}/standards/README.md +0 -0
  74. /package/src/{.agents/skills → skills}/agent-browser/SKILL.md +0 -0
  75. /package/src/{.agents/skills → skills}/audit-traceability/SKILL.md +0 -0
  76. /package/src/{.agents/skills → skills}/brainstorming/SKILL.md +0 -0
  77. /package/src/{.agents/skills → skills}/compound-docs/assets/critical-pattern-template.md +0 -0
  78. /package/src/{.agents/skills → skills}/compound-docs/assets/resolution-template.md +0 -0
  79. /package/src/{.agents/skills → skills}/compound-docs/schema.project.yaml +0 -0
  80. /package/src/{.agents/skills → skills}/compound-docs/schema.yaml +0 -0
  81. /package/src/{.agents/skills → skills}/data-foundations/SKILL.md +0 -0
  82. /package/src/{.agents/skills → skills}/document-review/SKILL.md +0 -0
  83. /package/src/{.agents/skills → skills}/file-todos/SKILL.md +0 -0
  84. /package/src/{.agents/skills → skills}/file-todos/assets/todo-template.md +0 -0
  85. /package/src/{.agents/skills → skills}/financial-workflow-integrity/SKILL.md +0 -0
  86. /package/src/{.agents/skills → skills}/git-worktree/SKILL.md +0 -0
  87. /package/src/{.agents/skills → skills}/pii-protection-prisma/SKILL.md +0 -0
  88. /package/src/{.agents/skills → skills}/process-metrics/SKILL.md +0 -0
  89. /package/src/{.agents/skills → skills}/process-metrics/assets/daily-template.md +0 -0
  90. /package/src/{.agents/skills → skills}/process-metrics/assets/monthly-template.md +0 -0
  91. /package/src/{.agents/skills → skills}/process-metrics/assets/weekly-template.md +0 -0
  92. /package/src/{.agents/skills → skills}/technical-review/SKILL.md +0 -0
@@ -1,35 +0,0 @@
1
- # Testing Strategy
2
-
3
- ## Test layers
4
-
5
- 1. Unit tests:
6
- - Actions, guards, pure transition logic.
7
-
8
- 2. Actor tests:
9
- - Start actors, send events, assert snapshots and outputs.
10
-
11
- 3. Integration tests:
12
- - Orchestrator plus real or fake worker actors.
13
-
14
- 4. Model/path tests:
15
- - Generate critical paths from machine model.
16
-
17
- ## Priority scenarios
18
-
19
- - Happy path completion.
20
- - Cancellation at each in-flight stage.
21
- - Retry exhaustion and terminal failure.
22
- - Recovery from persisted snapshot.
23
- - Out-of-order or duplicate events.
24
-
25
- ## Assertions to include
26
-
27
- - Current state value.
28
- - Context data invariants.
29
- - Emitted events to collaborators.
30
- - Invoked actor lifecycle (started/stopped as expected).
31
-
32
- ## Simulated time
33
-
34
- Use simulated clocks for deterministic timeout testing.
35
- Avoid wall-clock sleeps in tests.
@@ -1,71 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- skill_dir="${1:-.}"
6
- machine_name_raw="${2:-}"
7
- timestamp="${3:-$(date '+%Y%m%d-%H%M%S')}"
8
- phase="${4:-DRAFT}"
9
-
10
- if [[ -z "$machine_name_raw" ]]; then
11
- echo "Usage: $0 <skill-dir> <machine-name> [timestamp] [phase]" >&2
12
- exit 1
13
- fi
14
-
15
- machine_name="$(echo "$machine_name_raw" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+//; s/-+$//')"
16
- if [[ -z "$machine_name" ]]; then
17
- echo "ERROR: machine-name must contain at least one alphanumeric character" >&2
18
- exit 1
19
- fi
20
-
21
- artifact_dir="$skill_dir/assets/statecharts"
22
- mkdir -p "$artifact_dir"
23
-
24
- artifact_base="${machine_name}-${timestamp}"
25
- diagram_file="$artifact_dir/${artifact_base}.mmd"
26
- signoff_file="$artifact_dir/${artifact_base}.signoff.md"
27
-
28
- if [[ -e "$diagram_file" || -e "$signoff_file" ]]; then
29
- echo "ERROR: Artifact already exists for ${artifact_base}" >&2
30
- exit 1
31
- fi
32
-
33
- cat > "$diagram_file" <<EOF
34
- stateDiagram-v2
35
- [*] --> "TODO: initial"
36
- "TODO: initial" --> "TODO: next": "TODO: event"
37
- "TODO: next" --> [*]
38
- EOF
39
-
40
- cat > "$signoff_file" <<EOF
41
- # Statechart Sign-Off
42
-
43
- - Machine: ${machine_name_raw}
44
- - Artifact: ${artifact_base}
45
- - Diagram: ./$(basename "$diagram_file")
46
- - Source machine file: TODO:
47
-
48
- ## Change summary
49
-
50
- TODO:
51
-
52
- ## Review discussion points
53
-
54
- 1. Scope and event visibility:
55
- 2. Parallel vs sequential structure:
56
- 3. Wildcard routing behavior:
57
- 4. Retry/cancel/recovery paths:
58
- 5. Tags used by UI selectors:
59
- 6. Emitted imperative events:
60
-
61
- ## Sign-off
62
-
63
- - Status: ${phase}
64
- - Reviewer:
65
- - Date:
66
- - Notes:
67
- EOF
68
-
69
- echo "Created:"
70
- echo "- $diagram_file"
71
- echo "- $signoff_file"
@@ -1,138 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- skill_dir="${1:-.}"
6
- skill_md="$skill_dir/SKILL.md"
7
- openai_yaml="$skill_dir/agents/openai.yaml"
8
- statecharts_dir="$skill_dir/assets/statecharts"
9
- statechart_script="$skill_dir/scripts/create-statechart-artifact.sh"
10
-
11
- fail=0
12
-
13
- ok() {
14
- echo "OK: $1"
15
- }
16
-
17
- err() {
18
- echo "ERROR: $1" >&2
19
- fail=1
20
- }
21
-
22
- if [[ ! -f "$skill_md" ]]; then
23
- err "Missing SKILL.md at $skill_md"
24
- fi
25
-
26
- if [[ ! -f "$openai_yaml" ]]; then
27
- err "Missing agents/openai.yaml at $openai_yaml"
28
- fi
29
-
30
- if [[ ! -d "$statecharts_dir" ]]; then
31
- err "Missing statechart asset directory at $statecharts_dir"
32
- else
33
- ok "Statechart asset directory exists"
34
- fi
35
-
36
- if [[ ! -f "$statechart_script" ]]; then
37
- err "Missing statechart artifact script at $statechart_script"
38
- elif [[ ! -x "$statechart_script" ]]; then
39
- err "Statechart artifact script is not executable: $statechart_script"
40
- else
41
- ok "Statechart artifact script exists and is executable"
42
- fi
43
-
44
- if [[ -f "$skill_md" ]]; then
45
- first_line="$(head -n 1 "$skill_md" || true)"
46
- if [[ "$first_line" != "---" ]]; then
47
- err "SKILL.md must start with frontmatter delimiter '---'"
48
- fi
49
-
50
- fm_end_line="$(awk 'NR > 1 && $0 == "---" { print NR; exit }' "$skill_md")"
51
- if [[ -z "${fm_end_line:-}" ]]; then
52
- err "SKILL.md is missing closing frontmatter delimiter '---'"
53
- else
54
- ok "Frontmatter delimiters found"
55
-
56
- frontmatter="$(sed -n "2,$((fm_end_line - 1))p" "$skill_md")"
57
-
58
- if ! grep -qE '^name:[[:space:]]*[^[:space:]].*$' <<<"$frontmatter"; then
59
- err "Frontmatter must include non-empty 'name'"
60
- fi
61
-
62
- if ! grep -qE '^description:[[:space:]]*[^[:space:]].*$' <<<"$frontmatter"; then
63
- err "Frontmatter must include non-empty 'description'"
64
- fi
65
-
66
- extra_keys="$(sed '/^[[:space:]]*$/d' <<<"$frontmatter" | sed 's/:.*$//' | grep -Ev '^(name|description)$' || true)"
67
- if [[ -n "$extra_keys" ]]; then
68
- err "Frontmatter contains unsupported key(s): $(tr '\n' ',' <<<"$extra_keys" | sed 's/,$//')"
69
- else
70
- ok "Frontmatter keys are limited to name and description"
71
- fi
72
-
73
- skill_name="$(sed -n 's/^name:[[:space:]]*//p' <<<"$frontmatter" | head -n 1)"
74
- if [[ ! "$skill_name" =~ ^[a-z0-9-]{1,64}$ ]]; then
75
- err "name must match ^[a-z0-9-]{1,64}$ (found '$skill_name')"
76
- else
77
- ok "Skill name format is valid"
78
- fi
79
-
80
- skill_dir_basename="$(basename "$skill_dir")"
81
- if [[ "$skill_name" != "$skill_dir_basename" ]]; then
82
- err "Folder name '$skill_dir_basename' must match frontmatter name '$skill_name'"
83
- else
84
- ok "Folder name matches frontmatter name"
85
- fi
86
- fi
87
- fi
88
-
89
- if [[ -f "$openai_yaml" ]]; then
90
- if ! grep -qE '^[[:space:]]*default_prompt:[[:space:]]*".*"$' "$openai_yaml"; then
91
- err "agents/openai.yaml must include quoted default_prompt"
92
- else
93
- ok "default_prompt exists"
94
- fi
95
-
96
- if [[ -n "${skill_name:-}" ]] && ! grep -q '\$'"${skill_name}" "$openai_yaml"; then
97
- err "default_prompt must mention \$${skill_name}"
98
- elif [[ -n "${skill_name:-}" ]]; then
99
- ok "default_prompt mentions $skill_name"
100
- fi
101
- fi
102
-
103
- if command -v rg >/dev/null 2>&1; then
104
- set +e
105
- rg -n '\[TODO|TODO:' \
106
- "$skill_dir/SKILL.md" \
107
- "$skill_dir/agents/openai.yaml" \
108
- "$skill_dir/references" >/dev/null
109
- todo_rc=$?
110
- set -e
111
- if [[ "$todo_rc" -eq 0 ]]; then
112
- err "Unresolved TODO placeholders found in skill files"
113
- elif [[ "$todo_rc" -eq 1 ]]; then
114
- ok "No TODO markers found"
115
- else
116
- err "Failed to run TODO marker check with ripgrep"
117
- fi
118
-
119
- if [[ -f "$skill_md" ]]; then
120
- while IFS= read -r rel_path; do
121
- clean_path="${rel_path#references/}"
122
- full_path="$skill_dir/references/$clean_path"
123
- if [[ ! -f "$full_path" ]]; then
124
- err "Missing reference file linked from SKILL.md: $rel_path"
125
- fi
126
- done < <(rg -o '\]\((references/[^)]+)\)' "$skill_md" | sed -E 's/.*\((references\/[^)]+)\).*/\1/' | sort -u)
127
- ok "Reference links resolved"
128
- fi
129
- else
130
- err "ripgrep (rg) is required for TODO and reference-link checks"
131
- fi
132
-
133
- if [[ "$fail" -ne 0 ]]; then
134
- echo "Validation failed." >&2
135
- exit 1
136
- fi
137
-
138
- echo "Validation passed."
@@ -1,115 +0,0 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "skillsPath": "node_modules/compound-workflow/src/.agents/skills",
4
- "commandRoot": "node_modules/compound-workflow/src/.agents/commands",
5
- "agentRoot": "node_modules/compound-workflow/src/.agents/agents",
6
- "commands": [
7
- {
8
- "id": "assess",
9
- "description": "Review recent metrics entries to identify failures/trends and propose concrete improvements to commands/skills/agents",
10
- "rel": "assess.md"
11
- },
12
- {
13
- "id": "install",
14
- "description": "Install compound-workflow in this project (native mode): writes opencode.json, merges AGENTS.md, and creates docs/todo dirs.",
15
- "rel": "install.md"
16
- },
17
- {
18
- "id": "metrics",
19
- "description": "Log a metrics entry for the current workflow run so process performance can be reviewed daily/weekly/monthly",
20
- "rel": "metrics.md"
21
- },
22
- {
23
- "id": "test-browser",
24
- "description": "Run browser tests on pages affected by current PR or branch",
25
- "rel": "test-browser.md"
26
- },
27
- {
28
- "id": "workflow:brainstorm",
29
- "description": "Explore requirements and approaches through collaborative dialogue before planning implementation",
30
- "rel": "workflow-brainstorm.md"
31
- },
32
- {
33
- "id": "workflow:compound",
34
- "description": "Document a durable learning (solved problem or implementation insight) into docs/solutions/ to compound institutional knowledge",
35
- "rel": "workflow-compound.md"
36
- },
37
- {
38
- "id": "workflow:plan",
39
- "description": "Transform feature descriptions into well-structured project plans using an explicit fidelity and confidence model",
40
- "rel": "workflow-plan.md"
41
- },
42
- {
43
- "id": "workflow:review",
44
- "description": "Review a PR/branch/diff with structured findings. Does not implement fixes unless explicitly requested.",
45
- "rel": "workflow-review.md"
46
- },
47
- {
48
- "id": "workflow:tech-review",
49
- "description": "Run technical review on a plan (technical correctness before build). Optional plan path or latest in docs/plans/.",
50
- "rel": "workflow-tech-review.md"
51
- },
52
- {
53
- "id": "workflow:triage",
54
- "description": "Manual triage command to prioritize todo files into an executable ready queue (priority, dependencies, recommended action)",
55
- "rel": "workflow-triage.md"
56
- },
57
- {
58
- "id": "workflow:work",
59
- "description": "Execute a plan file systematically (implementation + verification) without auto-shipping",
60
- "rel": "workflow-work.md"
61
- }
62
- ],
63
- "agents": [
64
- {
65
- "id": "agent-native-reviewer",
66
- "description": "Reviews code to ensure agent-native parity — any action a user can take, an agent can also take. Use after adding UI features, agent tools, or system prompts.",
67
- "rel": "review/agent-native-reviewer.md"
68
- },
69
- {
70
- "id": "best-practices-researcher",
71
- "description": "Researches and synthesizes external best practices, documentation, and examples for any technology or framework. Use when you need industry standards, community conventions, or implementation guidance.",
72
- "rel": "research/best-practices-researcher.md"
73
- },
74
- {
75
- "id": "bug-reproduction-validator",
76
- "description": "Systematically reproduces and validates bug reports to confirm whether reported behavior is an actual bug. Use when you receive a bug report or issue that needs verification.",
77
- "rel": "workflow/bug-reproduction-validator.md"
78
- },
79
- {
80
- "id": "framework-docs-researcher",
81
- "description": "Gathers authoritative documentation for frameworks, libraries, and dependencies. Use when you need official docs, version constraints, breaking changes, or implementation patterns.",
82
- "rel": "research/framework-docs-researcher.md"
83
- },
84
- {
85
- "id": "git-history-analyzer",
86
- "description": "Performs archaeological analysis of git history to trace code evolution, identify contributors, and understand why code patterns exist. Use when you need historical context for code changes.",
87
- "rel": "research/git-history-analyzer.md"
88
- },
89
- {
90
- "id": "learnings-researcher",
91
- "description": "Searches docs/solutions/ for relevant past solutions by frontmatter metadata. Use before implementing features or fixing problems to surface institutional knowledge and prevent repeated mistakes.",
92
- "rel": "research/learnings-researcher.md"
93
- },
94
- {
95
- "id": "lint",
96
- "description": "Run repo-configured linting and code quality checks. Use when you need to lint/format or verify code quality.",
97
- "rel": "workflow/lint.md"
98
- },
99
- {
100
- "id": "planning-technical-reviewer",
101
- "description": "Independent technical reviewer for brainstorm/plan outputs before execution.",
102
- "rel": "review/planning-technical-reviewer.md"
103
- },
104
- {
105
- "id": "repo-research-analyst",
106
- "description": "Conducts thorough research on repository structure, documentation, conventions, and implementation patterns. Use when onboarding to a new codebase or understanding project conventions.",
107
- "rel": "research/repo-research-analyst.md"
108
- },
109
- {
110
- "id": "spec-flow-analyzer",
111
- "description": "Analyzes specifications and feature descriptions for user flow completeness and gap identification. Use when a spec, plan, or feature description needs flow analysis, edge case discovery, or requirements validation.",
112
- "rel": "workflow/spec-flow-analyzer.md"
113
- }
114
- ]
115
- }
File without changes