Skip to content

revert: keep per-task workflow selection on beta - #504

Merged
taosu0216 merged 2 commits into
mainfrom
revert/467-beta-workflow-from-main
Jul 30, 2026
Merged

revert: keep per-task workflow selection on beta#504
taosu0216 merged 2 commits into
mainfrom
revert/467-beta-workflow-from-main

Conversation

@taosu0216

@taosu0216 taosu0216 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Why

Per-task workflow selection is a v0.7 beta capability. PR #467 independently targeted main, which would otherwise ship the beta-only feature in the next stable patch.

Validation

Summary by CodeRabbit

  • Workflow Management

    • Workflow state, session summaries, and workflow breadcrumbs now consistently come from the project’s single workflow.md.
    • Removed per-task workflow variant resolution and related fallback behavior.
    • trellis workflow no longer supports saving or listing saved workflow variants.
  • Task Data

    • New tasks no longer store per-task workflow selections.
    • Task metadata types now include optional relatedFiles, notes, and meta.
  • Documentation / Tests

    • Updated workflow and CLI documentation to match the centralized behavior.
    • Adjusted integration/template tests to reflect removed variant features.

This reverts commit c3596dd (#467), which targeted main but belongs to the v0.7 beta release line.
@coderabbitai

coderabbitai Bot commented Jul 30, 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 Plus

Run ID: 6a8db637-94e0-49a1-9985-df5cb4c0a167

📥 Commits

Reviewing files that changed from the base of the PR and between 69bc8a5 and 4f9b067.

📒 Files selected for processing (1)
  • .trellis/spec/cli/backend/commands-workflow.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .trellis/spec/cli/backend/commands-workflow.md

📝 Walkthrough

Walkthrough

Per-task workflow selection, persistence, CLI commands, and variant-library support were removed. Hooks and workflow-state injectors now read .trellis/workflow.md directly, while task schemas, templates, specifications, and tests were updated.

Changes

Workflow source consolidation

Layer / File(s) Summary
Task schema and workflow CLI removal
.trellis/scripts/common/*, .trellis/scripts/task.py, packages/cli/src/templates/trellis/scripts/*, packages/core/src/task/*
Task creation, task records, and generated scripts no longer support per-task workflow fields or workflow selection commands.
Workflow command and specification updates
packages/cli/src/cli/index.ts, packages/cli/src/commands/workflow.ts, .trellis/spec/cli/backend/*, packages/cli/test/commands/*
trellis workflow --save and workflow-library listing behavior were removed, with specifications and integration tests updated for template replacement behavior.
Hook and plugin workflow sourcing
.claude/hooks/*, .codex/hooks/*, .cursor/hooks/*, .opencode/*, packages/cli/src/templates/*, packages/cli/test/*
Session-start and workflow-state hooks read .trellis/workflow.md directly; active-task handling and obsolete workflow-selection tests were simplified.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 56.41% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the revert and the per-task workflow selection behavior being preserved on beta.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert/467-beta-workflow-from-main

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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.

🧹 Nitpick comments (1)
.trellis/spec/cli/backend/commands-workflow.md (1)

149-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

"Good" case doesn't actually test the hash-removal contract.


Using --skip-all in the "Good" example leaves TDD content in place regardless of whether the workflow hash was removed — that flag skips updates outright. The "Bad" case correctly uses plain trellis update to show the contract failing; consider mirroring that in the "Good" case (plain trellis update after correct hash removal) so the example actually demonstrates the intended protection.

🤖 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 @.trellis/spec/cli/backend/commands-workflow.md around lines 149 - 153, The
“Good” case in the workflow command documentation does not verify hash removal
because trellis update --skip-all bypasses updates. Change that scenario to run
plain trellis update after the TDD workflow replacement, preserving the
expectation that TDD content remains because the workflow hash was correctly
removed.
🤖 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.

Nitpick comments:
In @.trellis/spec/cli/backend/commands-workflow.md:
- Around line 149-153: The “Good” case in the workflow command documentation
does not verify hash removal because trellis update --skip-all bypasses updates.
Change that scenario to run plain trellis update after the TDD workflow
replacement, preserving the expectation that TDD content remains because the
workflow hash was correctly removed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: eda94215-fe49-4268-86b9-fce88f1447c3

📥 Commits

Reviewing files that changed from the base of the PR and between 89f25a8 and 69bc8a5.

📒 Files selected for processing (41)
  • .claude/hooks/inject-workflow-state.py
  • .claude/hooks/session-start.py
  • .codex/hooks/inject-workflow-state.py
  • .codex/hooks/session-start.py
  • .cursor/hooks/session-start.py
  • .opencode/plugins/inject-workflow-state.js
  • .trellis/scripts/common/task_store.py
  • .trellis/scripts/common/types.py
  • .trellis/scripts/common/workflow_phase.py
  • .trellis/scripts/common/workflow_selection.py
  • .trellis/scripts/task.py
  • .trellis/spec/cli/backend/commands-workflow.md
  • .trellis/spec/cli/backend/workflow-state-contract.md
  • .trellis/tasks/07-23-per-task-workflow/check.jsonl
  • .trellis/tasks/07-23-per-task-workflow/design.md
  • .trellis/tasks/07-23-per-task-workflow/implement.jsonl
  • .trellis/tasks/07-23-per-task-workflow/implement.md
  • .trellis/tasks/07-23-per-task-workflow/prd.md
  • .trellis/tasks/07-23-per-task-workflow/task.json
  • .trellis/workspace/tommy/index.md
  • .trellis/workspace/tommy/journal-1.md
  • packages/cli/src/cli/index.ts
  • packages/cli/src/commands/workflow.ts
  • packages/cli/src/templates/codex/hooks/session-start.py
  • packages/cli/src/templates/copilot/hooks/session-start.py
  • packages/cli/src/templates/opencode/plugins/inject-workflow-state.js
  • packages/cli/src/templates/shared-hooks/inject-workflow-state.py
  • packages/cli/src/templates/shared-hooks/session-start.py
  • packages/cli/src/templates/trellis/index.ts
  • packages/cli/src/templates/trellis/scripts/common/task_store.py
  • packages/cli/src/templates/trellis/scripts/common/types.py
  • packages/cli/src/templates/trellis/scripts/common/workflow_phase.py
  • packages/cli/src/templates/trellis/scripts/common/workflow_selection.py
  • packages/cli/src/templates/trellis/scripts/task.py
  • packages/cli/test/commands/workflow.integration.test.ts
  • packages/cli/test/scripts/inject-workflow-state-kiro.integration.test.ts
  • packages/cli/test/templates/opencode.test.ts
  • packages/core/src/task/records.ts
  • packages/core/src/task/schema.ts
  • packages/core/test/task/records.test.ts
  • packages/core/test/task/schema.test.ts
💤 Files with no reviewable changes (22)
  • .trellis/tasks/07-23-per-task-workflow/task.json
  • .trellis/workspace/tommy/index.md
  • .trellis/tasks/07-23-per-task-workflow/check.jsonl
  • .trellis/tasks/07-23-per-task-workflow/prd.md
  • .trellis/workspace/tommy/journal-1.md
  • .trellis/tasks/07-23-per-task-workflow/design.md
  • packages/cli/src/templates/trellis/scripts/common/workflow_selection.py
  • packages/cli/src/templates/trellis/index.ts
  • packages/core/test/task/records.test.ts
  • .trellis/tasks/07-23-per-task-workflow/implement.jsonl
  • .trellis/tasks/07-23-per-task-workflow/implement.md
  • .trellis/scripts/common/types.py
  • .trellis/scripts/common/workflow_selection.py
  • packages/core/test/task/schema.test.ts
  • packages/cli/src/cli/index.ts
  • .trellis/scripts/task.py
  • packages/cli/src/templates/trellis/scripts/common/task_store.py
  • .trellis/scripts/common/task_store.py
  • packages/cli/src/templates/trellis/scripts/common/types.py
  • packages/cli/test/commands/workflow.integration.test.ts
  • packages/cli/src/templates/trellis/scripts/task.py
  • packages/cli/src/commands/workflow.ts

@taosu0216
taosu0216 merged commit c143c26 into main Jul 30, 2026
2 checks passed
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