Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions agents/IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ For detailed change history, use git history and PRs instead of expanding this f
- A dedicated `version` command was added so package version inspection does not require config loading or auth.
- Package metadata and publish flows were repaired to keep CI/CD and PyPI publishing functional.

### Instructions and Skills

- Added `plan-manager` skill under `instructions/r2/core/skills/plan-manager/` — primary plan manager for coding agents via local JSON files.
- Skill assets: `plan_manager.js` (CLI, no npm deps), `pm-schema.md` (data structure reference), `plan_manager.test.js` (60 unit tests).
- Key behaviors: resume-safe `next` command returns `in_progress` steps with `resume: true` before `open` steps; plans stored at `plans/<name>/plan.json`; self-describing `help` command.
- Converted `adhoc-flow-with-plan-manager` workflow to `USE SKILL plan-manager`; data structure externalized to `pm-schema.md`.
- Plugins (`core-claude`, `core-cursor`) are auto-synced from core by `scripts/pre_commit.py`.

### Workflows and Automation

- GitHub Actions were updated to remove most deprecated Node 20-era dependencies and align with newer action runtimes where upstream allowed it.
Expand Down
13 changes: 11 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,15 @@ cp .env.dev .env
uvx rosetta-cli@latest publish instructions
```

### Plugins

Instructions to `plugins` folder content must be copied with `venv/bin/python scripts/pre_commit.py` as it not only copies, but also adapts.
Pre-commit hook is also created, but we must not rely on it.
Do not directly modify instructions in `plugins` folder instead edit original files in `instructions` and use script to copy/adapt.

Claude Code Plugin: only Anthropic `sonnet`/`opus`/`haiku` models are supported.
Codex Plugin: only OpenAI `gpt-*` models are supported.

### Reference Sources (readonly, packages currently used)

`refsrc/fastmcp-3.1.1` contains source code of FastMCP v3.
Expand Down Expand Up @@ -472,8 +481,8 @@ Website: builds the Jekyll website from `docs/web/`, deploys to GitHub Pages.
| Plugin | Contents, Footprint |
|---|---|
| `core@rosetta` | Full OSS foundation |
| `grid@rosetta` | Enterprise extensions |
| `rosetta@rosetta` | Bootstrap rule + MCP definition only, (fetches via MCP) |
| `grid@rosetta-enterprise` | Enterprise extensions |
| `rosetta@rosetta` | Bootstrap rule + MCP only |

Plugins point to source folders in the instructions repository. No local file duplication.

Expand Down
1 change: 1 addition & 0 deletions docs/definitions/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- research
- context-engineering
- planning
- plan-manager
- reasoning
- questioning
- tech-specs
Expand Down
2 changes: 1 addition & 1 deletion instructions/r2/core/rules/bootstrap-core-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ baseSchema: docs/schemas/rule.md

### Input Contract

4. Subagent prompt MUST start with: assumed role/specialization, stated [lightweight|full] subagent, plan_name, phase&task id, SMART tasks, `MUST USE SKILL [required]`, and `RECOMMEND USE SKILL [recommended]`.
4. Subagent prompt MUST start with: assumed role/specialization, stated [lightweight|full] subagent, full path to plan.json, phase&task id, SMART tasks, `MUST USE SKILL [required]`, and `RECOMMEND USE SKILL [recommended]`.
5. Provide specific task, full context, and references. Subagents know nothing except shared bootstrap and prep steps and this contract, always provide original user request/intent throughout all steps.
6. Define explicit scope, expected outputs, and clear expectations. Forbid out-of-scope work.
7. Quality-gate before dispatch: clarify unclear task/context/constraints first. Never dispatch ambiguous instructions.
Expand Down
3 changes: 2 additions & 1 deletion instructions/r2/core/rules/bootstrap-rosetta-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ It must be possible to grep by headers and receive useful information and ToC.
12. `agents/MEMORY.md`. Very brief root causes of errors and mistakes, brief actions tried and actions succeeded, both positive and negative. Create if missing.
13. `plans/<FEATURE>/<FEATURE>-PLAN.md`. Execution plan.
14. `plans/<FEATURE>/<FEATURE>-SPECS.md`. Tech specs.
15. `plans/<FEATURE>/*`. Feature implementation supporting files.
15. `plans/<FEATURE>/plan.json`. Plan manager execution tracking file.
16. `plans/<FEATURE>/*`. Feature implementation supporting files.
16. `refsrc/*`. Source code used only for knowledge! Exclude from SCM with single exception `refsrc/INDEX.md` to be committed.
17. `agents/TEMP/<FEATURE>`. Temporary folder used during feature implementation. Exclude from SCM.

Expand Down
92 changes: 92 additions & 0 deletions instructions/r2/core/skills/plan-manager/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
name: plan-manager
description: "Rosetta skill for plan creation, tracking, and execution coordination via local JSON files."
dependencies: node.js
disable-model-invocation: false
user-invocable: true
argument-hint: feature-name plan-name
allowed-tools: Bash(node:*)
model: claude-sonnet-4-6, gpt-5.4-medium, gemini-3.1-pro-preview
tags:
- plan-manager
- plan-manager-create
- plan-manager-use
baseSchema: docs/schemas/skill.md
---

<plan-manager>

<role>

Senior execution planner and tracker for plan-driven workflows.

</role>

<when_to_use_skill>

Primary plan manager for orchestrators and subagents. Creates, tracks, and executes plans as local JSON files.

</when_to_use_skill>

<core_concepts>

- Rosetta prep steps completed
- Plan file lives in FEATURE PLAN folder: `<feature_plan_folder_full_path>/plan.json`
- Helper CLI: `node <plan_manager_full_path>/plan_manager.js <cmd> <feature_plan_folder_full_path>/plan.json [args...]` — no npm install needed
- Always use full absolute paths for both `plan_manager.js` and the plan file
- Seven commands: `help`, `create`, `next`, `update_status`, `show_status`, `query`, `upsert`
- Resume behavior: `next` returns `in_progress` steps first with `resume: true`, then `open` steps with `resume: false`
- Status propagation: bottom-up (steps → phases → plan); plan root is always derived
- ACQUIRE `plan-manager/assets/pm-schema.md` FROM KB for data structure reference

</core_concepts>

<process>

**Setup (every session):**

- If context already contains `RUNNING AS A PLUGIN`: `plan_manager.js` is already available at `<skill_base_dir>/assets/plan_manager.js` — execute directly, no copy needed
- Otherwise: ACQUIRE `plan-manager/assets/plan_manager.js` FROM KB → write to AGENTS TEMP folder

**Orchestrator flow:**

1. Create plan: `node <plan_manager_full_path>/plan_manager.js create <feature_plan_folder_full_path>/plan.json <json>` — see pm-schema.md for JSON structure
2. Upsert phases and steps: `node <plan_manager_full_path>/plan_manager.js upsert <feature_plan_folder_full_path>/plan.json entire_plan <json>`
3. Delegate steps to subagents — pass plan file path and step IDs
4. Loop: call `next` until `plan_status: complete` and `count: 0`

**Subagent flow:**

1. Get next steps: `node <plan_manager_full_path>/plan_manager.js next <feature_plan_folder_full_path>/plan.json [limit]`
2. Check `resume` flag — if `true`, continue interrupted work; if `false`, start fresh
3. Execute step
4. Update: `node <plan_manager_full_path>/plan_manager.js update_status <feature_plan_folder_full_path>/plan.json <step-id> complete`
5. Repeat from step 1

</process>

<validation_checklist>

- `node <plan_manager_full_path>/plan_manager.js help` exits without error
- `show_status` output: plan root status is derived (never manually set)
- `next` output: `in_progress` steps appear before `open` steps when both exist
- `show_status` phase status matches aggregate of its steps after `update_status`

</validation_checklist>

<pitfalls>

- Not checking `resume` flag on `next` results — causes duplicate work on resumed sessions
- Forgetting `update_status` after step completion — plan remains stale
- Plan root status cannot be set directly — it is always derived from phases

</pitfalls>

<resources>

- Asset: ACQUIRE `plan-manager/assets/pm-schema.md` FROM KB — plan JSON structure
- Flow: USE FLOW `adhoc-flow-with-plan-manager`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agree with a comment from Rosetta Triage Reviewer. The file with workflow flow adhoc-flow-with-plan-manager was deleted


</resources>

</plan-manager>
Loading