Skip to content

feat: populate new flow arrange-workspace-flow - #217

Merged
isolomatov-gd merged 32 commits into
mainfrom
feature/add-workspace-setup
Aug 18, 2026
Merged

feat: populate new flow arrange-workspace-flow#217
isolomatov-gd merged 32 commits into
mainfrom
feature/add-workspace-setup

Conversation

@YevheniiaLementova

@YevheniiaLementova YevheniiaLementova commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Problem

Workspace setup today is documented in CONFIGURATION.md: a manual checklist the user has to read end-to-end and execute by hand — capture business context, capture technical context, add reference source code, pick a workspace layout, set up modernization docs, configure MCPs/CLIs. Nothing enforces it happens, nothing tracks what's done, and nothing adapts the interview to what's already in the repo.

Solution

Adds arrange-workspace-flow, a new Rosetta workflow that turns that checklist into an AI-guided, HITL, phase-by-phase flow. Instead of the user reading CONFIGURATION.md and self-driving each step, the agent walks them through it interactively, loads one phase at a time , asks only gap-only questions (skips what's already covered), routes unconfirmed inferences to docs/ASSUMPTIONS.md, and persists progress in arrange-state.md so nothing is silently skipped.

All six phases are executed sequentially by a single agent — no subagent dispatch. Each phase is its own file (arrange-workspace-flow-*.md), loaded and executed only when reached, keeping context small and enforcement structural rather than just instructional.

Phases added

# Phase Applies Output
1 Choose Workspace Layout All Single Repo vs. Composite (submodules/gitignore) layout chosen + set up
2 Reference Source Code Single Repo Workspace only refsrc/, refsrc/INDEX.md, .gitignore
3 Business Context All docs/CONTEXT.md; unconfirmed inferences → docs/ASSUMPTIONS.md
4 Technical Context All docs/ARCHITECTURE.md; unconfirmed inferences → docs/ASSUMPTIONS.md
5 Modernization (conditional) Modernization goal only Extended docs/CONTEXT.md/docs/ARCHITECTURE.md/docs/PATTERNS/
6 Configure Ecosystem All MCP/CLI/plugin guidance shown verbatim; install guided only on user request

Allium recommendation

Phase 6 (Configure Ecosystem) now recommends Allium in its "Recommended Plugins" list — an MIT-licensed skill for spec-first, behavior-driven development. It's shown as guidance only, same as every other entry in that list.

Documentation

OVERVIEW.md, FAQ.md, USAGE_GUIDE.md, docs/CODEMAP.md, docs/definitions/workflows.md and their docs/web/ mirrors (docs/web/docs/overview.md, docs/web/docs/faq.md, docs/web/docs/usage-guide.md): arrange-workspace-flow among request types, counts corrected to 17 workflow types (from 13).

New docs/web/docs/arrange-workspace-flow.md — full workflow page (TL;DR, phase table, two Mermaid diagrams, per-phase breakdown, source links).

llms-full.txt/arrange-workspace-flow entry added in §9. No skill-catalog entry needed; the flow reuses existing skills rather than introducing a new one.

Verification

bash src/run-tests.sh exit 0 — full suite green (rosettify 1087, rosettify-plugins 572, rosettify-prompts 96, curiocity 429, hooks 1142, plus the Python suites: rosetta-mcp-server 327, rosetta-cli 35).

Plugins regenerated with npx -y rosettify-plugins@latest --release r3 --deterministic-hooks false; the only new propagation was arrange-workspace-flow (1 main + 6 phase files), landing across all 7 plugin targets (core-claude, core-cursor, core-cursor-standalone, core-copilot, core-copilot-standalone, core-codex, core-antigravity) with corresponding INDEX.md/hooks.json refreshes and no unrelated drift.

Counts checked against disk: 7 arrange-workspace-flow* source files (1 main + 6 phases) in instructions/r3/core/workflows/, propagated 7/7 plugin targets.

Type validation (src/validate-types.sh) passed.

Closes #137 and Closes #140

@github-actions github-actions Bot added enhancement New feature or request instructions skills, subagents, rules, workflows, commands for AI agents needs more work labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: Adds arrangement-workspace-flow, a new 6-phase HITL workflow (layout choice, refsrc onboarding, business/technical context interviews, optional modernization, ecosystem setup) that turns the manual CONFIGURATION.md checklist into an AI-guided, gap-only interview with state tracked in arrangement-state.md.

Findings:

  • arrangement-workspace-flow-modernization.md writes docs/PATTERNS/INDEX.md/CHANGES.md (patterns_contract), which is the same deliverable init-workspace-flow phase 5 (init-workspace-flow-patterns.md) already owns — the new workflow's own pitfalls block claims it doesn't touch patterns/discovery, which this contradicts.
  • *_interview_style (6 lines) is duplicated verbatim across -business-context.md, -technical-context.md, and -modernization.md — a DRY violation better factored into the questioning/hitl skill and referenced once.
  • The next_steps block in arrangement-workspace-flow.md is copy-pasted from init-workspace-flow.md, including a "Modernization" next-step that tells the user to document modernization goals in CONTEXT.md — but phase 5 of this same workflow already does that when applicable, making the next-step guidance stale/redundant for this flow.
  • configure-ecosystem.md recommends the third-party "Allium" plugin for install without the same IP/license caveat given to GitNexus/Graphify a few lines above ("Third-party tool will have access to IP. Review license and policy with your manager.") — inconsistent risk disclosure for an unvetted external tool.
  • must-be-subagent (reserved per docs/schemas/phase.md for fresh-eyes review/validation phases) is applied to all 6 phases here, including plain guide/setup phases — dilutes the attribute's intended meaning.
  • State file is named arrangement-state.md, diverging from the docs/schemas/workflow.md convention ([workflow-name]-flow-state.md) and from the sibling init-workspace-flow's own agents/init-workspace-flow-state.md pattern.

Caveats:

  • Real functional overlap exists with init-workspace-flow beyond what the PR's pitfalls section acknowledges (patterns/modernization docs), not just the layout/refsrc/context/ecosystem scope it describes.
  • arrangement-workspace-flow-choose-workspace-layout.md is the largest phase file (167 lines), driven by three full ASCII layout trees shown verbatim every run — works against the schema's "keep phase files short" guidance.

Suggestions:

  • Fold the repeated interview-style block into a skill reference instead of copy-pasting it three times.
  • Reconcile the patterns/modernization boundary with init-workspace-flow phase 5, and correct or narrow the pitfalls disclaimer accordingly.
  • Add the same third-party IP/license caveat to the Allium recommendation as GitNexus/Graphify get.
  • Trim next_steps to this workflow's actual scope instead of reusing init-workspace-flow's block verbatim.

Questions:

  • Should modernization pattern-mapping stay in arrangement-workspace-flow at all, or should Phase 5 hand off to init-workspace-flow phase 5/modernization-flow for docs/PATTERNS/ instead of writing it directly?

Automated triage by Rosetta agent

@YevheniiaLementova YevheniiaLementova changed the title Feat: populate new flow arrangement-workspace-flow feat: populate new flow arrangement-workspace-flow Aug 7, 2026
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrangement-workspace-flow-business-context.md Outdated
@isolomatov-gd isolomatov-gd changed the title feat: populate new flow arrangement-workspace-flow feat: populate new flow arrange-workspace-flow Aug 12, 2026

@isolomatov-gd isolomatov-gd left a comment

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.

Comments provided

Comment thread instructions/r3/core/workflows/arrange-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow-business-context.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow-business-context.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow-business-context.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow-reference-source-code.md Outdated
Comment thread instructions/r3/core/workflows/arrange-workspace-flow-technical-context.md Outdated
@isolomatov-gd

Copy link
Copy Markdown
Contributor

Plus merge latest main to your PR and update its new docs/user-guide as well

@github-actions

Copy link
Copy Markdown
Contributor

📋 Prompt Quality Validation Report

❌ Validation Failed

The full markdown report and raw JSON output are available in the workflow artifacts for 5 days.


Files With Issues

  • instructions/r3/core/workflows/arrange-workspace-flow.md: 5 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-choose-workspace-layout.md: 2 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-reference-source-code.md: 2 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-business-context.md: 3 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-technical-context.md: 1 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-modernization.md: 4 issue(s)
  • instructions/r3/core/workflows/arrange-workspace-flow-configure-ecosystem.md: 2 issue(s)

📄 instructions/r3/core/workflows/arrange-workspace-flow.md

⚠️ Issues Found

Severity Gate Details
High Conflict Resolution Problem:
Phase 5 is gated applies="modernization goal" (line 52) and line 54 says to skip when the goal is not modernization, but nothing says where that goal comes from. Phases 1 and 2 both gate on a value explicitly recorded in the state file.
Reason:
An inferred flag decides whether a whole phase runs. On a re-run or after compaction the inference can flip, and phase 5 silently does nothing on a real modernization project.
Solution:
Add a step to phase 3 that records in the state file whether the project goal is modernization as a user-confirmed yes/no, and change line 54 to read that recorded field instead of inferring.
High Failure Handling Problem:
Phases 3-5 read docs/CONTEXT.md, docs/ARCHITECTURE.md, and docs/PATTERNS/INDEX.md, which are produced by init-workspace-flow. The only mention that init must run first is a pitfall on line 106. No phase has a branch for these files being missing.
Reason:
On a workspace where init never ran, load-project-context fires its own 'strongly suggest init-workspace-flow' message mid-run. With no arbitration line, the agent either derails into a flow the user did not ask for or ignores its own bootstrap skill.
Solution:
Add a prerequisite item to phase 0: if CONTEXT.md, ARCHITECTURE.md, or PATTERNS/ are absent, say that init-workspace-flow.md normally runs first, ask the user to confirm continuing anyway, and record the answer in the state file.
High Precision & Explicitness Problem:
Line 20 says state goes to agents/TEMP/<FEATURE>/arrange-state.md, but this flow is workspace-wide and has no feature, so <FEATURE> is never bound. All six phases then refer only to the bare name arrange-state.md with no path. The schema in docs/schemas/workflow.md also expects the name arrange-workspace-flow-state.md.
Reason:
The agent has to invent the folder name. If the session compacts, the phase files carry no path at all and the agent writes a second, empty state file. The <completion> gate on line 111 then reads a ledger that does not reflect the work done.
Solution:
Replace <FEATURE> on line 20 with a fixed literal path and use the schema name, for example agents/TEMP/arrange-workspace/arrange-workspace-flow-state.md. Add one prerequisite line telling the agent to create the file at phase 0 with one row per phase (status, decision, skip reason), and repeat the full path once in each phase file.
Medium Bloat Control Problem:
The <next_steps> block on lines 67-103 is copied byte for byte from init-workspace-flow.md lines 121-157, roughly 37 duplicated lines. It carries that file's broken markdown link on line 69, (USAGE GUIDE)[https://...], with the brackets reversed, and it re-shows the full modernization example block even to a user who just finished the modernization interview.
Reason:
The broken link is the flow's main call to action and renders as plain text for the user. Duplicated blocks in two files drift apart over time, and every line is resent on each model call.
Solution:
Fix the link on line 69 to [USAGE GUIDE](https://griddynamics.github.io/rosetta/docs/usage-guide/), trim the copied example sections to the ones relevant to this flow, and state the restart reason that actually applies here (CONTEXT.md and ARCHITECTURE.md changed, so the session is holding stale context).
Medium Rosetta Problem:
Line 18 reads USE SKILL \\load-project-context\, \\hitl\`` and omits orchestration, which docs/schemas/workflow.md line 38 requires for all but trivial flows. Sibling flows research-flow.md, security-flow.md, and modernization-flow.md all include it. The line also drops the mandatory `MUST` wording.
Reason:
This is a six-phase flow that writes several shared documents. Without the orchestration skill the agent loses the guidance it needs to manage a long multi-phase run.
Solution:
Add `orchestration` to the phase 0 skill list and restore the `MUST USE SKILL` wording used by the sibling flows.

📄 instructions/r3/core/workflows/arrange-workspace-flow-choose-workspace-layout.md

⚠️ Issues Found

Severity Gate Details
Very High Workflow Completeness Problem:
Options 2 and 3 relocate the workspace: lines 91 and 130 say 'Create a new empty git repository to serve as the composite workspace envelope' and line 93 says 'Initialize Rosetta in the envelope workspace'. Nothing in this phase or any later phase re-anchors the working root, and phases 3-6 keep writing to plain relative paths such as docs/CONTEXT.md.
Reason:
Without it the agent keeps running inside the original sub-repository and writes every context document to the wrong repo, while the composite index promised on line 64 is never created anywhere.
Solution:
Add a step to <apply_setup step="1.3">: when Option 2 or 3 is chosen and the envelope does not yet exist, record the layout in the state file, stop the flow, and tell the user to re-run it from the envelope repository root.
Very High Conflict Resolution Problem:
Line 145 orders the agent to guide the chosen option's setup actions from layout_guidance 'exactly'. Option 1's setup actions on line 55 say 'Clone any read-only reference codebases into refsrc/ as subfolders'. Line 146 then forbids exactly that: 'do not clone into refsrc/ here'. The layout_guidance block is marked compact="NEVER" summarize="AS-IS" (line 28), so the conflicting sentence cannot be reworded at runtime.
Reason:
This fires on Option 1, the option the text itself calls the recommended starting point, so it hits the most common path. The agent is told to follow one line exactly and to ignore it one line later, and the pitfall on line 159 names the trap without resolving it.
Solution:
Remove the refsrc/ cloning bullet from Option 1's setup actions on line 55, since line 146 and the Reference Source Code phase already own that step. Keep line 146 as the single source of truth.

📄 instructions/r3/core/workflows/arrange-workspace-flow-reference-source-code.md

⚠️ Issues Found

Severity Gate Details
High Dependency Management Problem:
The .gitignore exceptions agents/TEMP/, refsrc/, and !refsrc/INDEX.md are set up only here, on lines 30-35, inside a phase gated applies="Single Repo Workspace (Option 1)". The modernization phase tells the agent to clone legacy code into refsrc/<name> with no layout condition at all.
Reason:
On a composite workspace that also runs modernization, the agent clones a whole legacy codebase into a refsrc/ folder that was never excluded from git, so the legacy tree and the agents/TEMP/ state file get staged and committed.
Solution:
Move the three-line .gitignore block out of step 2.2 into the root flow's phase 0 as an applies="ALL" item, so the exclusions are in place regardless of which layout the user picked.
Medium Precision & Explicitness Problem:
Line 42 says 'Ask if there is reference code to add; if not, record no-op and stop.' The word 'stop' is not scoped to the phase.
Reason:
'No reference code' is the most common answer. A plausible reading ends the entire flow there, silently dropping phases 3-6, which carry most of the flow's value.
Solution:
Change 'stop' to 'end this phase', matching how the root flow phrases skips ('skip, record skip reason, proceed to phase 3').

📄 instructions/r3/core/workflows/arrange-workspace-flow-business-context.md

⚠️ Issues Found

Severity Gate Details
Very High Conflict Resolution Problem:
Lines 36-66 embed a 31-line '# Universal Starter Definition of Done' checklist inside <starter_topics> with no instruction attached to it. Its content is mostly technical: 'Build, lint, type, and static checks pass', 'changed code coverage >=85%', 'migrations tested, safe, and reversible', 'CI/CD, and deployment assets updated'. The <context_contract> in the same file (lines 70-72) says CONTEXT.md must have 'No technical details' and a 100-line limit, and the pitfall on line 82 warns against 'Mixing business context with technical architecture'.
Reason:
The block has no governing verb and no compact="NEVER" marker, unlike the genuine verbatim blocks elsewhere in this flow, so the agent cannot tell whether to show it, ask about it, or paste it. The most likely reading is to paste it into CONTEXT.md, which breaks the file's own contract and burns a third of the 100-line budget on content that belongs in ARCHITECTURE.md. CONTEXT.md is read in full at every session start, so the cost is permanent.
Solution:
Remove lines 36-66 from <starter_topics>; the topic bullet 'Accepted SDLC, DoD, and processes related to the project' on line 33 already covers the interview need. If a starter checklist is wanted, give it its own step writing to its own file, outside the business-context contract.
High Output Contract Problem:
Step 2 on line 19 says to record confirmed answers to docs/CONTEXT.md, and <context_contract> describes only the shape of the file. Neither says whether to create, append, or replace, and neither protects existing human-written content. The validation checklist on line 76 only checks the file 'exists, non-empty, <=100 lines'.
Reason:
This flow runs on workspaces where CONTEXT.md already exists and may be human-curated. Without the guard, and with a 100-line cap in force, the agent can rewrite or truncate content it did not author.
Solution:
Add 'extend, never replace' and a preserve-human-content clause to <context_contract>, matching the wording already used in the modernization phase's doc_contract.
Medium Single Responsibility Problem:
The phase is scoped to interviewing for business context, but the embedded Definition of Done checklist on lines 36-66 introduces a second, unrelated job (defining project quality gates) inside the same section.
Reason:
Mixing two jobs in one section makes the agent's task ambiguous and pushes technical content into a phase explicitly scoped to non-technical facts.
Solution:
Remove the checklist as described above, keeping this phase to the single job named in its <description_and_purpose>.

📄 instructions/r3/core/workflows/arrange-workspace-flow-technical-context.md

⚠️ Issues Found

Severity Gate Details
High Output Contract Problem:
Step 2 on line 19 records confirmed answers to docs/ARCHITECTURE.md and <architecture_contract> (lines 39-42) defines only the shape of the file. Neither states create-versus-update behavior nor protects existing human-written content, while the sibling modernization phase does say 'extend, never replace'.
Reason:
ARCHITECTURE.md usually already exists when this flow runs, and it is read in full at every session start. Combined with the 100-line cap, the missing guard lets the agent overwrite or truncate content a human wrote.
Solution:
Add 'extend, never replace' and a preserve-human-content clause to <architecture_contract>, matching the modernization phase's doc_contract.

📄 instructions/r3/core/workflows/arrange-workspace-flow-modernization.md

⚠️ Issues Found

Severity Gate Details
High Input Contract Problem:
This phase mandates refsrc/<name> with no layout condition, but the phase that establishes refsrc/ conventions is gated to Option 1 only, and the Reference Source Code phase's pitfall explicitly rules composite siblings out of refsrc/. A composite workspace running modernization is told to populate a folder this flow never sets up for that layout.
Reason:
Composite plus modernization is a realistic combination, and today the two phases give contradictory guidance about whether refsrc/ applies to it.
Solution:
State in <patterns_contract> or step 3 where reference code lives for composite layouts, or require the refsrc/ gitignore and INDEX conventions to be confirmed before cloning when the layout is Option 2 or 3.
High Workflow Completeness Problem:
Step 3 on line 20 guides cloning the old codebase into refsrc/<name> but never requires a matching refsrc/INDEX.md entry. The validation checklist on line 58 only checks that the location was 'captured' and the clone 'recommended'. The Reference Source Code phase does enforce the INDEX entry for every other reference codebase.
Reason:
load-project-context greps refsrc/INDEX.md to discover reference code. The legacy codebase is the single most important reference in a modernization project, and it is the one that bypasses the indexing path, so it stays invisible to every later session.
Solution:
Extend step 3 to add the refsrc/INDEX.md entry for the cloned legacy code, and add that entry to <validation_checklist>.
High Failure Handling Problem:
Line 41 asks for the old-to-new equivalent 'for every pattern in docs/PATTERNS/INDEX.md' and line 51 says to 'Write docs/PATTERNS/INDEX.md — all patterns with one-line descriptions'. That file is produced by init-workspace-flow-patterns.md, a different flow. There is no branch for it being absent, and the write is unconditional and whole-file, while the producing phase carries an explicit 'PRESERVE-HUMAN: never overwrite human-curated content' guard that was not copied across.
Reason:
With no absence branch the agent either interviews the user to hand-enumerate every legacy pattern or invents an INDEX.md to satisfy the write instruction. Because the write is unconditional and whole-file, it can also destroy a real, human-curated index. That file feeds the grep roster that load-project-context runs at every session start.
Solution:
Add to <patterns_contract>: if docs/PATTERNS/INDEX.md is missing, skip the patterns topic, record the skip reason, and recommend running init-workspace-flow.md first. Also add the create-or-update and preserve-human clauses used by the producing phase.
Medium Success Criteria Problem:
<patterns_contract> requires writing docs/PATTERNS/INDEX.md and docs/PATTERNS/CHANGES.md, but <validation_checklist> on lines 57-59 checks only CONTEXT.md, ARCHITECTURE.md, the old-code location, and the state file. Neither PATTERNS output is verified.
Reason:
Outputs that no checklist covers are the ones agents quietly skip, and the patterns mapping is the main technical deliverable of this phase.
Solution:
Add checkpoints to <validation_checklist> confirming that docs/PATTERNS/INDEX.md and docs/PATTERNS/CHANGES.md reflect the old-to-new mapping captured in this phase.

📄 instructions/r3/core/workflows/arrange-workspace-flow-configure-ecosystem.md

⚠️ Issues Found

Severity Gate Details
High Conflict Resolution Problem:
Line 78 says 'Add a note to docs/CONTEXT.md on what got installed', and the checklist on line 85 repeats it. MCPs, CLIs, LSPs, and plugins are technical tooling. The business-context phase's contract says CONTEXT.md holds 'No technical details', and the technical-context phase names ARCHITECTURE.md as the technical home, with a starter topic covering 'Any AI agentic harnesses to use'.
Reason:
Three files in the same flow disagree about which document holds tooling facts. CONTEXT.md is read in full at every session start and was capped at 100 lines two phases earlier, with no re-check after this phase appends to it.
Solution:
Change line 78 and the matching checklist item on line 85 to write the installed-tooling note to docs/ARCHITECTURE.md instead of docs/CONTEXT.md.
Medium Success Criteria Problem:
The first checklist item on line 83 is 'Guidance shown to user', which restates the step rather than giving observable proof. The sibling layout phase uses a stronger form: 'Layout options shown to the user verbatim, unabridged.'
Reason:
A checkpoint that just repeats the instruction cannot fail, so it gives no real protection against the agent summarizing a block marked compact="NEVER".
Solution:
Reword the item to something checkable, such as confirming the ecosystem_guidance block was shown verbatim and unabridged.

@isolomatov-gd
isolomatov-gd merged commit 4c463d0 into main Aug 18, 2026
4 of 5 checks passed
@isolomatov-gd
isolomatov-gd deleted the feature/add-workspace-setup branch August 18, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request instructions skills, subagents, rules, workflows, commands for AI agents needs more work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a step during workspace setup to recommend Allium Workspace setup

2 participants