Repository navigation
Require a software project before an issue starts; launch a task's session in its project folder - #4404
Merged
Conversation
…ssion in its project folder
mstomar125
force-pushed
the
issue-4394-project-before-start
branch
from
November 30, 2026 11:11
fff5d28 to
8df6318
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An issue cannot go
in_progresswithout a software project (its own or its direct parent task's), andnodespace session launch --tasknow runs in that project's folder.What changed
ISSUE_PROJECT_PLAY_ID), an invariant reject registered forissueonly. It refusesstatus = in_progressunlessnode.projectornode.child_of.projectis asoftware-project. A plain project does not satisfy it; one level up only; the message says what to link. Plain tasks are never checked. Seeded like the other rules, so a user can edit or switch it off. The title avoids the word "project" so a keyword search for a project does not hit it (same reason the decision gate Plays were retitled).LaunchSession(agent_session_service.rs): with a task and no--project, the folder is the task's own software project'scheckout_path, else its direct parent's. The task's own link wins. A named--projectstill decides. A plain task with neither launches in the private folder as today; an issue with neither is refused (failed_precondition, naming the missing link).--project/--taskand the generated skill CLI reference updated.workflow_seeds.rs,issue_and_software_project_test.rs). The "ready" search carries apermittedfilter, so an issue with no software project is no longer listed as ready, since it cannot be started. That follows from the rule and is asserted inready_tasks_lists_a_ready_issue.Shape change class
additive/seeded_content: one new seeded Play (seeded.e7c3b95a-...), change-log entryissue-project-play-seeded,current.jsonregenerated,shape:checkpasses. Nothing about the plan type or the decisionin_effectgates is touched. No dependency on the nested-checklist engine work: the rule readsnode.projectandnode.child_of.projectas main has them today.What a 0.3.14 daemon / Sync device does
playnode with CEL rules built from constructs 0.3.14 already evaluates (has,type_chain,node.project,node.child_of.project); it evaluates and enforces the rule like any user-authored Play. It has no seed entry for it, so it is neither reset nor re-created; it stays as written.--taskkeeps the old behaviour (private folder); no data is changed.Security-sensitive: no.
Tests and mutation checks
Play (
core_model_plays_test.rs, real engine):an_issue_with_no_software_project_cannot_start,an_issue_linked_to_a_software_project_can_start,an_issue_linked_only_to_a_plain_project_cannot_start,the_project_rule_reads_one_level_and_leaves_plain_tasks_alone. Mutations, each caught: accept any project (own link), accept any project (parent link), ignore the parent clause, ignore the own clause, guard the wrong status. Dropping a'task' in node.child_of.type_chainguard changed nothing, so it was removed.Daemon (
agent_session_service.rsunit tests): own project, parent fallback, own wins over parent, named project wins, issue refused with the message, plain task private folder. Mutations, each caught: accept plain project (after strengthening the test to assert the "not linked" message), no parent fallback, own link ignored, task beats named project, issue not refused, every task refused.ready_tasks_lists_a_ready_issueextension: mutating the Play condition tofalsefails it.Commands:
cargo testfor the modules above,bun run shape:check,bun run skill:gen,cargo clippy -D warningson core/daemon/agent/cli,cargo fmt --check, and the whole workspace nextest run (6687 passed).Notes: the implementing-a-task skill gets one wording sentence (see the agent-lane paragraph); an agent listing ready issues will simply not see unlinked ones.
Closes #4394
Review follow-ups
Sync carries the link. Since Sync 0.1.10 every relationship edge syncs, so the project link (the reverse of a software project's
tasks) reaches the other devices. An earlier revision of this PR said the link was per device; all of that text is removed (Play doc comment and refusal message, launch refusal,--taskhelp and the generated CLI reference, the implementing-a-task skill, the change-log summary, the test). Refusals now say what to do: link the issue (or its parent task) to a software project; the link syncs to your other devices. The rule re-pointing to an id property when the reference field lands is a separate item and is not part of this PR.Agent lane, for sign-off (wording only).
packages/agent/src/seeds/skills/implementing-a-task.md, STEP 1: one added sentence saying an issue linked to no software project, itself or through its parent task, is not on the ready list because it could not be started, and to link it to a software project first. No other agent file changed apart from tests that link their issues to a project.Creation bypass. The trigger is a status change, so an issue created already
in_progresswith no project is not refused; moving it away and back is. Stated in the Play doc comment and the change-log; pinned byan_issue_created_in_progress_without_a_project_is_not_refused.Missing checkout on the task route. The message gives the project id and says to launch once with
--project <id> --folder <path>.--folderis accepted with--taskwhen the task resolves a software project (stored on that project); otherwise refused.Ready list side effect. An issue with no software project drops out of the ready list, because the ready search only lists what the rules would allow to start.
Tests. Play: subtype satisfies the rule; an issue with no project link is refused and the message names the link and how to fix it (this test no longer pins any sync wording); creation in progress. Daemon: task launch with no folder, folder gone,
--folderwith--task, folder with nothing to belong to, two end-to-endlaunch_sessioncalls. Mutation checks: all earlier ones caught; for the changed test, rewording the fix sentence in the refusal fails it (and the no-project test). Not mutation-checked: the creation test (pins an absence of behaviour) and the CLI--folderguard.Checks run, passing:
bun run shape:gen/shape:check,bun run skill:gen, corecore_model_plays(47), coreissue_and_software_project(19), daemonagent_session_service(17), agentworkflow_seeds(26),cargo fmt --check, clippy-D warningson core, daemon and cli.bun run test:changedlast ran in full before this wording-only change and passed. Merge stays on hold.🤖 Generated with Claude Code