refactor: deduplicate workspace committer role into shared module #12

Closed
xiaoju wants to merge 0 commits from chore/10-dedup-committer into master
Owner

What

Extracts the nearly-identical committer role from develop-sense and develop-workflow into a single shared module at workflows/_shared/workspace-committer.ts, parameterizing the two points of divergence (branch example and conventional commit scope hint).

Why

Both workflows had duplicate committer implementations (index.ts identical, prompt.ts differing in only two strings). This violates DRY and makes future changes error-prone (issue #10).

Changes

  • New workflows/_shared/workspace-committer.ts — shared committer role with conventionalCommitScopeHint and branchCheckoutExample parameters
  • Simplified develop-sense/roles/committer/index.ts and develop-workflow/roles/committer/index.ts to thin re-exports
  • Deleted duplicate prompt.ts from both workflows
  • Updated both build.ts to pass workflow-specific parameters
  • Updated both tsconfig.json to include ../_shared/**/*.ts
  • 9 files changed: +127 / −202 lines (net reduction)

Ref

#10

## What Extracts the nearly-identical committer role from `develop-sense` and `develop-workflow` into a single shared module at `workflows/_shared/workspace-committer.ts`, parameterizing the two points of divergence (branch example and conventional commit scope hint). ## Why Both workflows had duplicate committer implementations (`index.ts` identical, `prompt.ts` differing in only two strings). This violates DRY and makes future changes error-prone (issue #10). ## Changes - **New** `workflows/_shared/workspace-committer.ts` — shared committer role with `conventionalCommitScopeHint` and `branchCheckoutExample` parameters - **Simplified** `develop-sense/roles/committer/index.ts` and `develop-workflow/roles/committer/index.ts` to thin re-exports - **Deleted** duplicate `prompt.ts` from both workflows - **Updated** both `build.ts` to pass workflow-specific parameters - **Updated** both `tsconfig.json` to include `../_shared/**/*.ts` - 9 files changed: +127 / −202 lines (net reduction) ## Ref https://git.shazhou.work/xiaoju/nerve-workspace/issues/10
xiaoju added 1 commit 2026-04-29 11:13:56 +00:00
Extract shared buildWorkspaceCommitterRole into workflows/_shared/workspace-committer.ts
with parameterized conventionalCommitScopeHint and branchCheckoutExample.

Both develop-sense and develop-workflow committer/index.ts now re-export from the
shared module. Duplicate prompt.ts files removed.

Fixes #10
xiaoju closed this pull request 2026-04-29 11:16:13 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xiaoju/nerve-workspace#12
No description provided.