@massa-ai/claude-plugin 1.63.1 → 1.64.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.
- package/.claude-plugin/plugin.json +1 -1
- package/agent-profiles/balanced/code-explorer.md +1 -1
- package/agent-profiles/cheap/code-explorer.md +1 -1
- package/agent-profiles/heavy/code-explorer.md +1 -1
- package/agent-profiles/home/code-explorer.md +1 -1
- package/agent-profiles/work/code-explorer.md +1 -1
- package/agents/code-explorer.md +1 -1
- package/commands/the-fool.md +1 -1
- package/package.json +1 -1
- package/skills/agents/code-explorer/SKILL.md +1 -1
- package/skills/bootstrap/SKILL.md +6 -6
- package/skills/massa-ai/SKILL.md +9 -8
- package/skills/massa-ai/references/agent-orchestration.md +7 -10
- package/skills/massa-ai/references/architecture-lenses.md +1 -21
- package/skills/massa-ai/references/artifact-persistence.md +2 -0
- package/skills/massa-ai/references/codebase-investigation.md +29 -9
- package/skills/massa-ai/references/conversation-feedback.md +18 -38
- package/skills/massa-ai/references/create-rfc/quality-and-lifecycle.md +1 -1
- package/skills/massa-ai/references/create-tdd/quality-and-lifecycle.md +1 -1
- package/skills/massa-ai/references/decision-engine.md +4 -8
- package/skills/massa-ai/references/design-implementation.md +27 -26
- package/skills/massa-ai/references/lessons.md +13 -20
- package/skills/massa-ai/references/mcp-tools.md +11 -24
- package/skills/massa-ai/references/mobile-figma-matcher/repository-detection.md +13 -1
- package/skills/massa-ai/references/pr-task-fix.md +5 -13
- package/skills/massa-ai/references/spec-driven/code-analysis.md +10 -7
- package/skills/massa-ai/references/spec-driven/coding-principles.md +14 -49
- package/skills/massa-ai/references/spec-driven/memory.md +6 -15
- package/skills/massa-ai/references/spec-driven/tasks.md +1 -1
- package/skills/massa-ai/references/spec-driven/validate.md +2 -2
- package/skills/massa-ai/references/synapse-policy.md +3 -4
- package/skills/massa-ai/workflows/create-adr.md +1 -1
- package/skills/massa-ai/workflows/create-rfc.md +1 -1
- package/skills/massa-ai/workflows/create-tdd.md +1 -1
- package/skills/massa-ai/workflows/design.md +1 -1
- package/skills/massa-ai/workflows/exploration.md +2 -4
- package/skills/massa-ai/workflows/refactor.md +1 -1
- package/skills/massa-ai/workflows/refinement/furps-refinement.md +1 -1
- package/skills/massa-ai/workflows/spec-driven.md +3 -3
- package/skills/massa-ai/workflows/the-fool.md +16 -19
- package/skills/massa-ai/references/furps/analyst-role.md +0 -49
- package/skills/massa-ai/references/hook-enforcement.md +0 -133
- package/skills/massa-ai/references/spec-driven/lessons.md +0 -5
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
# Hook Enforcement
|
|
2
|
-
|
|
3
|
-
Maps the runtime hook layer (`apps/claude-plugin/hooks/`, its `hooks.json`) to massa-ai
|
|
4
|
-
workflows and references, and documents the massa-ai dual-write/tag contract.
|
|
5
|
-
Hooks **enforce** existing references and the gate the router already selected —
|
|
6
|
-
they never re-author policy and never re-route. One canonical location per rule.
|
|
7
|
-
|
|
8
|
-
## Platform Scoping
|
|
9
|
-
|
|
10
|
-
The full hook graph installs for **Claude Code, Codex, and Cursor**. OpenCode has
|
|
11
|
-
no hook model and keeps the `AGENTS.md` bootstrap only. The installer
|
|
12
|
-
(each host plugin's `install.sh`) preserves unrelated user hooks on install and
|
|
13
|
-
uninstall via managed-command tracking.
|
|
14
|
-
|
|
15
|
-
Platform hook formats differ; the installer translates one canonical graph
|
|
16
|
-
(`hooks/hooks.json`, PascalCase events) into each platform's native shape:
|
|
17
|
-
|
|
18
|
-
| Platform | Format | Event names | Matcher notes |
|
|
19
|
-
|---|---|---|---|
|
|
20
|
-
| Claude Code | nested `settings.json` `hooks.<Event>[{matcher, hooks:[{type,command}]}]` | `PreToolUse`, `PostToolUse`, `Stop`, `PreCompact`, `SessionStart` (PascalCase) | `Edit\|Write` |
|
|
21
|
-
| Codex | nested `hooks.json` (same shape as Claude) | same PascalCase events | same as Claude |
|
|
22
|
-
| Cursor | flat `hooks.json` `hooks.<event>[{command, matcher?}]` | `preToolUse`, `postToolUse`, `stop`, `preCompact`, `sessionStart` (camelCase) | tool names differ: `Edit` → `Write` (no Edit tool in Cursor) |
|
|
23
|
-
|
|
24
|
-
Blocking semantics: Claude and Codex honor the `{"decision":"block","reason"}`
|
|
25
|
-
JSON output. Cursor's flat protocol differs; blocking hooks (`gateguard`,
|
|
26
|
-
`config_protection`) still run and nudge, but Cursor's denial is best-effort.
|
|
27
|
-
The non-blocking hooks (observe, context_monitor, suggest_compact,
|
|
28
|
-
continuous_learning_evaluate, precompact_save_state, stop_evidence_gate) work
|
|
29
|
-
identically across all three platforms (read stdin JSON, emit JSON, stderr
|
|
30
|
-
nudge, exit 0).
|
|
31
|
-
|
|
32
|
-
## Environment Flags
|
|
33
|
-
|
|
34
|
-
| Flag | Values | Effect |
|
|
35
|
-
|---|---|---|
|
|
36
|
-
| `MASSA_AI_HOOK_PROFILE` | `minimal` \| `standard` \| `strict` | `minimal`: only blocking safety hooks (gateguard, config_protection). `standard` (default): blocking + nudges + observation + stop gate as nudge. `strict`: stop gate blocks once per session to force acknowledgment. |
|
|
37
|
-
| `MASSA_AI_DISABLED_HOOKS` | comma-separated hook names | Skip named hooks entirely. |
|
|
38
|
-
|
|
39
|
-
Every hook exits 0 on bad stdin or non-critical error. Blocking hooks are
|
|
40
|
-
<200 ms and make no network calls. Observation hooks are non-blocking.
|
|
41
|
-
|
|
42
|
-
## Hooks → Enforced Reference
|
|
43
|
-
|
|
44
|
-
| Hook | Event | Enforces |
|
|
45
|
-
|---|---|---|
|
|
46
|
-
| `stop_evidence_gate.py` | Stop | `references/evidence-gate.md` |
|
|
47
|
-
| `continuous_learning_evaluate.py` | Stop | `references/lessons.md`, `scripts/lessons.ts` |
|
|
48
|
-
| `precompact_save_state.py` | PreCompact | `workflows/long-session.md`, `references/context-firewall.md` |
|
|
49
|
-
| `suggest_compact.py` | PreToolUse(Edit\|Write) | `references/context-firewall.md` (compaction boundary) |
|
|
50
|
-
| `gateguard_fact_force.py` | PreToolUse(Edit) | `references/context-firewall.md` (investigate-before-edit) |
|
|
51
|
-
| `config_protection.py` | PreToolUse(Edit\|Write) | `references/verification-ladder.md` (scope) |
|
|
52
|
-
| `observe_runner.py` | PostToolUse | `references/lessons.md` (observation buffer) |
|
|
53
|
-
| `context_monitor.py` | PostToolUse | `references/verification-ladder.md` (task sizing/scope) |
|
|
54
|
-
|
|
55
|
-
## Workflow-Aware Stop Gate
|
|
56
|
-
|
|
57
|
-
`stop_evidence_gate.py` reads the active `workflow` from `.specs/project/STATE.md`
|
|
58
|
-
and selects the workflow-specific gate. When `workflow` is unset or STATE is
|
|
59
|
-
absent, it falls back to the flat evidence matrix (graceful degradation).
|
|
60
|
-
|
|
61
|
-
| Workflow | `stop_evidence_gate` applies |
|
|
62
|
-
|---|---|
|
|
63
|
-
| `architecture-fix` | verification-fix gate (`references/verification-ladder.md`) |
|
|
64
|
-
| `bugs-fix` | verification-fix gate |
|
|
65
|
-
| `code-quality-fix` | verification-fix gate |
|
|
66
|
-
| `implementation-fix` | verification-fix gate |
|
|
67
|
-
| `mobile-figma-fix` | verification-fix gate |
|
|
68
|
-
| `requirements-fix` | verification-fix gate |
|
|
69
|
-
| `security-fix` | verification-fix gate |
|
|
70
|
-
| `tests-fix` | verification-fix gate |
|
|
71
|
-
| `spec-driven` | `validation.md` verdict = Pass; 3-iteration cap |
|
|
72
|
-
| `debug` | reproduction no longer fails |
|
|
73
|
-
| `feature` | lite evidence matrix (`references/evidence-gate.md`) |
|
|
74
|
-
| `refactor` | lite evidence matrix |
|
|
75
|
-
| `exploration` | no-mutation gate (read-only invariant) |
|
|
76
|
-
| `architecture-audit` | flat evidence matrix |
|
|
77
|
-
| `bugs-audit` | flat evidence matrix |
|
|
78
|
-
| `code-quality-audit` | flat evidence matrix |
|
|
79
|
-
| `implementation-audit` | flat evidence matrix |
|
|
80
|
-
| `mobile-figma-audit` | flat evidence matrix |
|
|
81
|
-
| `requirements-audit` | flat evidence matrix |
|
|
82
|
-
| `security-audit` | flat evidence matrix |
|
|
83
|
-
| `tests-audit` | flat evidence matrix |
|
|
84
|
-
| `furps-refinement` | flat evidence matrix (findings-only; report written + DoR coverage gaps listed) |
|
|
85
|
-
| `create-adr` | flat evidence matrix |
|
|
86
|
-
| `commit` | flat evidence matrix |
|
|
87
|
-
| `design` | flat evidence matrix |
|
|
88
|
-
| `long-session` | flat evidence matrix |
|
|
89
|
-
| `onboarding` | flat evidence matrix |
|
|
90
|
-
| `create-rfc` | flat evidence matrix |
|
|
91
|
-
| `create-tdd` | flat evidence matrix |
|
|
92
|
-
| `the-fool` | flat evidence matrix |
|
|
93
|
-
| `create-ticket` | flat evidence matrix |
|
|
94
|
-
|
|
95
|
-
## massa-ai Dual-Write / Tag Contract
|
|
96
|
-
|
|
97
|
-
The continuous-learning loop writes two stores, not one:
|
|
98
|
-
|
|
99
|
-
- `lessons.ts add` / `import` — deterministic grounded file store
|
|
100
|
-
(`.specs/lessons.json`); refuses ungrounded lessons; promotion/quarantine.
|
|
101
|
-
- `remember` — durable memory, best-effort via REST (`MASSA_AI_API_URL`),
|
|
102
|
-
file-only fallback when REST is unavailable.
|
|
103
|
-
|
|
104
|
-
**Type:** always `pattern` (lessons are procedural knowledge) or `decision`
|
|
105
|
-
(when a lesson captures a chosen trade-off). `procedural` is a **tag**, never a
|
|
106
|
-
type — massa-ai supports only `critical | conversation | code | decision | pattern`
|
|
107
|
-
(`references/mcp-tools.md`).
|
|
108
|
-
|
|
109
|
-
**Tags:** every massa-ai lesson write carries the full massa-ai persistence
|
|
110
|
-
contract: `project:<projectId>`, `session:<workflowSessionId>`,
|
|
111
|
-
`workflow:<type>`, `entity:<name>`, `memory:procedural`. This puts lessons in
|
|
112
|
-
the same recall namespace as massa-ai decisions/patterns, so future
|
|
113
|
-
`recall` surfaces them at Specify/Design.
|
|
114
|
-
|
|
115
|
-
`PreCompact` (`precompact_save_state.py`) writes a massa-ai `critical` memory
|
|
116
|
-
tagged `memory:working` for the active objective + exact next step before the
|
|
117
|
-
window compacts; file-only fallback when REST is unavailable.
|
|
118
|
-
|
|
119
|
-
## No SessionStart Recall Duplication
|
|
120
|
-
|
|
121
|
-
massa-ai's router already runs budgeted `recall` on startup. The hook
|
|
122
|
-
layer adds **no** competing SessionStart recall. The installer keeps the
|
|
123
|
-
existing SessionStart bootstrap (which transports `AGENTS.md` policy); memory
|
|
124
|
-
recall stays owned by the router.
|
|
125
|
-
|
|
126
|
-
## Graceful Degradation
|
|
127
|
-
|
|
128
|
-
| Failure | Behavior |
|
|
129
|
-
|---|---|
|
|
130
|
-
| massa-ai REST unavailable | lesson still lands in `lessons.json`; the memory write is fire-and-forget and is dropped silently (a timeout emits a `deadline-on-fire` JSON breadcrumb on **stderr**, nothing is written to disk) |
|
|
131
|
-
| `.specs/project/STATE.md` absent / workflow unset | stop gate falls back to flat matrix |
|
|
132
|
-
| bad / malformed stdin | hook exits 0, never blocks |
|
|
133
|
-
| hook non-critical error | exit 0, approve, degrade silently — there is no skip log file |
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Spec-Driven Lessons
|
|
2
|
-
|
|
3
|
-
Use `references/lessons.md` for lesson loading, capture, and lifecycle. The lesson system is no longer spec-driven only — it applies to all implementation, fix, and debug workflows.
|
|
4
|
-
|
|
5
|
-
See `references/lessons.md` for the full signal table, capture commands, loading commands, promotion lifecycle, and fallback behavior.
|