Skip to content

feat(hooks): feature-first .workbench resolver + injection (gated, type-first default)#43

Merged
vanducng merged 2 commits into
mainfrom
feat/feature-first-workbench
Jun 17, 2026
Merged

feat(hooks): feature-first .workbench resolver + injection (gated, type-first default)#43
vanducng merged 2 commits into
mainfrom
feat/feature-first-workbench

Conversation

@vanducng

Copy link
Copy Markdown
Owner

Feature-first .workbench/control-plane side (companion to skills#206).

What

  • hooks/lib/paths.cjs: feature identity resolver — extractTicketFromBranch, computeFeatureId (ticket-dedup, lowercased), resolveFeatureId (memoized, idempotent feature.json create), resolveFeatureRoot (gated), getGlobalPath/getArchivePath; path getters routed through it. Fix resolvePlanPath (anchor to main worktree, exact slug match, refuse ambiguity).
  • hooks/lib/config.cjs: paths.layout flag (default type-first), schemaVersion, plan.ticketPrefixes, getMainWorktreeConfig (layout/umbrella read from the main worktree).
  • session-init / subagent-init / dev-rules-reminder: inject VD_FEATURE_PATH/VD_GLOBAL_PATH/VD_ARCHIVE_PATH + a Feature: line — feature-first only.

Safety

Every addition is gated on paths.layout; default type-first is byte-identical to today (parity 19/19). Reversible (vd hooks rollback).

Tests

parity 19/19 · featurefirst 24 · inject 11 · resolveplanpath 7 · contract 2 · go build/go test ./... green.

vanducng added 2 commits June 17, 2026 10:14
Phases 0-2 of the feature-first restructure, all gated on paths.layout (default type-first, byte-identical). Fix resolvePlanPath (main-worktree anchor, exact slug match, refuse ambiguity); add layout/schemaVersion/ticketPrefixes config + getMainWorktreeConfig; add identity resolver (extractTicketFromBranch, resolveFeatureId, resolveFeatureRoot, get{Global,Archive}Path) routed through path getters; inject VD_FEATURE/GLOBAL/ARCHIVE_PATH + Feature: line. Tests: resolveplanpath 7, featurefirst 23, contract 2, inject 11; parity 19/19.
computeFeatureId lowercases the slug-only branch for parity with the ticket branch; export cleanSlug so the workbench CLI normalizes user slugs identically to branch resolution (idempotency contract). +mixed-case test.
@vanducng vanducng merged commit b47dac6 into main Jun 17, 2026
2 checks passed
@vanducng vanducng deleted the feat/feature-first-workbench branch June 17, 2026 04:55
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