Skip to content

Fix prompts dups - #9

Merged
ainetx merged 3 commits into
mainfrom
fix-prompts-dups
Jun 2, 2026
Merged

Fix prompts dups#9
ainetx merged 3 commits into
mainfrom
fix-prompts-dups

Conversation

@ainetx

@ainetx ainetx commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

Release Notes

Refactor

  • Centralized root bootstrap and shared context ownership into reusable workflow fragments
  • Namespaced many controller units for clearer consistency and scoping
  • Delegated write-confirmation and partial-checkpoint flows to shared confirmation/partial-checkpoint gates
  • Streamlined runtime activation flow and clarified required storytelling runtime assets

Tests

  • Added validations to detect duplicate component definitions and enforce unique names

Chores

  • Updated gitignore to exclude local planning artifacts

ainetx added 2 commits June 2, 2026 13:21
…nsure uniqueness and clarity. Introduced a shared root skill entrypoint bootstrap workflow fragment to standardize entrypoint handling in workflows. Updated tests to validate uniqueness of PDSL unit and menu names, ensuring no exact duplicates exist.

Signed-off-by: ainetx <viator@via-net.org>
…ng and context management. Introduced shared context pack ownership and confirmation mechanisms for write-capable modes. Updated related specifications and requirements for clarity and consistency.

Signed-off-by: ainetx <viator@via-net.org>
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ca94c8e4-838b-4b81-b3aa-06a822c6456f

📥 Commits

Reviewing files that changed from the base of the PR and between d3e0a4f and a04102b.

📒 Files selected for processing (5)
  • skills/studio/agents/cf-semantic-reviewer-code.md
  • skills/studio/agents/shared/context-budget-partial-checkpoint.md
  • workflows/pdsl/new.md
  • workflows/shared/root-skill-entrypoint-bootstrap.md
  • workflows/shared/shared-context-pack-ownership.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • workflows/shared/shared-context-pack-ownership.md
  • workflows/shared/root-skill-entrypoint-bootstrap.md
  • skills/studio/agents/cf-semantic-reviewer-code.md
  • skills/studio/agents/shared/context-budget-partial-checkpoint.md
  • workflows/pdsl/new.md

📝 Walkthrough

Walkthrough

Refactors common controller/workflow behaviors into shared PDSL/Markdown fragments (runtime activation, partial checkpoints, root bootstrap, shared context ownership, write-confirmation), updates requirements/workflows/agents to LOAD and CONTINUE those fragments, renames many generic UNIT identifiers to unique controller-specific names, and adds tests to prevent duplicate PDSL definitions.

Changes

Shared Contract Extraction and Unit Naming Standardization

Layer / File(s) Summary
Shared contract definitions
requirements/shared/runtime-activation-contract.md, skills/studio/agents/shared/context-budget-partial-checkpoint.md, workflows/shared/root-skill-entrypoint-bootstrap.md, workflows/shared/shared-context-pack-ownership.md, workflows/shared/pdsl-write-confirm-menu.md, workflows/shared/pdsl-write-confirm-gate.md
New shared fragments define runtime activation, partial-checkpoint emission, root-skill bootstrap gating, shared context-pack ownership, and a PDSL write-confirmation UI/gate.
Activation contract integration in requirements & sysprompts
requirements/auto-config.md, requirements/storytelling.md, architecture/specs/sysprompts.md
AutoConfig and Storytelling activation units now set activation variables and LOAD shared/runtime-activation-contract.md (SharedRuntimeActivationContract); sysprompts now delegate shared-context ownership handling and narrow asset-origin RULES.
Agent partial checkpoint and naming standardization
skills/studio/agents/* (e.g., cf-code-bug-finder.md, cf-prompt-bug-finder.md, cf-deterministic-validator.md, cf-generate-author.md, cf-migrate-*.md, cf-semantic-reviewer-*.md, storytelling agent files)
PartialCheckpoint units in controllers are replaced with controller-specific units that set variables and LOAD SharedContextBudgetPartialCheckpoint; numerous generic UNIT identifiers renamed to controller-scoped names for uniqueness.
Protocol and shared context integration
skills/studio/protocol.md, skills/studio/sub-agent-dispatch.md
SharedContextPackProtocol now LOADs shared-context-pack-ownership.md and CONTINUEs SharedContextPackOwnership; one unit identifier renamed for uniqueness (SubAgentDispatchInstructionFileAuthoringBoundary).
Workflow root bootstrap and ownership integration
many workflows/*.md (e.g., analyze.md, generate.md, pdsl.md, workspace.md, studio.md, plan.md, help.md, etc.)
All workflows replace inline RootSkillEntrypointBootstrap gates with workflow-scoped loader units (e.g., GenerateRootSkillEntrypointBootstrap) that LOAD the shared root-skill-entrypoint-bootstrap; Pdsl/Workspace shared-context packs delegate to SharedContextPackOwnership; analyze phase units get -Loader suffixes.
PDSL write-confirmation workflow refactoring
workflows/pdsl/new.md, workflows/pdsl/transform.md, workflows/shared/pdsl-write-confirm-*.md
NewPromptMode and TransformMode set PDSL_WRITE_CONFIRM_* state, LOAD shared pdsl-write-confirm-menu.md and pdsl-write-confirm-gate.md, and CONTINUE SharedPdslWriteConfirmGate instead of rendering inline write-confirm menus.
PDSL uniqueness tests and workflow parsing updates
tests/test_pdsl_keywords.py, tests/test_workflow_parsing.py, .gitignore, architecture/specs/PDSL.md
Added tests to detect duplicate PDSL block bodies and duplicate UNIT/MENU names across files; updated workflow parsing test to look for shared root bootstrap reference; example PDSL UNIT renamed; .gitignore ignores local plan directory.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

"🐰
I hopped through docs and patched each name,
Shared gates now load from one central frame;
Contracts tucked tidy, tests keeping pace,
A carrot of order left in the place. 🥕"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, using a non-descriptive abbreviation ('dups') that doesn't clearly convey the main purpose of the changeset without additional context. Expand the title to be more specific about the core refactoring. For example: 'Refactor PDSL unit names for uniqueness and add shared workflow fragments' or 'Namespace PDSL units and extract shared context pack handling'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-prompts-dups

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
skills/studio/agents/cf-semantic-reviewer-code.md (2)

149-149: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Update CONTINUE reference to match renamed unit.

Line 149 references ContextBudgetFailSafe in a CONTINUE statement, but this unit was renamed to CfSemanticReviewerCodeContextBudgetFailSafe at line 50.

🔧 Proposed fix
-      CONTINUE ContextBudgetFailSafe
+      CONTINUE CfSemanticReviewerCodeContextBudgetFailSafe
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/studio/agents/cf-semantic-reviewer-code.md` at line 149, Update the
CONTINUE statement that references the old unit name: replace the reference to
ContextBudgetFailSafe with the renamed unit
CfSemanticReviewerCodeContextBudgetFailSafe so the CONTINUE points to the
correct unit (search for the CONTINUE ContextBudgetFailSafe occurrence near the
current line 149 and change it to CONTINUE
CfSemanticReviewerCodeContextBudgetFailSafe).

101-101: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Update reference to match renamed unit.

Line 101 references ContextBudgetFailSafe, but this unit was renamed to CfSemanticReviewerCodeContextBudgetFailSafe at line 50. The reference must be updated to use the new name.

🔧 Proposed fix
-     - REQUIRE ContextBudgetFailSafe is active
+     - REQUIRE CfSemanticReviewerCodeContextBudgetFailSafe is active
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/studio/agents/cf-semantic-reviewer-code.md` at line 101, Update the
outdated reference: replace the old unit name ContextBudgetFailSafe with the
renamed CfSemanticReviewerCodeContextBudgetFailSafe in the REQUIRE line so it
matches the declaration; locate the REQUIRE statement that currently mentions
ContextBudgetFailSafe and change it to
CfSemanticReviewerCodeContextBudgetFailSafe to ensure the unit name matches the
renamed symbol.
🧹 Nitpick comments (1)
workflows/shared/root-skill-entrypoint-bootstrap.md (1)

26-26: ⚡ Quick win

Fix capitalization inconsistency.

"ALWAYS If" should use lowercase "if" for proper grammar: "ALWAYS if this workflow file is opened directly".

📝 Proposed fix
-  - ALWAYS If this workflow file is opened directly, STOP workflow phases until
+  - ALWAYS if this workflow file is opened directly, STOP workflow phases until
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@workflows/shared/root-skill-entrypoint-bootstrap.md` at line 26, Update the
capitalization in the markdown sentence that currently reads "ALWAYS If this
workflow file is opened directly, STOP workflow phases until" by changing "If"
to lowercase "if" so it reads "ALWAYS if this workflow file is opened directly,
STOP workflow phases until"; locate the phrase in
workflows/shared/root-skill-entrypoint-bootstrap.md and apply the single-word
capitalization change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/studio/agents/shared/context-budget-partial-checkpoint.md`:
- Line 24: The PDSL step incorrectly uses the lower-case imperative "RUN emit
PARTIAL_CHECKPOINT_FINDINGS payload" which is inconsistent with the repo's
emission syntax; replace that token with the canonical PDSL emission form "EMIT
PARTIAL_CHECKPOINT_FINDINGS payload" (or, if there's a justified runtime need
for a RUN-based emission, document that rationale next to the step). Update the
step containing "RUN emit" so it uses the "EMIT" keyword and ensure the emitted
symbol "PARTIAL_CHECKPOINT_FINDINGS" and its "payload" remain unchanged.

In `@workflows/pdsl/new.md`:
- Around line 30-36: The flow is wiring SharedPdslWriteConfirmGate/Menu but
PDSL_WRITE_CONFIRM_INPUTS points to NewPromptInputs which is not defined in
scope; either define NewPromptInputs in this flow before the LOAD/CONTINUE
(e.g., add a SET NewPromptInputs = <value/source>) or change
PDSL_WRITE_CONFIRM_INPUTS to an existing variable provided by the parent (e.g.,
the variable exported by workflows/pdsl.md), and then re-run with
SharedPdslWriteConfirmGate, SharedPdslWriteConfirmMenu, PDSL_WRITE_CONFIRM_MODE,
PDSL_WRITE_CONFIRM_PRECONDITIONS and PDSL_WRITE_CONFIRM_AGENT unchanged so the
menu dispatch has a valid input binding.

In `@workflows/shared/shared-context-pack-ownership.md`:
- Around line 21-23: Edit the sentence containing the duplicated "ALWAYS" (the
phrase "the controller ALWAYS reuse or refresh SHARED_CONTEXT_PACK") to remove
redundancy and correct grammar—either remove the second "ALWAYS" and keep
imperative mood ("ALWAYS before any prompt-consuming dispatch, the controller
reuse or refresh SHARED_CONTEXT_PACK") or, better, change to
indicative/third-person ("the controller reuses or refreshes
SHARED_CONTEXT_PACK, load the agent prompt source, and synthesize the final
dispatch prompt...") so the wording is not duplicated and grammar matches the
sentence structure.

---

Outside diff comments:
In `@skills/studio/agents/cf-semantic-reviewer-code.md`:
- Line 149: Update the CONTINUE statement that references the old unit name:
replace the reference to ContextBudgetFailSafe with the renamed unit
CfSemanticReviewerCodeContextBudgetFailSafe so the CONTINUE points to the
correct unit (search for the CONTINUE ContextBudgetFailSafe occurrence near the
current line 149 and change it to CONTINUE
CfSemanticReviewerCodeContextBudgetFailSafe).
- Line 101: Update the outdated reference: replace the old unit name
ContextBudgetFailSafe with the renamed
CfSemanticReviewerCodeContextBudgetFailSafe in the REQUIRE line so it matches
the declaration; locate the REQUIRE statement that currently mentions
ContextBudgetFailSafe and change it to
CfSemanticReviewerCodeContextBudgetFailSafe to ensure the unit name matches the
renamed symbol.

---

Nitpick comments:
In `@workflows/shared/root-skill-entrypoint-bootstrap.md`:
- Line 26: Update the capitalization in the markdown sentence that currently
reads "ALWAYS If this workflow file is opened directly, STOP workflow phases
until" by changing "If" to lowercase "if" so it reads "ALWAYS if this workflow
file is opened directly, STOP workflow phases until"; locate the phrase in
workflows/shared/root-skill-entrypoint-bootstrap.md and apply the single-word
capitalization change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cedda752-5dec-4ba3-94ea-40ec96461b3f

📥 Commits

Reviewing files that changed from the base of the PR and between 322d484 and d3e0a4f.

📒 Files selected for processing (46)
  • .gitignore
  • architecture/specs/PDSL.md
  • architecture/specs/sysprompts.md
  • requirements/auto-config.md
  • requirements/shared/runtime-activation-contract.md
  • requirements/storytelling.md
  • skills/studio/agents/cf-code-bug-finder.md
  • skills/studio/agents/cf-deterministic-validator.md
  • skills/studio/agents/cf-generate-author.md
  • skills/studio/agents/cf-migrate-migrator.md
  • skills/studio/agents/cf-migrate-scanner.md
  • skills/studio/agents/cf-migrate-verifier.md
  • skills/studio/agents/cf-prompt-bug-finder.md
  • skills/studio/agents/cf-semantic-reviewer-artifact.md
  • skills/studio/agents/cf-semantic-reviewer-code.md
  • skills/studio/agents/cf-semantic-reviewer-consistency.md
  • skills/studio/agents/cf-semantic-reviewer-prompt.md
  • skills/studio/agents/shared/context-budget-partial-checkpoint.md
  • skills/studio/agents/storytelling-context-pack.md
  • skills/studio/agents/storytelling-export.md
  • skills/studio/agents/storytelling-gate.md
  • skills/studio/agents/storytelling-preflight.md
  • skills/studio/agents/storytelling-wrap.md
  • skills/studio/migrate-from-cypilot.md
  • skills/studio/protocol.md
  • skills/studio/sub-agent-dispatch.md
  • tests/test_pdsl_keywords.py
  • tests/test_workflow_parsing.py
  • workflows/analyze.md
  • workflows/auto-config.md
  • workflows/brainstorm.md
  • workflows/explain.md
  • workflows/explore.md
  • workflows/generate.md
  • workflows/help.md
  • workflows/map.md
  • workflows/pdsl.md
  • workflows/pdsl/new.md
  • workflows/pdsl/transform.md
  • workflows/plan.md
  • workflows/shared/pdsl-write-confirm-gate.md
  • workflows/shared/pdsl-write-confirm-menu.md
  • workflows/shared/root-skill-entrypoint-bootstrap.md
  • workflows/shared/shared-context-pack-ownership.md
  • workflows/studio.md
  • workflows/workspace.md

Comment thread skills/studio/agents/shared/context-budget-partial-checkpoint.md Outdated
Comment thread workflows/pdsl/new.md
Comment thread workflows/shared/shared-context-pack-ownership.md Outdated
…ious workflows. Updated context budget fail-safe references for clarity and consistency. Enhanced prompt input settings in new workflow mode and improved shared context pack ownership rules.

Signed-off-by: ainetx <viator@via-net.org>
@ainetx
ainetx merged commit bad9a11 into main Jun 2, 2026
20 checks passed
@ainetx
ainetx deleted the fix-prompts-dups branch June 4, 2026 22:09
ainetx added a commit that referenced this pull request Jun 30, 2026
…itions

- Update cf-coding, cf-write-docs, cf-write-skills table rows to identify
  them as umbrella entrypoints listing their specialized sub-routes
- Add cf-planning and cf-git-commit to the base skills table
- Add note below the table about invoking sub-routes directly
- Update USAGE-GUIDE section 6 intro to mention specialized sub-routes
- Fix duplicate entries in "Best chat form" list; add cf-planning,
  cf-git-commit, and sub-route examples
- Add "When the intent is already clear" sub-route hints under the
  coding, write-docs, and write-skills sections
- Update practical habit #9 to mention specialized sub-routes

Signed-off-by: ainetx <viator@via-net.org>
Co-authored-by: Constructor Studio <291158726+constructor-studio[bot]@users.noreply.github.com>
Studio-Generated-By: Constructor Studio
Studio-Source-Repo: https://github.com/constructorfabric/studio
Constructor-Fabric: https://github.com/constructorfabric
Studio-Version: cli=1.5.9
Studio-Workflows: cf-documenting-planning,cf-documenting-gen,cf-git-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant