Skip to content

feat(workflow): save scope, root resolution, and size guideline - #51

Merged
elkaix merged 3 commits into
mainfrom
feat/workflow-save-scope-and-size
Aug 9, 2026
Merged

feat(workflow): save scope, root resolution, and size guideline#51
elkaix merged 3 commits into
mainfrom
feat/workflow-save-scope-and-size

Conversation

@elkaix

@elkaix elkaix commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Related Issue

No linked issue — the problem is explained below.

Problem

/workflow save had three limitations:

  1. It always saved into the project scope — there was no way to keep a saved workflow in the user's home skills directory.
  2. It used the session working directory as the project root. Saving from a repository subdirectory placed the skill where the skill scanner (which resolves the closest .git ancestor) would never find it — the saved skill was invisible until the session was reopened at the repository root.
  3. The workflow size guideline in force during the run was not persisted, so a re-run of the saved skill lost the fan-out expectation.

What changed

  • /workflow save <name> [--personal]: --personal saves into the home skills directory; project scope stays the default.
  • writeSavedWorkflowSkill now takes the working directory and resolves the repository root itself via the skill scanner's own findProjectRoot (now exported) — the same rule the scanner uses to look skills up, so a save from a subdirectory lands where it will be found.
  • Saved workflows persist the size guideline into the skill frontmatter and state it in the body (the body is what the model reads on invocation; frontmatter alone is inert). The TUI caches the resolved guideline at startup, and the resolver is exported from the SDK.
  • Docs: the /workflow save row in the slash-command reference, and the PYTHINKER_CODE_DISABLE_WORKFLOWS / PYTHINKER_CODE_WORKFLOW_SIZE_GUIDELINE rows in the env-var reference.
  • Rider: removes an unused mission-control streaming helper and narrows another to module scope (no behavior change).

Tests: the save suite covers scope selection, root resolution from a subdirectory, and guideline persistence; the TUI suite covers --personal parsing.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

/workflow save accepts --personal to save into the home skills
directory, resolves the repository root when saving from a
subdirectory so the saved skill is discoverable, and persists the
workflow size guideline into the saved skill. The saved-workflow write
helper takes the working directory and resolves the repository root
itself, and the size guideline resolver is exported from the SDK. Also
removes an unused mission-control streaming helper.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: edda99a5-ab31-40ac-a0e4-85a305cd75c3

📥 Commits

Reviewing files that changed from the base of the PR and between 38e3504 and b04404c.

📒 Files selected for processing (14)
  • .changeset/sdk-saved-workflow-workdir.md
  • .changeset/workflow-save-scope-and-root.md
  • apps/pythinker-code/src/tui/commands/dynamic-workflow.ts
  • apps/pythinker-code/src/tui/commands/workflow-availability.ts
  • apps/pythinker-code/src/tui/components/messages/dynamic-workflow-mission-control.ts
  • apps/pythinker-code/src/tui/pythinker-tui.ts
  • apps/pythinker-code/test/tui/commands/dynamic-workflow.test.ts
  • docs/configuration/env-vars.md
  • docs/reference/slash-commands.md
  • packages/agent-core/src/agent/dynamic-workflow/save-as-skill.ts
  • packages/agent-core/src/agent/index.ts
  • packages/agent-core/src/skill/scanner.ts
  • packages/agent-core/test/agent/dynamic-workflow-save.test.ts
  • packages/node-sdk/src/index.ts

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

@pkg-pr-new

pkg-pr-new Bot commented Aug 9, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@pythoughts/pythinker-code@b04404c
npx https://pkg.pr.new/@pythoughts/pythinker-code@b04404c

commit: b04404c

@elkaix

elkaix commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

A workflow name may contain spaces, so the flag was stripped wherever it
appeared. That let 'save report --personal extra' save under the name
'report extra' in personal scope without a word to the user.

Recognise --personal only as the first or last token and reject the rest,
and document that a saved workflow is invoked under its generated skill
name rather than the name as typed.
@elkaix
elkaix merged commit c8cdcc7 into main Aug 9, 2026
11 checks passed
@elkaix
elkaix deleted the feat/workflow-save-scope-and-size branch August 9, 2026 20:31
elkaix pushed a commit that referenced this pull request Aug 9, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @pythoughts/pythinker-code@0.14.0

### Minor Changes

- [#51](#51)
[`c8cdcc7`](c8cdcc7)
- `/workflow save` accepts `--personal` to save into the home skills
directory, resolves the repository root when saving from a subdirectory
so the saved skill is discoverable, and persists the workflow size
guideline into the saved skill.

### Patch Changes

- [#46](#46)
[`bceff21`](bceff21)
- Fix `pythinker doctor` crashing on native installs, and report the
last recorded update outcome.

- [#49](#49)
[`f35061e`](f35061e)
- Model permission deny rules now also apply to subagent model overrides
coming from agent profiles and from resume or retry, not only to models
named in tool arguments; a denied override falls back to the parent
agent's model.

- [#46](#46)
[`bceff21`](bceff21)
- Stop reporting an update as installed when the executable did not
change; the version is checked after the installer finishes and a
mismatch is recorded as a failure with the reason.

- [#46](#46)
[`bceff21`](bceff21)
- Show download progress under the prompt while a Windows update
installs, instead of nothing until it finishes.

- [#46](#46)
[`bceff21`](bceff21)
- Fix automatic updates on Windows for npm, pnpm, and yarn installs,
which failed to start at all.

- [#50](#50)
[`38e3504`](38e3504)
- Record the origin of the prompt that entered Dynamic Workflow mode, so
a fan-out started by a scheduled job or hook is attributable in the
session records.

- [#49](#49)
[`f35061e`](f35061e)
- Subagent lifecycle events now carry the workflow name on start,
completion and failure, and suspension events carry both the workflow
run id and name, so clients can correlate every event without caching
the spawn event.
## pythinker-code@0.9.0

### Minor Changes

- [#48](#48)
[`17967df`](17967df)
- Combine permission mode, plan mode, and thinking effort into one
composer menu, and answer approval prompts with number keys.

- [#48](#48)
[`17967df`](17967df)
- Add a config hub page that shows models, providers, MCP servers, the
local config file, and extension settings in one place.

- [#48](#48)
[`17967df`](17967df)
- The extension UI now follows the editor color theme, including light,
dark, and high-contrast themes.

- [#48](#48)
[`17967df`](17967df)
- Add a status bar indicator, quick-fix code actions, terminal and
editor context menu entries, a getting-started walkthrough, and a
new-conversation keybinding.

### Patch Changes

- [#48](#48)
[`17967df`](17967df)
- Render long conversations with a virtualized list, fix control overlap
at narrow sidebar widths, and make sign-out work from the command
palette.

- Updated dependencies
[[`c8cdcc7`](c8cdcc7)]:
  - @pythoughts/pythinker-code-sdk@0.15.0
## @pythoughts/pythinker-code-sdk@0.15.0

### Minor Changes

- [#51](#51)
[`c8cdcc7`](c8cdcc7)
- The saved-workflow write helper now takes the working directory and
resolves the repository root itself, saved workflows can carry a size
guideline, and the workflow size guideline resolver is exported.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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