Skip to content

feat(workflows): expose guided prompts through CLI and MCP - #6995

Merged
gensokyo-dev merged 9 commits into
morluto:mainfrom
Deepak-Kambala:feat/6918-guided-workflows
Oct 28, 2026
Merged

gensokyo-dev merged 9 commits into
morluto:mainfrom
Deepak-Kambala:feat/6918-guided-workflows

Conversation

@Deepak-Kambala

@Deepak-Kambala Deepak-Kambala commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #6918. Add rea guided-workflows and the target-free guided_workflows MCP tool so clients can list existing workflow requirements and render one workflow through the same contracts as native MCP prompts.

The shared typed application parser preserves nested error paths and rejects unknown context fields and every forbidden list field. MCP uses the native prompt family scope. Standalone request/result schemas avoid catalog initialization cycles; an explicit object output root prevents legacy SDK response wrapping. Template rendering is independent of catalog visibility, and CLI loads the application only when invoked, preserving existing lazy startup. Rendering produces guidance without target analysis or session changes; no new provider or execution authority is introduced.

Validation

  • Focused CLI startup, built guidance CLI, full/compact stdio MCP, native prompts/completion/lifecycle and scoped status tests: 35 passed across focused runs. Startup regressions verify both command registration and actual guidance rendering leave the tool catalog/provider composition unloaded.
  • Effects/provenance contract audits: 30 passed. The earlier eight in-memory ownership/adapter tests passed, including an execution spy and native completion availability.
  • Synced main b594fbc3e; repeated nine compiled startup/MCP boundary tests, npm run docs:check (nine conformance tests), and npm run check:fast: all passed. Bounded affected-file typed lint passed with existing warnings in untouched sections; 24-file formatting and diff checks passed. Full check:pr was not run locally. Full-profile MCP tests have a bounded 60 s budget after full-profile boundary cases took 22–39 s under concurrent shared-host work.

Performance and real input

Compared 265d13647 with the startup fix b2d02cca5 on the same pinned base/dependencies, before the final independent main sync: 18 alternating fresh CLI processes covered help, selected guidance rendering and inspect-elf-notes /usr/bin/true. All stdout SHA-256s matched between old/new lanes. Sampled process-family RSS fell from 230–253 to 208–212 MiB; mean CPU across the equally weighted tasks fell from 3.57 to 3.02 s. Mean elapsed help/render/ELF times were 3.37/3.28/3.43 s before and 2.73/2.76/2.97 s after, with overlapping ranges. Output tokenx estimates stayed 4,331/696/1,600. The real ELF SHA-256 was c79bf44242829108e323378531f4ac839513ca1fba45efd6583643526e1e9fd2.

On final 3ea8d5167, three alternating fresh SDK client/server sessions per entrypoint completed one scoped catalog discovery and three list/render pairs, then closed both processes. Native prompt and tool guidance/IDs matched exactly; /usr/bin/true was selection data only here. Tokenx estimates for one pair plus the complete scoped catalog were 69,831 native / 71,674 tool; the added tool advertisement was 306 tokens. These serialized estimates include structured-content/text duplication, not model billing. Warm pairs overlapped at 7–31 ms; first tool pair cost 665–704 ms versus native 18–30 ms. Complete client/session workloads took 5.7–7.0 / 6.1–9.0 s elapsed, 6.4–7.9 / 7.3–10.2 s CPU, and 433–434 / 463–470 MiB sampled family RSS (native/tool). Totals include SDK and measurement bookkeeping. This compatibility entrypoint has measured overhead; no general latency improvement is claimed. RSS sampling was every 10 ms on a shared Linux host; filesystem caches were not flushed, and no builds or heavy checks overlapped the profiles.

Author readiness

Human owner: @Deepak-Kambala

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@Deepak-Kambala
Deepak-Kambala marked this pull request as ready for review October 24, 2026 11:05
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-28T05:52:19.858864Z
We couldn’t complete this review. Comment @codex review to try again.
3ea8d51 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable defect remains.

Summary

Adds rea guided-workflows and the guided_workflows MCP tool for listing and rendering existing prompts.

  • CLI users and MCP clients can list or render existing guided workflows.
  • Native MCP prompts reject argument names they do not recognize.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  CLI["rea guided-workflows"] --> Access["accessGuidedWorkflows"]
  Tool["guided_workflows MCP tool"] --> Scope["Filter by tool families"]
  Scope --> Access
  Access --> List["Workflow requirements"]
  Access --> Render["Shared prompt renderer"]
  Native["Native MCP prompts"] --> Render
  Render --> Text["Guidance text only"]
Loading

Reviews (5) · Last reviewed commit: "chore: sync main for guided workflow int..." · Reviewed by Greptile

Comment thread src/application/GuidedWorkflowAccess.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 392af8be82

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/application/GuidedWorkflowAccess.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0037f1b513

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/contracts/promptContracts.ts Resolved
Comment thread src/application/GuidedWorkflowAccess.ts Resolved
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Want your agent to iterate on Greptile's feedback? Try greploops.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gensokyo-dev
gensokyo-dev merged commit 5ae7765 into morluto:main Oct 28, 2026
49 checks passed
Plastic-time added a commit to Plastic-time/rea that referenced this pull request Nov 1, 2026
The provenance guide named export_evidence_bundle, record_unknown,
search_guidance and read_guidance_section as the only tools whose results
omit _meta.provenance. TARGET_CONTENT_FREE_TOOLS also exempts
inspect_analysis_settings and update_analysis_settings (morluto#7049) and
guided_workflows (morluto#6995), so a reader of the guide expected markers those
tools never send.

List all seven, and assert in the existing provenance conformance test that
the documented list equals TARGET_CONTENT_FREE_TOOLS, so the next audited
exception cannot be missed again.

Fixes morluto#7327.
@morluto morluto mentioned this pull request Nov 11, 2026
3 tasks done
@morluto morluto added area: cli CLI adapter and one-shot commands enhancement New feature or request labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Access existing guided workflows through CLI and MCP tools

3 participants