refactor: simplify workspace committer — remove redundant parameters #17
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Simplify
createWorkspaceCommitterRolein_shared/workspace-committer.ts. The agent can infer workflow name, commit scope, and branch naming from the thread history — no need to pass them as parameters.Current signature
Target signature
Only
adapterandextractremain. Everything else the agent figures out from the thread.Changes
1.
_shared/workspace-committer.tsBuildWorkspaceCommitterDepstype (or reduce to justextract)nerveRoot,workflowName,conventionalCommitScopeHint,branchCheckoutExampleparametersnerve thread show <threadId>), infer the workflow context, and decide branch name / commit scope / message on its ownnerveRoot: get fromstart.meta.workdiror fall back toprocess.cwd(). The outer wrapper already setsstart.meta.workdir— but actually, since we are simplifying, just let the agent use the working directory it is started in (the engine already sets workdir via the adapter). Remove theinnerStartworkdir override hack.--authorprohibition in the prompt2. Prompt should be roughly
3. Update all callers
workflows/develop-sense/build.ts— changecreateWorkspaceCommitterRole(a("committer"), { extract, nerveRoot, ... })tocreateWorkspaceCommitterRole(a("committer"), extract)workflows/develop-workflow/build.ts— sameworkflows/develop-sense/roles/committer.ts— update re-export if type changedworkflows/develop-workflow/roles/committer.ts— sameworkflows/solve-issue/roles/committer/— if it uses the shared function, update too. If it has its own committer, apply same simplification.4. Verify
pnpm buildat repo root must pass