Skip to content

Commit a941533

Browse files
Simplify plugin detection: only full plugins (core/grid) qualify as plugin mode
Lightweight package (rosetta@rosetta) is an MCP connector, not a plugin — it falls through to install/upgrade and gets shells created normally. Removes plugin_type field and 3-way branching in favor of narrowing the existing plugin detection to require a full plugin identifier. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 15579b0 commit a941533

4 files changed

Lines changed: 17 additions & 31 deletions

File tree

instructions/r2/core/skills/init-workspace-context/SKILL.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,19 @@ Initialization must behave differently for fresh, existing, or plugin workspaces
1818

1919
<core_concepts>
2020
- Rosetta prep steps completed
21-
- Three modes: install (no files per `bootstrap_rosetta_files`), upgrade (some files per `bootstrap_rosetta_files` exist), plugin (LLM context contains "RUNNING AS A PLUGIN")
22-
- Two plugin types: full (core@rosetta or grid@rosetta — all instructions bundled, no shells needed), lightweight (rosetta@rosetta — bootstrap + MCP only, shells required)
21+
- Three modes: install (no files per `bootstrap_rosetta_files`), upgrade (some files per `bootstrap_rosetta_files` exist), plugin (LLM context contains "RUNNING AS A PLUGIN" AND "core@rosetta" or "grid@rosetta")
22+
- Only full plugins (core@rosetta, grid@rosetta) qualify as plugin mode — they bundle all instructions, no shells needed
2323
</core_concepts>
2424

2525
<process>
26-
1. Check LLM context for "RUNNING AS A PLUGIN" — if found, set mode = plugin
26+
1. Check LLM context for "RUNNING AS A PLUGIN":
27+
- If found AND context also contains "core@rosetta" or "grid@rosetta" → set mode = plugin
28+
- If found but context contains "rosetta@rosetta" or neither identifier → fall through to step 2 (not a plugin)
2729
2. If not plugin, scan workspace for existing files per `bootstrap_rosetta_files`
2830
3. Any found → mode = upgrade; none → mode = install
29-
4. If mode = plugin, detect plugin_type:
30-
- Context contains "core@rosetta" or "grid@rosetta" → plugin_type = full
31-
- Context contains "rosetta@rosetta" → plugin_type = lightweight
32-
- Neither found → plugin_type = unknown
33-
5. Scan for multiple sub-repositories with independent documentation roots → set composite flag, treat git repos as modules, requires use of `large-workspace-handling` skill
34-
6. Build file inventory: path and status for each file per `bootstrap_rosetta_files`
35-
7. Return: mode (install|upgrade|plugin), plugin_active, plugin_type (full|lightweight|unknown|null), composite, existing_files list
31+
4. Scan for multiple sub-repositories with independent documentation roots → set composite flag, treat git repos as modules, requires use of `large-workspace-handling` skill
32+
5. Build file inventory: path and status for each file per `bootstrap_rosetta_files`
33+
6. Return: mode (install|upgrade|plugin), plugin_active, composite, existing_files list
3634
</process>
3735

3836
</init_workspace_context>

instructions/r2/core/workflows/init-workspace-flow-context.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Determines workspace state before any changes occur. Without accurate mode detec
1414
<workflow_context>
1515
- Phase 1 of 8 in init-workspace-flow
1616
- Input: filesystem, LLM context (bootstrap markers)
17-
- Output: state.mode, state.plugin_active, state.plugin_type, state.composite, state.existing_files
17+
- Output: state.mode, state.plugin_active, state.composite, state.existing_files
1818
- Prerequisite: state file created by workflow orchestrator (empty template)
1919
</workflow_context>
2020

@@ -45,11 +45,11 @@ Determines workspace state before any changes occur. Without accurate mode detec
4545
- State file contains non-empty `mode` field
4646
- `composite` flag is explicitly set (not left blank)
4747
- Every file per `bootstrap_rosetta_files` has a status entry in the inventory
48-
- If mode = plugin: `plugin_type` is set to full, lightweight, or unknown (never null)
4948
</validation_checklist>
5049

5150
<pitfalls>
52-
- Plugin mode is a context-sentence check for "RUNNING AS A PLUGIN", not filesystem detection
51+
- Plugin mode requires both "RUNNING AS A PLUGIN" and a full plugin identifier (core@rosetta or grid@rosetta) in context — not filesystem detection
52+
- Lightweight package (rosetta@rosetta) is not a plugin; it falls through to install/upgrade mode
5353
- Do not assume install if state file is fresh — files may exist on disk
5454
- Composite requires sub-repository docs, not just multiple directories
5555
</pitfalls>

instructions/r2/core/workflows/init-workspace-flow-shells.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: init-workspace-flow-shells
3-
description: "Phase 2 of init-workspace-flow, contains generate shell files for IDE/CodingAgent from KB schemas. Skipped in plugin mode."
3+
description: "Phase 2 of init-workspace-flow, contains generate shell files for IDE/CodingAgent from KB schemas. Skipped in full plugin mode."
44
tags: ["init", "workspace", "shells", "phase"]
55
baseSchema: docs/schemas/phase.md
66
---
@@ -13,7 +13,7 @@ Generates shell config files so subsequent sessions can load context and invoke
1313

1414
<workflow_context>
1515
- Phase 2 of 8 in init-workspace-flow
16-
- Input: state.mode, state.plugin_active, state.plugin_type
16+
- Input: state.mode, state.plugin_active
1717
- Output: shell configs, bootstrap rule, load-context shell
1818
- Prerequisite: Phase 1 complete, state.mode set
1919
</workflow_context>
@@ -26,10 +26,7 @@ Generates shell config files so subsequent sessions can load context and invoke
2626

2727
<check_mode step="2.1">
2828
1. Read `agents/init-workspace-flow-state.md`
29-
2. If `state.plugin_active == true`:
30-
- If `state.plugin_type == full`: mark Phase 2 skipped (full plugin ships all instructions, no shells needed), proceed to Phase 3
31-
- If `state.plugin_type == lightweight`: continue to step 2.2 (shells required for lightweight plugin to function)
32-
- If `state.plugin_type == unknown`: halt — orchestrator must resolve via HITL before Phase 2 can proceed
29+
2. If `state.plugin_active == true`: mark Phase 2 skipped (full plugin ships all instructions, no shells needed), proceed to Phase 3
3330
3. If upgrade mode: check which shells already exist
3431
</check_mode>
3532

@@ -48,9 +45,7 @@ Generates shell config files so subsequent sessions can load context and invoke
4845
</update_state>
4946

5047
<validation_checklist>
51-
- Full plugin mode: phase marked skipped, no shell files modified
52-
- Lightweight plugin mode: shell generation executed, all expected shell files exist on disk
53-
- Unknown plugin mode: phase halted, HITL question issued, no files written until resolved
48+
- Plugin mode: phase marked skipped, no shell files modified
5449
- Install mode: all expected shell files exist on disk
5550
- Upgrade mode: only missing shells created, existing preserved
5651
- Bootstrap rule file exists with ACQUIRE instruction for load-context

instructions/r2/core/workflows/init-workspace-flow.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,10 @@ Validation: State file tracks every phase with file inventory; verification conf
2626
- IF state.file_count >= 50 (set by Phase 3): pass "ACQUIRE `large-workspace-handling/SKILL.md` FROM KB" to Phase 5, 6, 8 subagents.
2727
- Before Phase 1: create `agents/init-workspace-flow-state.md`.
2828
- Conditional phases:
29-
- If you have already in context "RUNNING AS A PLUGIN":
30-
- If plugin_type = full (core@rosetta or grid@rosetta): MUST NOT EXECUTE "shells" phase 2 AND "rules" phase 4
31-
- If plugin_type = lightweight (rosetta@rosetta): MUST EXECUTE "shells" phase 2, MUST NOT EXECUTE "rules" phase 4
32-
- If plugin_type = unknown: MUST ASK USER before Phase 2 using the HITL question below, then apply the matched branch above
29+
- If you have already in context "RUNNING AS A PLUGIN" with full plugin (core@rosetta or grid@rosetta): MUST NOT EXECUTE "shells" phase 2 AND "rules" phase 4
3330
- Else if user explicitly requested to HAVE ALL RULES LOCALLY: MUST NOT EXECUTE "shells" phase 2, BUT MUST EXECUTE "rules" phase 4
3431
- Else MUST EXECUTE "shells" phase 2, BUT MUST NOT EXECUTE "rules" phase 4
35-
- HITL question when plugin_type = unknown:
36-
"Rosetta detected that you're running with a plugin, but couldn't determine which type. This affects whether shell files need to be created.
37-
- **Full plugin** (`core@rosetta` or `grid@rosetta`): ships all built-in skills, agents, and workflows — shell files are NOT needed.
38-
- **Lightweight plugin** (`rosetta@rosetta`): includes only the bootstrap rule and MCP connection — shell files ARE required to enable skills, agents, and workflows in your IDE.
39-
Which plugin did you install? If you followed the standard Rosetta installation (lightweight, recommended), the suggested answer is **lightweight plugin** (`rosetta@rosetta`) — shell files will be created."
32+
- Note: lightweight package (rosetta@rosetta) is an MCP connector, not a plugin — it follows the normal path (shells phase 2 executes)
4033
- If user says to initialize rules, subagents, agents, workflows, commands it still means to execute "shells" phase 2.
4134
- Upgrade from R1 to R2 is exactly the same process as define here, but you already have some files available, which you can reuse.
4235
- Additionally tell subagents: "If you want to use shell commands, prefer to combine individual shell commands into single **simple** shell script in `agents/TEMP` and execute it, but already available tools ALWAYS take precedence."

0 commit comments

Comments
 (0)