@massa-ai/cursor-plugin 1.55.0 → 1.56.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "massa-ai",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "massa-ai — semantic code search, memory, and context compression for Cursor"
5
5
  }
package/install.sh CHANGED
@@ -397,7 +397,7 @@ install_bundled_skills() {
397
397
  # authoritative constant (D6/IPT-05) — not derived by scanning the bundle's
398
398
  # skills/ directory, which would install 49 on cursor (every workflow skill
399
399
  # ships as its own directory here).
400
- for name in massa-ai persona-router profile; do
400
+ for name in massa-ai persona-router profile bootstrap; do
401
401
  src="$SCRIPT_DIR/skills/$name"
402
402
  [[ -d "$src" ]] || continue
403
403
  dest="$HARNESS_SKILLS_DIR/$name"
@@ -426,7 +426,7 @@ if (typeof data.platforms !== "object" || data.platforms === null || Array.isArr
426
426
  }
427
427
  data.version = 2;
428
428
  const prev = data.platforms[host];
429
- data.platforms[host] = { root, skillsOwner: "plugin", skills: ["massa-ai", "persona-router", "profile"] };
429
+ data.platforms[host] = { root, skillsOwner: "plugin", skills: ["massa-ai", "persona-router", "profile", "bootstrap"] };
430
430
  // The whole-record replace must not drop fields a previous successful install
431
431
  // wrote (R2) — re-attach them. installRoute (T9) is installer-owned but
432
432
  // written by a LATER step of this same install (record_plugin_version), so it
@@ -472,7 +472,7 @@ NODE
472
472
  )"
473
473
  [[ "$raw_owner" == "plugin" ]] && {
474
474
  local name
475
- for name in massa-ai persona-router profile; do
475
+ for name in massa-ai persona-router profile bootstrap; do
476
476
  rm -rf "$HARNESS_SKILLS_DIR/$name"
477
477
  done
478
478
  rmdir "$HARNESS_SKILLS_DIR" 2>/dev/null || true
@@ -680,15 +680,17 @@ vecho " + .cursor-plugin/plugin.json"
680
680
 
681
681
  # Copy the host-command skills (each in a subdirectory: skills/<name>/SKILL.md),
682
682
  # quick + generated workflow commands alike. massa-ai/, persona-router/,
683
- # agents/, and profile/ are the PDO-06 harness bundle, not a Cursor command
684
- # skill — they are installed separately, into the shared harness skills
683
+ # agents/, profile/ and bootstrap/ are the PDO-06 harness bundle, not a Cursor
684
+ # command skill — they are installed separately, into the shared harness skills
685
685
  # directory (see "Skills bundling" below), not into this plugin-cache
686
686
  # skills/ tree. `profile` was missing from this exclusion pre-fix, which
687
- # leaked it into the command-skill cache mislabeled as `/profile`.
687
+ # leaked it into the command-skill cache mislabeled as `/profile`; `bootstrap`
688
+ # (T21) is the same class, and is excluded here in the same commit that
689
+ # teaches the generator to emit it, so it never has a release where it leaks.
688
690
  for src in "$SCRIPT_DIR/skills/"*/SKILL.md; do
689
691
  name="$(basename "$(dirname "$src")")"
690
692
  case "$name" in
691
- massa-ai|persona-router|agents|profile) continue ;;
693
+ massa-ai|persona-router|agents|profile|bootstrap) continue ;;
692
694
  esac
693
695
  mkdir -p "$PLUGIN_DIR/skills/$name"
694
696
  cp "$src" "$PLUGIN_DIR/skills/$name/SKILL.md"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massa-ai/cursor-plugin",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "massa-ai plugin for Cursor — semantic code search, memory, and context compression",
5
5
  "files": [
6
6
  "agents",
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: bootstrap
3
+ description: Inspect or toggle the massa-ai startup-contract rules (caveman, massa-ai-router, persona-router, dedupe-guardrails, plan-challenge, conversation-feedback, indexing-hygiene, english-code, code-comments) that the installed MASSA-AI.md delivers to this host. Use when the user asks which startup rules are active, asks to turn one on or off, or asks why a rule is or is not being applied. Do NOT use for editing the rule text itself (that is a massa-ai repository change, not a runtime toggle) and do NOT claim a toggle is live before the user restarts the host session.
4
+ license: MIT
5
+ metadata:
6
+ author: Luiz Massa
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # Bootstrap Rule Toggle Skill
11
+
12
+ ## Mission
13
+ Drive the one massa-ai bootstrap toggle engine through its CLI and relay the engine's own per-host report — never a second toggle path, never a hand-edited `MASSA-AI.md`.
14
+
15
+ ## When To Use
16
+ - The user asks which startup-contract rules are active, or what a rule does.
17
+ - The user asks to enable or disable one rule by id.
18
+ - The user asks to preview a toggle without applying it.
19
+ - The user asks why a rule appears not to be in force on this host.
20
+
21
+ ## How To Drive It
22
+ `massa-ai-config` is the only front for this surface. There is no `bootstrap_*` MCP tool, deliberately: the toggle has to keep working when the massa-ai MCP server is unreachable, because that is exactly the state a user is in after disabling `massa-ai-router` — the rule that loads the router which would otherwise drive the toggle. Never reach for an MCP call here, and never fall back to editing a rendered file by hand.
23
+
24
+ ```
25
+ massa-ai-config bootstrap list # every rule: id, current state, default, description
26
+ massa-ai-config bootstrap show # same output as list
27
+ massa-ai-config bootstrap enable <rule-id> [--dry-run]
28
+ massa-ai-config bootstrap disable <rule-id> [--dry-run]
29
+ ```
30
+
31
+ Run `bootstrap list` before any toggle, so the reported change is against a state that was read, not assumed. Default to `--dry-run` first when the user has not explicitly asked to apply the change immediately: a dry run persists nothing at all — not the preference either — and only previews the per-host delivery plan.
32
+
33
+ `--target <dir>` exists for scratch homes and requires `--yes`; it redirects only where the contract is *rendered*. The preference itself is always persisted to `~/.config/massa-ai/config.json`, so under a redirected target the CLI names both paths on stderr. Do not pass `--target` unless the user asked for a specific directory.
34
+
35
+ ## The Rule Ids
36
+ Exactly nine ids exist, and only these are accepted. There is no protected subset — every one of them can be switched both ways, including `massa-ai-router`.
37
+
38
+ - `caveman` — keep communication compressed while preserving technical accuracy. Default: enabled.
39
+ - `massa-ai-router` — load the massa-ai skill as the workflow router before substantive work. Default: enabled.
40
+ - `persona-router` — select one cataloged specialist persona after massa-ai context is available. Default: enabled.
41
+ - `dedupe-guardrails` — reuse already-loaded massa-ai context instead of bulk-loading workflows or references. Default: enabled.
42
+ - `plan-challenge` — run The Fool as a post-plan challenge gate per the configured policy. Default: enabled.
43
+ - `conversation-feedback` — emit chat-visible status updates for massa-ai workflow progress. Default: enabled.
44
+ - `indexing-hygiene` — ignore build output, dependency, and secret paths during indexing and context loading. Default: enabled.
45
+ - `english-code` — write generated code, identifiers, comments, and commit-facing artifacts in English regardless of conversational language. Default: enabled.
46
+ - `code-comments` — require API doc blocks and rationale comments on generated code. Default: **disabled**.
47
+
48
+ Never invent an id. An unrecognised id is refused before anything is read or written, and the error names the id and lists all nine — relay that list rather than guessing what the user meant.
49
+
50
+ Disabling `massa-ai-router` is allowed and is the user's call. Say plainly that it removes the router which reads the startup contract, and that the recovery is this same CLI (`massa-ai-config bootstrap enable massa-ai-router`), which is a binary and not a rule, so it stays reachable.
51
+
52
+ ## Relaying The Result
53
+ Always relay the per-host outcome and the restart notice verbatim in substance, not just "done". The report prints one line per host, each carrying its own status literal:
54
+
55
+ - `written` — the contract was written and this host loads it.
56
+ - `written-not-wired` — the contract was written, but **nothing on this host loads it**. Never collapse this into `written` and never report it as success: the command exits non-zero on it. Relay the reason as the engine states it — which artifact is missing, in which file — together with its remedy, `scripts/install-skills.sh --apply`, and say the toggle will not take effect on that host until the wiring is added.
57
+ - `skipped` — a byte-identical re-apply whose wiring is already present. Relay its reason; a bare "skipped" does not distinguish "already up to date" from any other no-op.
58
+ - `failed` — relay the reason that host failed for.
59
+
60
+ Three further lines carry meaning and must not be dropped:
61
+
62
+ - **No host installed.** When no host is recorded, the report says so and the command exits 0. That is "nothing to do", not "nothing happened" — say which it is.
63
+ - **Ignored persisted state.** A persisted entry that is not a known rule id with a boolean value is reported once and is never fatal. Relay the names.
64
+ - **Restart.** When at least one host was written in a non-dry-run pass, the report states that a host session restart is required. Say so explicitly, and never claim a toggle is already in force before that restart — hosts load the startup contract at session start; there is no live in-session reload.
65
+
66
+ On a dry run, say so and that no files changed.
67
+
68
+ ## Restrictions
69
+ - Never use an MCP tool for this surface; none exists. The CLI must keep working with the MCP server unreachable.
70
+ - Never invent, abbreviate, or pluralise a rule id; use only the nine ids above, exactly as the engine lists them.
71
+ - Never hand-edit a delivered `MASSA-AI.md`, a host's `AGENTS.md`, or `~/.config/massa-ai/config.json` to satisfy a toggle request — the engine owns those bytes, and a hand edit is overwritten by the next apply.
72
+ - Never edit the rule text itself to satisfy a toggle request; that is a massa-ai repository change owned by a different workflow.
73
+ - Never claim a toggle is live before the affected host's session restarts.
74
+ - Never report a `written-not-wired` host as switched.
@@ -2,7 +2,9 @@
2
2
 
3
3
  Use in every implementation workflow, before writing or editing
4
4
  source. Defines the three things every created or updated unit of code owes
5
- the next reader: an API doc block, a rationale comment, and a test.
5
+ the next reader: an API doc block, a rationale comment, and a test. The first
6
+ two are gated by a bootstrap toggle; the test is not — read Toggle Scope below
7
+ before applying any of them.
6
8
 
7
9
  ## Principle
8
10
 
@@ -12,6 +14,19 @@ what does it do, why does it exist in this shape, and how do I prove it still
12
14
  works. Doc blocks answer the first, rationale comments the second, tests the
13
15
  third. None substitutes for another.
14
16
 
17
+ ## Toggle Scope
18
+
19
+ §1 (API Doc Block) and §2 (Rationale Comment) apply only while the
20
+ `code-comments` bootstrap rule is enabled, and `code-comments` defaults to
21
+ **off** — so on a fresh install neither section is in force, and generated code
22
+ carries no API doc blocks and no rationale comments.
23
+
24
+ §3 (Tests) sits outside that gate and applies unconditionally: no toggle state
25
+ weakens, narrows, or removes the test-coverage requirement.
26
+
27
+ Read the current state with `massa-ai-config bootstrap list`; the rendered
28
+ `MASSA-AI.md` startup contract is what states it for the running session.
29
+
15
30
  ## 1. API Doc Block
16
31
 
17
32
  Every **created or updated** public class, method, exported function, and public
@@ -30,13 +30,18 @@ Code vocabulary is evidence, not truth. When business intent is inferred only fr
30
30
 
31
31
  ## Language
32
32
 
33
- All new or renamed identifiers, classes, methods, screens, components,
34
- attributes, and implementation-facing artifact names are written in English.
35
- Convert any non-English source term to English before implementing —
36
- Portuguese is the primary case, but the rule covers any non-English source
37
- language. Preserve existing public contracts, persisted fields, and external
38
- names unless compatibility handling is explicitly in scope, per the
39
- public-contract clause above.
33
+ This section is normative for **identifier** naming only, per AD-019's
34
+ one-normative-reference discipline. New or renamed identifiers, classes,
35
+ methods, screens, components, attributes, and implementation-facing artifact
36
+ names use English words. Convert any non-English source term to English before
37
+ implementing Portuguese is the primary case, but the rule covers any
38
+ non-English source language. Preserve existing public contracts, persisted
39
+ fields, and external names unless compatibility handling is explicitly in
40
+ scope, per the public-contract clause above.
41
+
42
+ Everything past an identifier is owned by the `english-code` bootstrap rule in
43
+ the rendered `MASSA-AI.md` startup contract. Consult that rule there rather
44
+ than this section; the wider contract is deliberately not restated here.
40
45
 
41
46
  ## Workflow Use
42
47