Skip to content

Parse prd defaults#33

Merged
eyaltoledano merged 5 commits intomainfrom
parse-prd-defaults
Mar 27, 2025
Merged

Parse prd defaults#33
eyaltoledano merged 5 commits intomainfrom
parse-prd-defaults

Conversation

@eyaltoledano
Copy link
Owner

@eyaltoledano eyaltoledano commented Mar 27, 2025

  • Adds .windsurfrules to the init package. It's composed of the 3 rules we currently package, and has been edited to be Windsurf specific. Rules are added in as sections. The init function will search for an existing .windsurfrules document, and if it finds it, it will append to it. Otherwise it will create it.

  • Fix tests using ES Module best practices instead of complex mocking

    • Replace Commander.js mocking with direct action handler testing
    • Resolve ES Module import/mock issues and function redeclaration errors
    • Fix circular reference issues with console.log spies
    • Properly setup mock functions with jest.fn() for method access
  • Improve parse-prd command functionality

    • Add default PRD path support (scripts/prd.txt) so you can just run task-master parse-prd and it will use the default PRD if it exists.
    • Improve error handling and user feedback
    • Enhance help text with more detailed information
  • Fix detectCamelCaseFlags implementation in utils.js yet again with more tests this time

    • Improve regex pattern to correctly detect camelCase flags
    • Skip flags already in kebab-case format
    • Enhance tests with proper test-specific implementations
  • Document testing best practices

    • Add comprehensive "Common Testing Pitfalls and Solutions" section to tests.mdc
    • Provide clear examples of correct testing patterns for ES modules
    • Document techniques for test isolation and mock organization
  • Fix issue with kebab-case validator incorrectly flagging single-word flags like --prompt.

  • Refactor detectCamelCaseFlags to properly handle all single-word flags. Update tests to verify correct behavior with single-word and camelCase flags.

  • Add support for alternative flag formats in init command (e.g., -my_name). This fixes a bug where users couldn't use the --prompt flag directly and had to use -p instead.

  • Adds and marks tasks 30 and 31 as done.

Closes #29
Closes #3

- Fix tests using ES Module best practices instead of complex mocking
  - Replace Commander.js mocking with direct action handler testing
  - Resolve ES Module import/mock issues and function redeclaration errors
  - Fix circular reference issues with console.log spies
  - Properly setup mock functions with jest.fn() for method access

- Improve parse-prd command functionality
  - Add default PRD path support (scripts/prd.txt) so you can just run `task-master parse-prd` and it will use the default PRD if it exists.
  - Improve error handling and user feedback
  - Enhance help text with more detailed information

- Fix detectCamelCaseFlags implementation in utils.js yet again with more tests this time
  - Improve regex pattern to correctly detect camelCase flags
  - Skip flags already in kebab-case format
  - Enhance tests with proper test-specific implementations

- Document testing best practices
  - Add comprehensive "Common Testing Pitfalls and Solutions" section to tests.mdc
  - Provide clear examples of correct testing patterns for ES modules
  - Document techniques for test isolation and mock organization
Fix issue with kebab-case validator incorrectly flagging single-word flags like --prompt. Refactor detectCamelCaseFlags to properly handle all single-word flags. Update tests to verify correct behavior with single-word and camelCase flags. Add support for alternative flag formats in init command (e.g., -my_name). This fixes a bug where users couldn't use the --prompt flag directly and had to use -p instead.
…djust based on the longest string in the column. But that's an overoptimization for now.
… rules we currently package, and has been edited to be Windsurf specific. Rules are added in as sections. The init function will search for an existing .windsurfrules document, and if it finds it, it will append to it. Otherwise it will create it.
@eyaltoledano eyaltoledano added bug Something isn't working enhancement New feature or request labels Mar 27, 2025
@eyaltoledano eyaltoledano self-assigned this Mar 27, 2025
@eyaltoledano eyaltoledano merged commit b85e59f into main Mar 27, 2025
@eyaltoledano eyaltoledano deleted the parse-prd-defaults branch March 27, 2025 01:28
ProdByBuddha pushed a commit to ProdByBuddha/claude-task-master that referenced this pull request Apr 9, 2025
eyaltoledano added a commit that referenced this pull request Nov 29, 2025
…logic

Address PR #1452 review comments from Crunchyman-ralph:

- Add AUTH_TIMEOUT_MS and MFA_MAX_ATTEMPTS constants to @tm/core
- Create shared auth-ui.ts with AuthCountdownTimer class and MFA utilities
- Refactor auth-guard.ts to use shared utilities (reduced duplication)
- Refactor auth.command.ts to use shared utilities and expose methods
- Simplify login.command.ts to delegate to AuthCommand (341→50 lines)
- Simplify logout.command.ts to delegate to AuthCommand (76→45 lines)
- Convert dynamic imports to static imports in scripts/init.js
- Convert dynamic import to static import in scripts/modules/ui.js

Fixes: #31, #32, #33, #17, #18, #44, #53 from PR review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPM Init with config flags Windsurf Implementation

1 participant