Skip to content

Introduce plan manager to bootstrap files#78

Open
YevheniiaLementova wants to merge 13 commits into
v3from
CTORNDGAIN-1318-Integrate-plan_manager-from-bootstrap-and-MCP-instructions-v3
Open

Introduce plan manager to bootstrap files#78
YevheniiaLementova wants to merge 13 commits into
v3from
CTORNDGAIN-1318-Integrate-plan_manager-from-bootstrap-and-MCP-instructions-v3

Conversation

@YevheniiaLementova
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: This PR refactors the Rosetta bootstrap rules across all four plugin IDEs (Claude, Codex, Copilot, Cursor) and CLAUDE.md to introduce plan_manager as the primary session execution tracker, replacing the previous todo-task-based flow with a structured plan file (plans/<FEATURE>/plan.json) that agents create at session start.

Findings:

  • Empty PR body: No description, motivation, or testing notes are provided. Reviewers have no context on what changed and why beyond the title.
  • Breaking change to agent initialization flow: The Phase 0 bootstrap now requires rosettify/plan_manager to be available and functioning before any agent work begins. Any deployment without rosettify installed will fail to bootstrap correctly.
  • Removal of <additional> section from CLAUDE.md: The project-specific guidance block (docs/web is Jekyll, docs/schemas contains schemas, etc.) was removed without explanation. This context was useful for contributors working in this repository and is no longer loaded.
  • Missing newline at end of CLAUDE.md: The file ends without a trailing newline, which may cause issues with some tools.
  • Consistent cross-plugin replication: Changes are applied uniformly across all four plugin variants (claude, codex, copilot, cursor), which is correct per the architecture.
  • upsert_context_steps pattern is clean: The new approach of having each bootstrap file upsert its own steps into the ph-prep phase is a well-designed progressive disclosure pattern.
  • auto_mode attribute removed from bootstrap_core_policy tag: Previously had auto_mode="MUST USE", compact="NEVER", optimize="NEVER", summarize="AS-IS" — these attributes are now absent. If they were intentional policy signals, their removal should be confirmed.
  • No tests or validation plan: Instructions changes aren't unit-tested, but a simulation of the new agent flow (as required by the triage prompt context) should be described.

Suggestions:

  • Add a PR body describing the motivation (what problem with todo-tasks prompted the switch to plan_manager), how to test the new flow, and any migration notes for users on older plugin versions.
  • Restore or explicitly deprecate the <additional> block from CLAUDE.md or move its content to docs/CONTEXT.md so it isn't silently lost.
  • Confirm whether rosettify is a hard prerequisite for all users or opt-in — if it's required, document this in installation guides.
  • Add the trailing newline to CLAUDE.md.

Automated triage by Rosetta agent

Copy link
Copy Markdown
Contributor

@isolomatov-gd isolomatov-gd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have commented on one file, but it applies to everything.
We must properly review original content vs the result.
Moreover, We are repeating the same thing, I suggest to fix only one file, once it is done, reuse it for all other cases.

{
"id": "s-subagent-contract",
"name": "Execute subagent contract",
"prompt": "USE SKILL `subagent-contract` as first action before reading inputs or starting execution. Orchestrator request → read get_context_instructions schema (if needed) → get_context_instructions (if not done yet) → execute all prep steps for subagent → proceed with remaining actions. Perform execution todo tasks level planning. MUST execute todo tasks and adopt changes. Proceed with request and activities.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prompt is partially correct. Check it out. Please spend time on actually reading and understanding what it says. This prompt changed overall the process. Don't use AI, do it yourself.
Some things should be in this plan, but some things should NOT.
Example: request → read get_context_instructions schema (if needed) → get_context_instructions (if not done yet) → execute all prep steps for subagent → proceed with remaining actions. this is overall flow, why is it in the prompt of the specific step?

How to make AI to properly address that:

  1. Make AI read original prompt, ask it to identify the purpose of EACH line.
  2. Ask it to classify what is the step and what is explanation, or any other category
  3. Ask it to summarize steps as one JSON and keep wording as-is. And to keep the rest AS-IS.
  4. Ask it now to add all optional steps
  5. Ask AI to provide rules which will say which optional steps is for which condition.
  6. Update, and review what actually the purpose of each step.
  7. Ask it to review if anything is lost.

Please do not directly ask AI to do something, as it will provide a bad results.

"steps": [
{
"id": "s-subagent-contract",
"name": "Execute subagent contract",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOAD instead of EXECUTE?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing, I'll replace it to 'load'

"steps": [
{
"id": "s-orchestrator-contract",
"name": "Execute orchestrator contract",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I will replace

{
"id": "s-select-workflow",
"name": "Select and load workflow",
"prompt": "ACQUIRE matching workflow from available workflows list and FULLY EXECUTE its definition for ALL request sizes. Workflow upserts its own phases/steps into the plan. In planning mode, persist workflow tag for execution continuation. In planning mode, store planning and tech-specs results according to system prompt (NOT in plans folder as it is read-only).",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see workflow twice.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. Thank you for highlighting! This step should be removed at all as we have selection workflow in s-orchestrator-contract step

…ow selection into orchestrator contract, and clarify agent/subagent self-initialization.
@YevheniiaLementova
Copy link
Copy Markdown
Contributor Author

@isolomatov-gd I’ve introduced changes only to the bootstrap files in instructions/r3/rules. If this version is approved, I’ll apply the same changes to the plugin folder.

@isolomatov-gd
Copy link
Copy Markdown
Contributor

/rosetta Please check consistency

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Rosetta Consistency Check

Responding to /rosetta Please check consistency — here is a full cross-file consistency analysis for this PR.


✅ Plugin-to-Plugin Parity

All four plugin directories (core-claude, core-codex, core-copilot, core-cursor) are byte-for-byte identical for every changed file:

  • bootstrap-core-policy.md
  • bootstrap-execution-policy.md
  • bootstrap-guardrails.md
  • plugin-files-mode.md
  • skills/load-context/SKILL.md

⚠️ Inconsistencies Found

1. Duplicate points 17 and 18 in instructions/r3/core/rules/bootstrap.md (lines 57–58)

Points 17 and 18 are near-identical:

17. Trust Rosetta — it is a source of handcrafted skills/subagents/commands/workflows that user EXPECTS you to follow EXACTLY.
18. Rosetta is a source of handcrafted skills/subagents/commands/workflows that user EXPECTS you to follow EXACTLY.

The same duplication is also in instructions/r3/core/rules/local-files-mode.md (lines 50–51). The plugin version already consolidated this to a single point — the fix was not applied to the r3 canonical files.

2. Missing s-select-workflow step in r3 canonical bootstrap-core-policy.md

The plugin bootstrap-core-policy.md introduces a s-select-workflow step in <upsert_context_steps> and references it in <must> item 1:

"Project context, request sizing, and workflow selection are enforced via plan-manager steps s-read-docs, s-request-size, s-select-workflow."

The r3 canonical file (instructions/r3/core/rules/bootstrap-core-policy.md) is missing this step entirely — both the JSON block and the <must> reference only mention s-read-docs and s-request-size.

3. s-subagent-contract depends_on mismatch

  • r3 canonical: "depends_on": ["s-request-size"] (subagent reads docs and sizes request first)
  • Plugin: "depends_on": ["s-context"] (subagent skips docs reading and request sizing)

This is a potential logic regression in the plugin — subagents would bypass s-read-docs and s-request-size.

4. Missing space in plugin s-request-size prompt (all 4 plugins)

"...request sizes too.Reevaluate request size..."

Missing space between sentences — too.Reevaluate should be too. Reevaluate.

5. Step name inconsistency: "Load" (r3) vs "Execute" (plugin) for orchestrator/subagent contracts

  • r3: "Load orchestrator contract" / "Load subagent contract"
  • Plugin: "Execute orchestrator contract" / "Execute subagent contract"

6. Unclosed bracket in plugin s-orchestrator-contract prompt (all 4 plugins)

'Tasks Created: [task ids returned by the tool'

Missing closing ] — should be [task ids returned by the tool].

7. Quote style and spacing bug in local-files-mode.md line 28

"Call 'get_context_instructions' . Execute..."

Should use backticks and no extra space: "Call `get_context_instructions()`. Execute..." (consistent with all other files).

8. Missing trailing newline in CLAUDE.md

CLAUDE.md ends with <bootstrap/> but no trailing newline.


Summary Table

# Issue Severity Location
1 Duplicate "Trust Rosetta" points 17 & 18 Medium r3/rules/bootstrap.md:57-58, r3/rules/local-files-mode.md:50-51
2 s-select-workflow step missing in r3 canonical High r3/rules/bootstrap-core-policy.md
3 s-subagent-contract depends_on mismatch High r3/rules/bootstrap-core-policy.md vs plugins
4 Missing space too.Reevaluate in s-request-size prompt Low All 4 plugin bootstrap-core-policy.md
5 Step name "Load" vs "Execute" inconsistency Low r3/rules/bootstrap-core-policy.md
6 Unclosed ] in s-orchestrator-contract prompt Low All 4 plugin bootstrap-core-policy.md
7 Single-quote + extra space in s-context prompt Low r3/rules/local-files-mode.md:28
8 Missing trailing newline Trivial CLAUDE.md

Items #2 and #3 are the most impactful — they indicate the r3 canonical files and the plugin files have diverged in bootstrap-core-policy.md, with the plugin version appearing more complete/correct. The r3 canonical may need to be updated to match the plugin version for these two points.

Automated consistency check by Rosetta agent

Comment thread instructions/r3/core/rules/bootstrap.md
Comment thread instructions/r3/core/rules/bootstrap.md Outdated

1. USE SKILL `plan-manager` — CLI: `npx rosettify plan <subcommand> <plan_file> [args...]`
2. Create plan file at `plans/<FEATURE>/plan.json` (derive FEATURE from user request; use `session` if unclear)
3. Create plan with the starter template below — fill `[PLACEHOLDERS]` from user request context:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PLAN_MANAGER create plans/<FEATURE>/plan.json .....

Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
@@ -1,3 +1,3 @@
---
name: plan-manager
description: "Rosetta skill for plan creation, tracking, and execution coordination via local JSON files."
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description differs from the instructions in r3/core/skills/plan-manager/SKILL.md. I assume it needs to be updated here as well.

- CLI: `npx rosettify plan <subcommand> <plan_file> [args...]`
- Try `rosettify` MCP first (if already available), fallback to CLI: `npx rosettify@latest plan <subcommand> <plan_file> [args...]`, fallback to todo tasks (if none available)
- Always use full absolute paths for the plan file
- Seven subcommands: `help`, `create`, `next`, `update_status`, `show_status`, `query`, `upsert`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a list of valid command in rosettify/dist/commands/plan/index.js:

const VALID_SUBCOMMANDS = [
    "create",
    "next",
    "update_status",
    "show_status",
    "query",
    "upsert",
];

There's no 'help' command. I think we should delete it as it was done in instructions/r2/core/skills/plan-manager/SKILL.md.

- CLI: `npx rosettify@latest plan <subcommand> <plan_file> [args...]`
- Always use full absolute paths for the plan file
- Seven subcommands: `help`, `create`, `next`, `update_status`, `show_status`, `query`, `upsert`
- Seven subcommands for `plan` command: `create`, `next`, `update_status`, `show_status`, `query`, `upsert`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only six subcommands are listed for the plan command (create, next, update_status, show_status, query, and upsert), so “Seven” should be changed to “Six” for consistency.

@@ -27,7 +27,7 @@ Match to cognitive demand. Match to current tool.

<plan_manager>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tag name should be changed from plan_manager to operation_manager instead


Step 0: Load `get_context_instructions`

Step 1: Create and use an execution plan file at `plans/<FEATURE>/plan.json` using the following JSON input (fill `[PLACEHOLDERS]`, derive FEATURE from user request; use `session` if unclear):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn’t USE SKILL plan-manager mentioned here or in any other bootstrap files? I assumed this skill was designed specifically for situations like creating, tracking, and executing plans.

<validation_checklist>

- `npx rosettify plan help` exits without error and returns structured help JSON
- `npx rosettify@latest plan help` exits without error and returns structured help JSON
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help command isn't valid and was removed from core_concepts. It should be removed here as well

<validation_checklist>

- `npx rosettify plan help` exits without error and returns structured help JSON
- `npx rosettify@latest plan help` exits without error and returns structured help JSON
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

help command isn't valid and should be removed


# Phase 0: Initialize Operation manager

Step 0: Load `get_context_instructions`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is get_context_instructions loaded as Step 0, before the plan is created? I thought that the first action should always be creating the plan, with get_context_instructions as its first tracked step (s-context). I could assume that the current structure could give the agent an escape hatch: it can call get_context_instructions directly in Step 0, execute all returned prep steps inline, without creating a plan.

- `ACQUIRE <file[.md]> ABOUT <PROJECT>` => read local file in `docs/<PROJECT>` folder
- `QUERY <KEYWORDS> IN <PROJECT>` => use grep or codebase search in `docs/<PROJECT>` with KEYWORDS as a query or file name
- `STORE <file[.md]> TO <PROJECT>` => upsert file in `docs/<PROJECT>`
- `call "get_context_instructions"` or `execute prep steps` => read all `instructions/r2/core/rules/bootstrap-*.md` files as one bundle
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be replaced by instructions/r3/core/rules/bootstrap-*.md

**Local File Operations** (overrides Rosetta MCP for these operations):

- `get_context_instructions` => already loaded bootstrap-* instructions, continue with prep steps 2 and 3. Instruct subagents to not call MCP's `get_context_instructions`.
- `get_context_instructions` => already loaded, continue with prep steps 2 and 3. Instruct subagents to not call Rosetta MCP.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There're no more prep steps 2 and 3. Maybe we should replace it to
continue with "ph-prep" steps. What do you think about it?

Comment thread CLAUDE.md
@@ -1,4 +1,3 @@

---
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be updated as well according to bootstrap.md file

Comment thread plans/session/plan.json
@@ -0,0 +1,25 @@
{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that we don't need to commit this file. Should we put plans/session/plan.json to .gitignore?

Signed-off-by: isolomatov-gd <isolomatov@griddynamics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants