Skip to content

Add workflow orchestrator correctness improvements - #6

Open
cryptosebek wants to merge 5 commits into
hlibr:masterfrom
cryptosebek:feature/workflow-orchestrator-correctness
Open

Add workflow orchestrator correctness improvements#6
cryptosebek wants to merge 5 commits into
hlibr:masterfrom
cryptosebek:feature/workflow-orchestrator-correctness

Conversation

@cryptosebek

Copy link
Copy Markdown
Contributor

Summary

This PR improves workflow orchestrator runtime correctness, typed contracts, state handling, and integration coverage while preserving project-level customization.

Runtime changes

  • Add typed workflow report contracts and runtime validation for agent outputs.
  • Harden workflow configuration, session paths, state migration, and resume behavior.
  • Improve orchestrator runner, engine, rendering, and agent handling for reliable task execution.
  • Add workflow PM and task tools for reporting results and coordinating task state.
  • Update bundled agent instructions and default workflow configuration.

Documentation and configuration

  • Update AGENTS.md and README.md with the current workflow orchestration behavior and development guidance.
  • Align package dependencies and lockfile with the supported Pi runtime and TypeBox version.
  • Include the implementation plan and integration-test fixtures.

Tests

  • Extend coverage for configuration, state, rendering, runner behavior, agent discovery, and workflow tools.
  • Add fake-Pi integration scenarios and an opt-in real-Pi integration test.

Validation

  • TypeScript typecheck passing
  • git diff --check passing
  • Test execution is blocked in this environment by Node 16.13.2, which lacks EventEmitterAsyncResource; the repository dependencies require a newer Node runtime.

@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: 4b5bd7cad1

ℹ️ 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".

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

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

declaredFiles: string[],
): Promise<string | undefined> {
try {
const { stdout } = await execFile("git", ["diff", "--name-only"], { cwd, shell: false });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include untracked files before comparing reports

When a developer creates a new file and correctly lists it in filesChanged, git diff --name-only does not report untracked files, so this code records a false “Missing from diff” blocking issue and passes that noise to the verifier. This affects common first-wave tasks that add new files; include untracked files (for example via git ls-files --others --exclude-standard) or avoid treating them as missing.

Useful? React with 👍 / 👎.

}

/** Copy editable defaults into the project without overwriting existing files. */
export function materializeProjectDefaults(cwd: string): string[] {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Call the default materializer before loading workflows

The new first-run copier is never invoked outside tests (rg materializeProjectDefaults only finds this file and tests), while start/resume still load from ctx.cwd/.pi/workflows. In a package-installed project that does not already have .pi/workflows/default.workflow.json, the documented first run fails with “Workflow not found” instead of copying the bundled defaults; wire this helper or resolveWorkflowPath into the startup path.

Useful? React with 👍 / 👎.

Comment thread README.md
```bash
pi
/workflow start default "Your goal"
/workflow "Your goal"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Wire the advertised workflow shorthand into the handler

This quick-start command is now advertised, but the registered /workflow handler still treats the first token as a subcommand and only starts on command === "start"; the new shorthand/model parsers are only referenced by tests. Users following this line get the usage warning instead of starting the default workflow, so either route /workflow <goal> through the new parser or keep the docs on /workflow start default ....

Useful? React with 👍 / 👎.

@hlibr

hlibr commented Jul 26, 2026

Copy link
Copy Markdown
Owner

@cryptosebek While I am not against AI contributions, reading your PRs - it's not really clear to me what they do, what problems are fixed, or the reasoning behind them.

This

Test execution is blocked in this environment by Node 16.13.2, which lacks EventEmitterAsyncResource; the repository dependencies require a newer Node runtime.

makes me think you didn't even test the changes, and if you didn't - why should I?

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.

2 participants