Skip to content

fix(instructions): repair four R3 contract defects across all plugin targets (ai-generated, includes-ai-code) - #368

Open
ArteomBalanuta wants to merge 4 commits into
griddynamics:mainfrom
ArteomBalanuta:fix/issue-r3-contracts-batch
Open

ArteomBalanuta wants to merge 4 commits into
griddynamics:mainfrom
ArteomBalanuta:fix/issue-r3-contracts-batch

Conversation

@ArteomBalanuta

@ArteomBalanuta ArteomBalanuta commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Jira: N/A (GitHub issues #357, #355, #354, #356)

Closes #357.
Closes #355.
Closes #354.
Closes #356.

Four confirmed defects in the canonical R3 instruction sources, all shipping inside every generated plugin distribution. Each was verified against current source before repair:

  • [ROSETTA] Align prompt-authoring workflow handoff identifiers #357 — the prompt-authoring flow's state path omitted .md (line 29) while every phase updates the .md form, and step 7 consumed Candidate Prompt Set although step 5 produces Prompt Set. Both producer/consumer identifiers normalized; the seven-step handoff now simulates end to end.
  • [ROSETTA] Make research source tooling capability-aware #355 — the research skill mandated DeepWiki+Context7 unconditionally; plugin-only targets don't guarantee either integration. Replaced with a capability-aware source contract (prefer when available; explicit project/vendor/web fallbacks; name the source used). Research README aligned.
  • [ROSETTA] Remove nested subagent dispatch from research #354 — the research skill, research-flow phase 3, and the research README all required nested subagent dispatch, conflicting with the actor-boundary contract (subagents cannot call subagents; workflows own dispatch). The researcher now executes the approved prompt directly; parallel-slice needs are proposed back to the top-level orchestrator with scope/dependencies/evidence/write-collision fields.
  • [ROSETTA] Repair modernization reduced-path prerequisites #356 — the small in-place modernization route selects only Phases 2 and 6, but those phases require 1 and 5. Defined as an explicit, auditable exception: Phase 2 without Phase 1 only after recording that no reference-library analysis is needed; Phase 6 without Phase 5 only under a bounded single-project final-review note, recorded in the state file.

What changed

  • 5 R3 source files (instructions/r3/core/workflows/coding-agents-prompting-flow.md, research-flow.md, modernization-flow.md, skills/research/SKILL.md, skills/research/README.md).
  • 70 generated plugin files regenerated by the local generator (rosettify-plugins standard + lightweight passes, --deterministic-hooks false, matching scripts/pre_commit.py's pinned invocation).
  • Intentionally unchanged: R2 (KTLO) carries equivalent text; an R2 backport is a separate release-policy decision, per the triage caveat on [ROSETTA] Make research source tooling capability-aware #355.

Test plan

  • Defect tokens verified absent after the fix: zero remaining Candidate Prompt Set, MUST use DeepWiki and Context7, Spawn parallel subagents, or state-path-without-.md in R3 sources and all plugin outputs; fixed text present in all 14 plugin targets.
  • Regeneration is idempotent: a second generator pass produces zero further diff.
  • npm test (rosettify-plugins) — 797 passed / 52 files.
  • Handoff simulation: step 5 produces Prompt Set → step 6 consumes it → step 7 consumes it and produces Final Prompt Set; state path consistent across all seven phase updates and the checklist.

…gins

Closes griddynamics#357, Closes griddynamics#355, Closes griddynamics#354, Closes griddynamics#356

One regeneration pass propagates four independent R3 source repairs to all
14 plugin targets (standard + lightweight):

- griddynamics#357: normalize the state-path token to coding-agents-prompting-flow-state.md
  and the step-7 producer/consumer identifier (Prompt Set, not Candidate Prompt
  Set) — resume and final validation handoff were broken in every distribution.
- griddynamics#355: replace the unconditional DeepWiki+Context7 mandate with a capability-
  aware source contract (prefer when available, explicit fallbacks otherwise);
  research README updated to match.
- griddynamics#354: remove nested subagent dispatch from the research skill, research-flow
  phase 3, and the research README — the researcher executes the approved prompt
  directly; parallel-slice needs are proposed back to the top-level orchestrator.
- griddynamics#356: define the small in-place modernization reduced route as an explicit,
  auditable exception to the phase-prerequisite contract (Phase 2 without Phase
  1 only when no reference-library analysis is needed; Phase 6 without Phase 5
  only under a bounded single-project final-review note).

R2 (KTLO) carries equivalent text and is intentionally untouched — an R2 backport
is a separate release-policy decision.
@github-actions github-actions Bot added bug Something isn't working instructions skills, subagents, rules, workflows, commands for AI agents needs more work labels Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: Fixes four R3 instruction defects in prompt-authoring, research, and modernization flows. The PR updates all 14 generated plugin targets.

Classification: bug · instructions · needs more work
Priority: Medium — the full modernization path remains available, but the documented reduced path cannot meet its current phase contracts.

Findings:

  • Blocking — the reduced modernization path conflicts with its phase files. modernization-flow.md:33 allows Phase 2 without Phase 1 and Phase 6 without Phase 5. The Phase 2 file still requires Phase 1 (modernization-flow-analysis.md:15,29), and Phase 6 still requires Phase 5 and docs/cross-project-analysis.md (modernization-flow-mapping.md:15,27,56). Agents on the reduced path are told to skip phases whose inputs remain mandatory. Define the no-Phase-1 and no-Phase-5 inputs and artifact substitutes in those phase contracts.
  • The final-review condition is unclear. The exception names a “single-project final-review contract,” but limits the route to Phases 2 and 6. Phase 7 owns final review and still requires reference and cross-project artifacts (modernization-flow-review.md:14,36-39). State whether the reduced route includes final review and provide its inputs and checks, or remove the final-review wording.

Caveats:

  • Both CI checks were pending at triage time, so the PR test plan is not yet confirmed by CI.

Automated triage by Rosetta agent

…alidate Prompts)

The prompt-quality auditor flagged a High conflict: the unconditional
'execute directly, never spawn subagents' rule broke the top-level team-manager
caller, which activates research directly and must keep dispatching the
prepared prompt to a researcher subagent. Rule is now executor-scoped:
spawned researcher executes locally and proposes parallel slices to its parent;
top-level agent dispatches under orchestration. Nested dispatch stays
prohibited. Regenerated across all 14 plugin targets.

@ArteomBalanuta ArteomBalanuta left a comment

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.

Review notes (left as a comment, not approve/request-changes):

  • #357 (prompting-flow state path and the Prompt Set identifier): looks correct. Every other reference already uses .md, and nothing else in R3 says Candidate Prompt Set.
  • Plugin regeneration looks consistent. All 70 plugin files carry only lines from the 5 source changes, and the totals match exactly (154 added = 14 × 11, 140 removed = 14 × 10).
  • Not mergeable as-is: the #356 modernization exception still conflicts with the phase files, and the #354 research change blocks top-level callers (see inline comments). The validate check is failing on the second point.
  • Leaving R2 unchanged is fine under the KTLO policy.

Comment thread instructions/r3/core/workflows/modernization-flow.md Outdated
Comment thread instructions/r3/core/workflows/modernization-flow.md Outdated
Comment thread instructions/r3/core/skills/research/SKILL.md Outdated
Comment thread instructions/r3/core/skills/research/SKILL.md Outdated
Comment thread instructions/r3/core/skills/research/SKILL.md Outdated
Comment thread instructions/r3/core/skills/research/README.md Outdated
Comment thread instructions/r3/core/workflows/research-flow.md
@ArteomBalanuta
ArteomBalanuta marked this pull request as draft October 15, 2026 15:48
…rch contracts

- griddynamics#356 follow-through: the reduced route now defines its substitutes IN the
  phase files the agent loads — modernization-flow-analysis.md and
  modernization-flow-mapping.md carry explicit reduced-route exceptions on
  their prerequisites and MUST re-read lines; the sequential-execution note is
  qualified; the state-file template gains a Reduced Route field so the
  exception is auditable; Phase 7 is explicitly skipped on the reduced route
  (Phase 6 single-project note is its substitute); 'final-review' wording
  corrected to 'single-project mapping scope'.
- research SKILL.md: removed the capability-aware source line that duplicated
  enforcement rule 2; role wording aligned ('execute that prompt — never ad-hoc
  research').
- research README: self-contradictory meta-prompting line rewritten to the
  caller-scoped contract; stale line citation corrected (research-flow.md:50).

Regenerated across all 14 plugin targets; 797 generator tests pass.
@ArteomBalanuta
ArteomBalanuta marked this pull request as ready for review October 22, 2026 19:39
…n flow

- Phase 8 (implement) prerequisite now carries the reduced-route exception:
  Phase 7 is skipped there, so Phase 6 + the single-project scope note
  stand in for the cross-project review.
- "DO NOT SKIP PHASES" / "Do not skip phases!" in Critical Requirements now
  name the reduced route as the only exception.
- The single-project scope note has a defined home: the orchestrator writes
  it in the state file's Reduced Route section before Phase 6; Phase 6
  prerequisites and its re-read requirement point there.

Regenerated across all 14 plugin targets; 797 generator tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Rosetta Triage Review

Summary: Repairs R3 instruction defects and regenerates plugin outputs. The Phase 2 and Phase 6 prerequisites now include the reduced route.

Classification: bug · instructions
Priority: Medium

Findings:

  • Blocking — the reduced route cannot reach implementation. modernization-flow.md:33,119 skips Phase 7. modernization-flow-implement.md:15 still requires Phase 7. After Phase 6, the implementation prerequisite is false.
  • Blocking — the Phase 6 note does not replace final review. It records one-project scope (modernization-flow-mapping.md:27,56). Phase 7 also checks the original and target specifications, consistency, edge cases, APIs, and open unknowns (modernization-flow-review.md:36-45,58-61). Skipping Phase 7 removes these checks.

Suggestions:

  • Run Phase 7 in a reduced form. Review the specifications for the one project, check consistency and completeness, and ask for needed clarifications. Omit checks for reference and cross-project artifacts that this route does not create. Let Phase 8 proceed after this review and the required target-spec approval.

Clarifications:

  • The PR description lists five R3 source files, but the diff changes seven. Add modernization-flow-analysis.md and modernization-flow-mapping.md to the list.

Caveats:

  • The validate check was pending at review time.

Automated triage by Rosetta agent

@github-actions

Copy link
Copy Markdown
Contributor

📋 Prompt Quality Validation Report

✅ Validation Passed

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


No issues were found in the changed prompt files.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working instructions skills, subagents, rules, workflows, commands for AI agents needs more work

Projects

None yet

1 participant