feat(start-work): add plan name normalization and quote stripping
- Add WRAPPING_QUOTES_PATTERN to parse-user-request.ts to strip quotes from plan names
- Add normalizePlanLookupValue() to context-info-builder.ts for slug normalization
- Enhanced findPlanByName() with normalized exact and partial matching
- Allows human-readable plan names (e.g., "my feature plan") to match slugged filenames (e.g., my-feature-plan.md)
🤖 Generated with OhMyOpenCode assistance
This commit is contained in:
@@ -50,6 +50,14 @@ describe("parseUserRequest", () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe("when plan name is wrapped in quotes", () => {
|
||||
test("#given quoted plan name #when parsing #then strips wrapping quotes", () => {
|
||||
const result = parseUserRequest("<user-request>\"my feature plan\"</user-request>")
|
||||
expect(result.planName).toBe("my feature plan")
|
||||
expect(result.explicitWorktreePath).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe("when --worktree flag has no path", () => {
|
||||
test("#given --worktree without path #when parsing #then worktree path is null", () => {
|
||||
const result = parseUserRequest("<user-request>--worktree</user-request>")
|
||||
|
||||
Reference in New Issue
Block a user