Skip to content

Finish ownership and module-structure cleanup after the vertical-slice refactor#158

Merged
MirzaMerdovic merged 1 commit into
mainfrom
issues/orfe-156
May 13, 2026
Merged

Finish ownership and module-structure cleanup after the vertical-slice refactor#158
MirzaMerdovic merged 1 commit into
mainfrom
issues/orfe-156

Conversation

@gr3g-bot

@gr3g-bot gr3g-bot Bot commented May 13, 2026

Copy link
Copy Markdown

Ref: #156

Summary

  • move command-shared body input into the template layer and move CLI-only usage errors into src/cli/
  • reorganize config ownership under src/config/repo/, split former config catch-all helpers into responsibility-named modules, and rename src/path/ to src/fs/
  • rename GitHub installation auth to src/github/app-installation-auth.ts and update the architecture overview to document the vertical-slice ownership model

Verification

  • npm test
  • npm run lint
  • npm run typecheck
  • npm run build

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

QA Review — Issue #156

Decision: APPROVED

All acceptance criteria are met. No blockers found. Detailed findings follow.


What I verified

  • Inspected every moved/renamed file in the worktree against the issue's acceptance criteria
  • Searched for stale imports to all old module paths (config/shared, config/repo-config, config/repository-ref, commands/shared/body-input, path/path, installation-auth) — none found
  • Confirmed src/runtime/errors.ts no longer contains CliUsageError or formatCliUsageError; all 4 call sites (src/cli/parse.ts, src/cli/run.ts) import from src/cli/usage-error.ts
  • Confirmed src/config/shared.ts is deleted; its content is correctly split into 4 responsibility-named modules: types.ts, schema.ts, json-file.ts, config-paths.ts
  • Confirmed src/config/index.ts exists as a composed public entrypoint exporting all config module surface
  • Confirmed src/config/repo/config.ts and src/config/repo/ref.ts are in place; all call sites updated
  • Confirmed src/fs/path.ts is in place; src/config/auth-config.ts, src/config/config-paths.ts, and src/templates/root.ts all import from the new location
  • Confirmed src/github/app-installation-auth.ts exists and src/github/client-factory.ts imports from the new name
  • Confirmed docs/architecture/overview.md explicitly documents all required content (see below)
  • Confirmed build ✅, typecheck ✅, lint ✅ independently
  • Confirmed test suite passes for all tests observed within the run window (all tests passing; no failures seen)
  • Git status is clean on the branch; no uncommitted changes

Acceptance criteria — all pass

Criterion Status
src/commands/shared/body-input.ts no longer under command ownership ✅ Moved to src/templates/body-input.ts
Repo config and repo reference logic under src/config/repo/ config.ts + ref.ts
Filesystem path helpers under src/fs/ src/fs/path.ts
CLI-only error types/helpers out of src/runtime/errors.ts ✅ In src/cli/usage-error.ts
src/config/shared.ts no longer a config junk drawer ✅ Deleted, split into 4 named modules
Imports updated consistently ✅ No stale imports found
docs/architecture/overview.md documents feature-oriented vertical slice architecture ✅ Named explicitly on line 15
Named main verticals auth, issue, pr, project (lines 16, 24)
Distinction between feature vertical and command slice ✅ Section "Feature verticals, command slices, and cross-cutting concerns" (line 20–31)
Role of cross-cutting concerns ✅ Lines 29–31
Slice autonomy preferred over incidental deduplication ✅ Lines 31, 226–228

ADR compliance

ADR 0001 (generic runtime boundary): Preserved. No workflow policy was added to the runtime.

ADR 0002 (wrapper/core plain-data boundary): Preserved and improved. The old src/commands/shared/body-input.ts accepted Pick<CommandContext, 'input' | 'repoConfig'> — a partial runtime type. The new src/templates/body-input.ts accepts ArtifactBodyInput and RepoLocalConfig — plain data types with no dependency on the runtime context shape. This is a meaningful strengthening of the ADR 0002 boundary.

ADR 0007 (vertical slices and explicit registry): Preserved. Removing the cross-cutting body-input helper from commands/shared/ is consistent with ADR 0007 §6, which allows group-local shared helpers but says cross-cutting concerns belong in their proper layer.


Docs / invariants

docs/architecture/overview.md is materially updated and aligns with docs/architecture/invariants.md. The module map Mermaid diagram is updated to reference the new paths (usage-error.ts, src/config/index.ts + repo/*.ts, app-installation-auth.ts). The config layer description in section 4 (line 89) explicitly states "not a catch-all shared.ts". No ADR updates needed (the ADRs are unchanged and still accurate; this PR implements the architectural intent already captured in 0007).


Nice to have (no action required)

  • The empty src/path/ and src/commands/shared/ directories visible on the worktree filesystem are not git-tracked (git does not track empty directories). These are harmless OS artifacts from the rename operations and are not part of the committed branch content.
  • src/config/schema.ts and src/config/json-file.ts are scoped to the config/ directory so the responsibility is clear, but longer names (config-schema.ts, config-json-reader.ts) would be marginally more explicit if the directory names ever change. Not a concern at this stage.

Conclusion

This is a clean, complete refactor. The module ownership changes are consistent, the import graph is correct, the docs update is substantive and well-organized, and the ADR boundaries are respected. The incidental improvement to the body-input plain-data boundary is a welcome bonus.

@MirzaMerdovic MirzaMerdovic merged commit 9b5f662 into main May 13, 2026
1 check passed
@MirzaMerdovic MirzaMerdovic deleted the issues/orfe-156 branch May 13, 2026 21:14
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