@the-bearded-bear/claude-craft 9.2.0 → 9.2.1-next.06bfe50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dev/i18n/base/Angular/rules/00-project-context.md.template +1 -1
- package/Dev/i18n/base/Angular/rules/03-coding-standards.md +17 -16
- package/Dev/i18n/base/Angular/rules/06-tooling.md +2 -2
- package/Dev/i18n/base/CSharp/rules/06-tooling.md +8 -6
- package/Dev/i18n/base/Common/hooks/scripts/block-dangerous-commands.sh +93 -48
- package/Dev/i18n/base/Common/hooks/scripts/guard-network.sh +58 -0
- package/Dev/i18n/base/Common/hooks/scripts/lib/hook-io.sh +181 -0
- package/Dev/i18n/base/Common/hooks/scripts/notify-slack.sh +21 -32
- package/Dev/i18n/base/Common/hooks/scripts/output-filter.sh +23 -0
- package/Dev/i18n/base/Common/hooks/scripts/output-size-hint.sh +19 -0
- package/Dev/i18n/base/Common/hooks/scripts/post-edit-lint.sh +29 -53
- package/Dev/i18n/base/Common/hooks/scripts/post-tool-failure.sh +50 -0
- package/Dev/i18n/base/Common/hooks/scripts/pre-commit-check.sh +59 -63
- package/Dev/i18n/base/Common/hooks/scripts/pre-compact.sh +52 -0
- package/Dev/i18n/base/Common/hooks/scripts/protect-sensitive-files.sh +16 -0
- package/Dev/i18n/base/Common/hooks/scripts/quality-gate.sh +49 -92
- package/Dev/i18n/base/Common/hooks/scripts/session-end.sh +51 -0
- package/Dev/i18n/base/Common/hooks/scripts/session-init.sh +45 -69
- package/Dev/i18n/base/Common/hooks/templates/examples/README.md +59 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/auto-format.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/block-dangerous-commands.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/context-reinject.json +28 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/output-filter.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/pre-compact.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/protect-files.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/security-block.json +18 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/stop-hook.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/examples/user-prompt-submit.json +16 -0
- package/Dev/i18n/base/Common/hooks/templates/hooks.default.json +72 -0
- package/Dev/i18n/base/Common/hooks/templates/{settings-hooks.json → hooks.full.json} +22 -23
- package/Dev/i18n/base/Common/hooks/templates/hooks.memory.json +62 -0
- package/Dev/i18n/base/Common/templates/AGENTS.md.template +1 -1
- package/Dev/i18n/base/Common/templates/settings.json.template +46 -0
- package/Dev/i18n/base/Flutter/rules/00-project-context.md.template +9 -9
- package/Dev/i18n/base/Laravel/checks/code-quality.md +1 -1
- package/Dev/i18n/base/Laravel/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Laravel/rules/06-tooling.md +10 -8
- package/Dev/i18n/base/Laravel/rules/07-testing-laravel.md +2 -0
- package/Dev/i18n/base/Laravel/rules/08-quality-tools.md +2 -2
- package/Dev/i18n/base/PHP/rules/00-project-context.md.template +2 -2
- package/Dev/i18n/base/Tauri/rules/02-architecture-tauri.md +1 -0
- package/Dev/i18n/base/Vercel/checks/all.md +1 -1
- package/Dev/i18n/base/Vercel/checks/architecture.md +1 -1
- package/Dev/i18n/base/Vercel/rules/02-architecture-vercel.md +4 -2
- package/Dev/i18n/base/Vercel/rules/06-tooling.md +7 -5
- package/Dev/i18n/base/Vercel/rules/11-security-vercel.md +1 -1
- package/Dev/i18n/base/Vite/rules/06-tooling.md +2 -1
- package/Dev/i18n/base/Vite/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/VueJS/rules/06-tooling.md +3 -3
- package/Dev/i18n/base/VueJS/rules/07-testing-vuejs.md +9 -8
- package/Dev/i18n/base/VueJS/rules/08-quality-tools.md +1 -1
- package/Dev/i18n/base/WordPress/checklists/new-feature.md +59 -0
- package/Dev/i18n/base/WordPress/checklists/pre-commit.md +125 -0
- package/Dev/i18n/base/WordPress/checks/all.md +257 -0
- package/Dev/i18n/base/WordPress/checks/architecture.md +157 -0
- package/Dev/i18n/base/WordPress/checks/code-quality.md +158 -0
- package/Dev/i18n/base/WordPress/checks/security.md +158 -0
- package/Dev/i18n/base/WordPress/checks/testing.md +157 -0
- package/Dev/i18n/base/WordPress/commands/check.md +28 -0
- package/Dev/i18n/base/WordPress/rules/00-project-context.md.template +169 -0
- package/Dev/i18n/base/WordPress/rules/02-architecture-wordpress.md +174 -0
- package/Dev/i18n/base/WordPress/rules/03-coding-standards.md +98 -0
- package/Dev/i18n/base/WordPress/rules/06-tooling.md +146 -0
- package/Dev/i18n/base/WordPress/rules/07-testing-wordpress.md +150 -0
- package/Dev/i18n/base/WordPress/rules/08-quality-tools.md +161 -0
- package/Dev/i18n/base/WordPress/rules/11-security-wordpress.md +175 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/REFERENCE.md +214 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/SKILL.md +40 -0
- package/Dev/i18n/base/WordPress/skills/woocommerce/checklist.md +66 -0
- package/Dev/i18n/base/WordPress/templates/block.md +235 -0
- package/Dev/i18n/base/WordPress/templates/plugin-bootstrap.md +215 -0
- package/Dev/i18n/base/WordPress/templates/rest-endpoint.md +246 -0
- package/Dev/i18n/de/Angular/CLAUDE.md.template +2 -1
- package/Dev/i18n/de/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/de/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/de/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/de/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/de/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/de/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/de/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/de/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/de/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/de/Common/rules/11-security.md +12 -12
- package/Dev/i18n/de/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/de/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/de/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/de/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/de/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/de/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/de/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/de/Paperclip/README.md +1 -1
- package/Dev/i18n/de/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/de/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/de/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/de/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/de/Python/checks/security.md +2 -2
- package/Dev/i18n/de/Python/checks/testing.md +2 -2
- package/Dev/i18n/de/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/de/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/de/Python/templates/repository.md +2 -2
- package/Dev/i18n/de/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/de/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/de/React/templates/component.md +11 -9
- package/Dev/i18n/de/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/de/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/de/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/de/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/de/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/de/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/de/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/de/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/de/Symfony/adr/README.md +1 -1
- package/Dev/i18n/de/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/de/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/de/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/de/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/de/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/de/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/de/Symfony/templates/README.md +1 -1
- package/Dev/i18n/de/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/de/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/de/Vercel/checks/all.md +1 -1
- package/Dev/i18n/de/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/de/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/de/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/de/WordPress/checks/all.md +242 -0
- package/Dev/i18n/de/WordPress/commands/check.md +28 -0
- package/Dev/i18n/de/Workflow/commands/start.md +1 -1
- package/Dev/i18n/en/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/en/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/en/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/en/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/en/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/en/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/en/Common/hooks/HOOKS-QUICKSTART.md +31 -43
- package/Dev/i18n/en/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/en/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/en/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/en/Common/rules/11-security.md +12 -12
- package/Dev/i18n/en/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/en/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/en/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/en/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/en/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/en/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/en/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/en/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/en/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/en/Paperclip/README.md +1 -1
- package/Dev/i18n/en/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/en/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/en/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/en/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/en/Python/checks/security.md +2 -2
- package/Dev/i18n/en/Python/checks/testing.md +2 -2
- package/Dev/i18n/en/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/en/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/en/Python/templates/repository.md +2 -2
- package/Dev/i18n/en/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/en/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/en/React/templates/component.md +11 -9
- package/Dev/i18n/en/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/02-architecture.md +4 -4
- package/Dev/i18n/en/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/en/ReactNative/rules/07-testing-reactnative.md +1 -1
- package/Dev/i18n/en/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/en/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/en/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/en/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/en/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/en/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/en/Symfony/adr/README.md +1 -1
- package/Dev/i18n/en/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/en/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/en/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/en/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/en/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/en/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/en/Symfony/templates/README.md +1 -1
- package/Dev/i18n/en/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/en/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/en/Vercel/checks/all.md +1 -1
- package/Dev/i18n/en/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/en/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/en/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/en/WordPress/checks/all.md +241 -0
- package/Dev/i18n/en/WordPress/commands/check.md +28 -0
- package/Dev/i18n/en/Workflow/commands/start.md +1 -1
- package/Dev/i18n/es/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/es/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/es/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/es/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/es/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/es/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/es/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/es/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/es/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/es/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/es/Common/rules/11-security.md +12 -12
- package/Dev/i18n/es/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/es/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/es/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/es/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/es/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/es/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/es/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/es/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/es/Paperclip/README.md +1 -1
- package/Dev/i18n/es/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/es/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/es/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/es/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/es/Python/checks/security.md +2 -2
- package/Dev/i18n/es/Python/checks/testing.md +2 -2
- package/Dev/i18n/es/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/es/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/es/Python/templates/repository.md +2 -2
- package/Dev/i18n/es/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/es/React/templates/component.md +11 -9
- package/Dev/i18n/es/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/es/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/es/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/es/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/es/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/es/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/es/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/es/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/es/Symfony/adr/README.md +1 -1
- package/Dev/i18n/es/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/es/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/es/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/es/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/es/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/es/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/es/Symfony/templates/README.md +1 -1
- package/Dev/i18n/es/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/es/Vercel/agents/vercel-reviewer.md +2 -1
- package/Dev/i18n/es/Vercel/checks/all.md +1 -1
- package/Dev/i18n/es/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/es/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/es/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/es/WordPress/checks/all.md +241 -0
- package/Dev/i18n/es/WordPress/commands/check.md +28 -0
- package/Dev/i18n/es/Workflow/commands/start.md +1 -1
- package/Dev/i18n/fr/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/fr/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/fr/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/fr/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/fr/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/fr/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/fr/Common/hooks/HOOKS-QUICKSTART.md +32 -44
- package/Dev/i18n/fr/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/fr/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/fr/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/fr/Common/rules/11-security.md +12 -12
- package/Dev/i18n/fr/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/fr/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/fr/Flutter/rules/02-architecture.md +4 -4
- package/Dev/i18n/fr/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/fr/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/fr/Laravel/CLAUDE.md.template +1 -1
- package/Dev/i18n/fr/Laravel/agents/laravel-reviewer.md +3 -3
- package/Dev/i18n/fr/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/fr/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/fr/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/fr/Paperclip/README.md +1 -1
- package/Dev/i18n/fr/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/fr/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/fr/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/fr/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/fr/Python/checks/security.md +2 -2
- package/Dev/i18n/fr/Python/checks/testing.md +2 -2
- package/Dev/i18n/fr/Python/commands/dependency-audit.md +1 -2
- package/Dev/i18n/fr/Python/commands/generate-endpoint.md +7 -11
- package/Dev/i18n/fr/Python/commands/generate-model.md +6 -6
- package/Dev/i18n/fr/Python/rules/02-architecture.md +9 -24
- package/Dev/i18n/fr/Python/rules/03-coding-standards.md +19 -7
- package/Dev/i18n/fr/Python/templates/repository.md +9 -10
- package/Dev/i18n/fr/React/commands/generate-component.md +52 -51
- package/Dev/i18n/fr/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/fr/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/fr/React/templates/component.md +11 -9
- package/Dev/i18n/fr/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/fr/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/fr/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/fr/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/fr/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/fr/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/fr/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/fr/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/fr/Symfony/adr/README.md +1 -1
- package/Dev/i18n/fr/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/fr/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/fr/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/fr/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/fr/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/fr/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/fr/Symfony/templates/README.md +1 -1
- package/Dev/i18n/fr/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/fr/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/fr/Vercel/checks/all.md +1 -1
- package/Dev/i18n/fr/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/fr/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/fr/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/fr/WordPress/checks/all.md +242 -0
- package/Dev/i18n/fr/WordPress/commands/check.md +28 -0
- package/Dev/i18n/fr/Workflow/commands/start.md +1 -1
- package/Dev/i18n/pt/Angular/CLAUDE.md.template +3 -2
- package/Dev/i18n/pt/Angular/agents/angular-reviewer.md +23 -7
- package/Dev/i18n/pt/Common/agents/devops-engineer.md +1 -1
- package/Dev/i18n/pt/Common/agents/migration-specialist.md +1 -1
- package/Dev/i18n/pt/Common/commands/ralph-run.md +3 -3
- package/Dev/i18n/pt/Common/commands/setup-rtk.md +2 -9
- package/Dev/i18n/pt/Common/hooks/HOOKS-QUICKSTART.md +33 -45
- package/Dev/i18n/pt/Common/rules/04-solid-principles.md +2 -2
- package/Dev/i18n/pt/Common/rules/09-git-workflow.md +7 -1
- package/Dev/i18n/pt/Common/rules/10-documentation.md +2 -2
- package/Dev/i18n/pt/Common/rules/11-security.md +12 -12
- package/Dev/i18n/pt/Common/rules/12-context-management.md +5 -3
- package/Dev/i18n/pt/Flutter/commands/analyze-performance.md +1 -1
- package/Dev/i18n/pt/Flutter/rules/06-tooling.md +6 -2
- package/Dev/i18n/pt/Flutter/rules/11-security-flutter.md +1 -1
- package/Dev/i18n/pt/Laravel/agents/laravel-reviewer.md +2 -2
- package/Dev/i18n/pt/PHP/rules/03-coding-standards.md +10 -0
- package/Dev/i18n/pt/PHP/rules/06-tooling.md +7 -3
- package/Dev/i18n/pt/Paperclip/CLAUDE.md.template +2 -2
- package/Dev/i18n/pt/Paperclip/README.md +1 -1
- package/Dev/i18n/pt/Paperclip/checks/security.md +1 -0
- package/Dev/i18n/pt/Paperclip/rules/11-security-paperclip.md +3 -1
- package/Dev/i18n/pt/Python/agents/python-reviewer.md +1 -1
- package/Dev/i18n/pt/Python/checks/code-quality.md +4 -4
- package/Dev/i18n/pt/Python/checks/security.md +2 -2
- package/Dev/i18n/pt/Python/checks/testing.md +2 -2
- package/Dev/i18n/pt/Python/rules/02-architecture.md +1 -8
- package/Dev/i18n/pt/Python/rules/03-coding-standards.md +16 -5
- package/Dev/i18n/pt/Python/templates/repository.md +2 -2
- package/Dev/i18n/pt/React/rules/02-architecture.md +17 -20
- package/Dev/i18n/pt/React/rules/03-coding-standards.md +15 -16
- package/Dev/i18n/pt/React/templates/component.md +12 -10
- package/Dev/i18n/pt/ReactNative/agents/reactnative-reviewer.md +4 -4
- package/Dev/i18n/pt/ReactNative/rules/06-tooling.md +15 -14
- package/Dev/i18n/pt/ReactNative/rules/14-navigation.md +2 -0
- package/Dev/i18n/pt/Ruby/agents/ruby-reviewer.md +1 -1
- package/Dev/i18n/pt/Ruby/rules/06-tooling.md +2 -2
- package/Dev/i18n/pt/Ruby/rules/11-security-ruby.md +13 -1
- package/Dev/i18n/pt/Rust/rules/03-coding-standards.md +1 -1
- package/Dev/i18n/pt/Rust/rules/11-security-rust.md +1 -1
- package/Dev/i18n/pt/Symfony/adr/README.md +1 -1
- package/Dev/i18n/pt/Symfony/checks/code-quality.md +2 -2
- package/Dev/i18n/pt/Symfony/rules/03-coding-standards.md +15 -0
- package/Dev/i18n/pt/Symfony/rules/06-docker-hadolint.md +1 -1
- package/Dev/i18n/pt/Symfony/rules/08-quality-tools.md +1 -3
- package/Dev/i18n/pt/Symfony/rules/15-doctrine-extensions.md +5 -5
- package/Dev/i18n/pt/Symfony/rules/16-i18n.md +1 -1
- package/Dev/i18n/pt/Symfony/templates/README.md +1 -1
- package/Dev/i18n/pt/Tauri/agents/tauri-reviewer.md +3 -0
- package/Dev/i18n/pt/Vercel/agents/vercel-reviewer.md +1 -0
- package/Dev/i18n/pt/Vercel/checks/all.md +1 -1
- package/Dev/i18n/pt/Vite/agents/vite-reviewer.md +11 -11
- package/Dev/i18n/pt/WordPress/CLAUDE.md.template +100 -0
- package/Dev/i18n/pt/WordPress/agents/wordpress-reviewer.md +350 -0
- package/Dev/i18n/pt/WordPress/checks/all.md +241 -0
- package/Dev/i18n/pt/WordPress/commands/check.md +28 -0
- package/Dev/i18n/pt/Workflow/commands/start.md +1 -1
- package/Dev/scripts/check-config.sh +1 -1
- package/Dev/scripts/install-common-rules.sh +65 -0
- package/Dev/scripts/install-from-config.sh +3 -0
- package/Dev/scripts/install-paperclip-rules.sh +1 -1
- package/Dev/scripts/install-wordpress-rules.sh +153 -0
- package/Dev/scripts/lib/install-tech-common.sh +39 -39
- package/Dev/scripts/lib/merge-hooks.mjs +110 -0
- package/Dev/scripts/memory-lifecycle/README.md +10 -9
- package/Dev/scripts/memory-lifecycle/_db.sh +1 -1
- package/Dev/scripts/memory-lifecycle/post-tool.sh +1 -1
- package/Dev/scripts/memory-lifecycle/pre-compact.sh +5 -5
- package/Dev/scripts/memory-lifecycle/prompt-submit.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-end.sh +1 -1
- package/Dev/scripts/memory-lifecycle/session-start.sh +5 -4
- package/Dev/scripts/tcl-common.sh +23 -23
- package/Dev/stack-profiles/wordpress/permissions.txt +10 -0
- package/Dev/stack-profiles/wordpress/quality.md +4 -0
- package/Dev/stack-profiles/wordpress/stack.txt +2 -0
- package/Infra/i18n/de/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/de/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/de/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/de/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/de/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/de/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/de/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/de/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/de/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/de/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-architect.md +16 -14
- package/Infra/i18n/de/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/de/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/de/Hcloud/agents/hcloud-security.md +1 -1
- package/Infra/i18n/de/Hcloud/commands/architecture.md +2 -2
- package/Infra/i18n/de/Hcloud/commands/debug.md +3 -3
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/de/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/de/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/de/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/de/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/de/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/de/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/en/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/en/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/en/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/en/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/en/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/en/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/en/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/en/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/en/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/en/Hcloud/agents/hcloud-architect.md +10 -8
- package/Infra/i18n/en/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/en/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/en/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/en/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/en/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/en/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/en/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/en/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/es/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/es/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/es/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/es/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/es/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/es/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/es/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/es/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/es/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/es/Hcloud/agents/hcloud-architect.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/es/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/es/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/es/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/es/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/es/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/es/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/es/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/es/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/fr/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/fr/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/fr/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/fr/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/fr/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/fr/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/fr/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/fr/Hcloud/agents/hcloud-architect.md +7 -5
- package/Infra/i18n/fr/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/fr/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/fr/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/fr/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/fr/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/fr/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/fr/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-architect.md +3 -1
- package/Infra/i18n/pt/Ansible/agents/ansible-debug.md +1 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-deployment.md +3 -0
- package/Infra/i18n/pt/Ansible/agents/ansible-security.md +2 -0
- package/Infra/i18n/pt/Ansible/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/Coolify/agents/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/agents/coolify-deployment.md +5 -1
- package/Infra/i18n/pt/Coolify/commands/coolify-debug.md +1 -0
- package/Infra/i18n/pt/Coolify/commands/coolify-deploy.md +1 -0
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-architect.md +4 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-deployment.md +2 -2
- package/Infra/i18n/pt/FrankenPHP/agents/frankenphp-security.md +1 -1
- package/Infra/i18n/pt/FrankenPHP/commands/deploy-setup.md +1 -1
- package/Infra/i18n/pt/Hcloud/agents/hcloud-architect.md +9 -7
- package/Infra/i18n/pt/Hcloud/agents/hcloud-cost.md +11 -9
- package/Infra/i18n/pt/Hcloud/agents/hcloud-deployment.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/architecture.md +1 -1
- package/Infra/i18n/pt/Hcloud/commands/debug.md +1 -1
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-architect.md +4 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-deployment.md +31 -0
- package/Infra/i18n/pt/Kubernetes/agents/kubernetes-security.md +5 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-architect.md +3 -1
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-deployment.md +2 -2
- package/Infra/i18n/pt/OpenTofu/agents/opentofu-security.md +5 -5
- package/Infra/i18n/pt/OpenTofu/commands/security-audit.md +1 -1
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-architect.md +1 -0
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-deployment.md +3 -3
- package/Infra/i18n/pt/PgBouncer/agents/pgbouncer-monitoring.md +1 -1
- package/Infra/i18n/pt/PgBouncer/commands/deploy-setup.md +1 -1
- package/Infra/install-ansible-rules.sh +26 -26
- package/Infra/install-coolify-rules.sh +26 -26
- package/Infra/install-docker-rules.sh +26 -26
- package/Infra/install-frankenphp-rules.sh +26 -26
- package/Infra/install-hcloud-rules.sh +26 -26
- package/Infra/install-kubernetes-rules.sh +26 -26
- package/Infra/install-opentofu-rules.sh +26 -26
- package/Infra/install-pgbouncer-rules.sh +26 -26
- package/Project/i18n/de/templates/sprint-status.md +4 -0
- package/Project/i18n/en/templates/sprint-status.md +4 -0
- package/Project/i18n/es/templates/sprint-status.md +4 -0
- package/Project/i18n/fr/templates/sprint-status.md +4 -0
- package/Project/i18n/pt/templates/sprint-status.md +4 -0
- package/Project/install-project-commands.sh +9 -9
- package/Project/templates/sprint-status.yaml.template +4 -0
- package/README.md +32 -16
- package/Tools/PluginExport/export-plugin.sh +15 -17
- package/Tools/ProjectConfig/claude-projects.sh +2 -2
- package/Tools/RTK/install-rtk.sh +1 -1
- package/Tools/Ralph/README.md +17 -7
- package/Tools/Ralph/hooks/lib/ralph-common.sh +101 -0
- package/Tools/Ralph/hooks/pre-tool-context.sh +28 -0
- package/Tools/Ralph/hooks/session-restore.sh +94 -0
- package/Tools/Ralph/hooks/stop-dod-gate.sh +60 -0
- package/Tools/Ralph/lib/hooks-generator.sh +109 -93
- package/Tools/Ralph/lib/metrics-exporter.sh +3 -3
- package/Tools/Ralph/lib/parallel-manager.sh +1 -1
- package/Tools/Ralph/lib/recovery-engine.sh +2 -1
- package/Tools/Ralph/lib/sprint-conductor.sh +20 -7
- package/bundles/cursor/.cursorrules +11 -10
- package/bundles/windsurf/.windsurfrules +11 -10
- package/cli/index.js +1 -0
- package/cli/kanban/client/dist/assets/{BurndownView-B6D7QRcK.css → BurndownView-CnsZ1jie.css} +1 -1
- package/cli/kanban/client/dist/assets/BurndownView-s2wpjiqE.js +3 -0
- package/cli/kanban/client/dist/assets/DepsView-Bo8sRS7i.js +1 -0
- package/cli/kanban/client/dist/assets/DocsView-QjjjfhpV.js +1 -0
- package/cli/kanban/client/dist/assets/SprintsView-B4toxGc4.css +1 -0
- package/cli/kanban/client/dist/assets/SprintsView-BSh9XshU.js +1 -0
- package/cli/kanban/client/dist/assets/actions-D0g4C88h.js +2 -0
- package/cli/kanban/client/dist/assets/de-CpCArOVg.js +1 -0
- package/cli/kanban/client/dist/assets/es-CnARpMvm.js +1 -0
- package/cli/kanban/client/dist/assets/fr-CIeAvktE.js +1 -0
- package/cli/kanban/client/dist/assets/index-BimcLpOz.css +1 -0
- package/cli/kanban/client/dist/assets/index-CdlYlxD5.js +2 -0
- package/cli/kanban/client/dist/assets/palette.svelte-BymgBiMI.js +1 -0
- package/cli/kanban/client/dist/assets/pt-Cs89lHuV.js +1 -0
- package/cli/kanban/client/dist/assets/router.svelte-CKx0fx-k.js +1 -0
- package/cli/kanban/client/dist/index.html +4 -2
- package/cli/kanban/client/src/App.svelte +212 -105
- package/cli/kanban/client/src/app.css +234 -62
- package/cli/kanban/client/src/components/Avatar.svelte +6 -4
- package/cli/kanban/client/src/components/CapacityBar.svelte +57 -0
- package/cli/kanban/client/src/components/CloseSprintDialog.svelte +114 -0
- package/cli/kanban/client/src/components/ConfirmDialog.svelte +125 -0
- package/cli/kanban/client/src/components/FilterBar.svelte +179 -0
- package/cli/kanban/client/src/components/KeyboardShortcuts.svelte +16 -0
- package/cli/kanban/client/src/components/MoveMenu.svelte +42 -0
- package/cli/kanban/client/src/components/NotFound.svelte +10 -0
- package/cli/kanban/client/src/components/Points.svelte +8 -2
- package/cli/kanban/client/src/components/PriorityChip.svelte +4 -1
- package/cli/kanban/client/src/components/ProgressRing.svelte +7 -4
- package/cli/kanban/client/src/components/PromptDialog.svelte +95 -54
- package/cli/kanban/client/src/components/SprintForm.svelte +189 -0
- package/cli/kanban/client/src/components/StoryCreateDialog.svelte +133 -0
- package/cli/kanban/client/src/components/StoryDetail.svelte +744 -76
- package/cli/kanban/client/src/components/StoryForm.svelte +340 -0
- package/cli/kanban/client/src/components/StoryRow.svelte +45 -0
- package/cli/kanban/client/src/components/TaskProgress.svelte +4 -2
- package/cli/kanban/client/src/components/TddPip.svelte +10 -8
- package/cli/kanban/client/src/components/Toasts.svelte +52 -0
- package/cli/kanban/client/src/components/TweaksPanel.svelte +86 -32
- package/cli/kanban/client/src/components/WipSettings.svelte +130 -0
- package/cli/kanban/client/src/lib/actions.js +49 -0
- package/cli/kanban/client/src/lib/announce.js +28 -0
- package/cli/kanban/client/src/lib/api.js +77 -0
- package/cli/kanban/client/src/lib/backlog.js +38 -4
- package/cli/kanban/client/src/lib/board-card.js +50 -0
- package/cli/kanban/client/src/lib/board-nav.js +111 -0
- package/cli/kanban/client/src/lib/burndown.js +15 -0
- package/cli/kanban/client/src/lib/config.js +8 -0
- package/cli/kanban/client/src/lib/deps-style.js +5 -2
- package/cli/kanban/client/src/lib/deps-table.js +51 -0
- package/cli/kanban/client/src/lib/detail.svelte.js +31 -23
- package/cli/kanban/client/src/lib/docs-tree.js +30 -0
- package/cli/kanban/client/src/lib/events.js +73 -8
- package/cli/kanban/client/src/lib/filter.js +68 -0
- package/cli/kanban/client/src/lib/health.svelte.js +19 -0
- package/cli/kanban/client/src/lib/i18n/index.svelte.js +73 -0
- package/cli/kanban/client/src/lib/i18n/locales/de.js +587 -0
- package/cli/kanban/client/src/lib/i18n/locales/en.js +588 -0
- package/cli/kanban/client/src/lib/i18n/locales/es.js +584 -0
- package/cli/kanban/client/src/lib/i18n/locales/fr.js +584 -0
- package/cli/kanban/client/src/lib/i18n/locales/pt.js +583 -0
- package/cli/kanban/client/src/lib/i18n/translate.js +86 -0
- package/cli/kanban/client/src/lib/icons.js +0 -5
- package/cli/kanban/client/src/lib/leave-guard.js +29 -0
- package/cli/kanban/client/src/lib/markdown.js +99 -0
- package/cli/kanban/client/src/lib/opener.js +12 -0
- package/cli/kanban/client/src/lib/optimistic.js +44 -0
- package/cli/kanban/client/src/lib/palette.svelte.js +10 -0
- package/cli/kanban/client/src/lib/points.js +6 -0
- package/cli/kanban/client/src/lib/query.js +92 -0
- package/cli/kanban/client/src/lib/router.svelte.js +70 -11
- package/cli/kanban/client/src/lib/shell.js +56 -0
- package/cli/kanban/client/src/lib/sprint-actions.svelte.js +151 -0
- package/cli/kanban/client/src/lib/sprint-plan.js +141 -0
- package/cli/kanban/client/src/lib/sprints.js +38 -1
- package/cli/kanban/client/src/lib/store.svelte.js +195 -78
- package/cli/kanban/client/src/lib/story-actions.svelte.js +236 -0
- package/cli/kanban/client/src/lib/story-form.js +205 -0
- package/cli/kanban/client/src/lib/toasts.js +84 -0
- package/cli/kanban/client/src/lib/tweaks.svelte.js +6 -9
- package/cli/kanban/client/src/lib/velocity.js +35 -0
- package/cli/kanban/client/src/lib/wip.js +17 -0
- package/cli/kanban/client/src/views/BacklogView.svelte +206 -91
- package/cli/kanban/client/src/views/BurndownView.svelte +203 -104
- package/cli/kanban/client/src/views/DepsView.svelte +176 -100
- package/cli/kanban/client/src/views/DocsView.svelte +170 -122
- package/cli/kanban/client/src/views/KanbanView.svelte +377 -356
- package/cli/kanban/client/src/views/SprintsView.svelte +313 -179
- package/cli/kanban/client/src/views.css +1518 -305
- package/cli/kanban/server/app.js +38 -241
- package/cli/kanban/server/cli-options.js +58 -0
- package/cli/kanban/server/middleware/security.js +28 -2
- package/cli/kanban/server/routes/http-errors.js +55 -0
- package/cli/kanban/server/routes/settings.js +24 -0
- package/cli/kanban/server/routes/sprints.js +364 -0
- package/cli/kanban/server/routes/stories.js +565 -0
- package/cli/kanban/server/services/event-bus.js +3 -2
- package/cli/kanban/server/services/file-scanner.js +2 -1
- package/cli/kanban/server/services/file-watcher.js +27 -10
- package/cli/kanban/server/services/file-writer.js +12 -58
- package/cli/kanban/server/services/frontmatter.js +44 -6
- package/cli/kanban/server/services/idempotency.js +77 -0
- package/cli/kanban/server/services/kanban-config.js +122 -0
- package/cli/kanban/server/services/lock.js +138 -0
- package/cli/kanban/server/services/markdown-metadata.js +27 -13
- package/cli/kanban/server/services/repository.js +268 -165
- package/cli/kanban/server/services/sprint-cache.js +24 -136
- package/cli/kanban/server/services/sprint-ops.js +223 -0
- package/cli/kanban/server/services/state-machine.js +8 -11
- package/cli/kanban/server/services/status-store.js +385 -0
- package/cli/kanban/server/services/story-files.js +282 -0
- package/cli/kanban/shared/ids.js +42 -0
- package/cli/kanban/shared/schemas.js +106 -12
- package/cli/kanban/shared/transitions.js +25 -0
- package/cli/lib/doctor.js +8 -7
- package/cli/lib/help.js +1 -0
- package/cli/lib/installer.js +3 -3
- package/cli/lib/kanban.js +11 -7
- package/cli/lib/parse-args.js +12 -0
- package/cli/lib/tech-registry.js +15 -5
- package/package.json +3 -1
- package/Dev/i18n/de/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/de/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/de/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/de/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/en/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/en/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/en/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/en/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/es/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/es/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/es/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/es/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/fr/Common/hooks/scripts/post-tool-failure.sh +0 -88
- package/Dev/i18n/fr/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/fr/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/fr/Common/templates/settings.json.template +0 -128
- package/Dev/i18n/pt/Common/hooks/scripts/post-tool-failure.sh +0 -89
- package/Dev/i18n/pt/Common/hooks/scripts/pre-compact.sh +0 -53
- package/Dev/i18n/pt/Common/hooks/scripts/session-end.sh +0 -98
- package/Dev/i18n/pt/Common/templates/settings.json.template +0 -128
- package/Tools/Ralph/.ralph/hooks/pre-tool-context.sh +0 -100
- package/Tools/Ralph/.ralph/hooks/session-restore.sh +0 -118
- package/Tools/Ralph/.ralph/hooks/status-injector.sh +0 -147
- package/Tools/Ralph/.ralph/hooks/stop-dod-gate.sh +0 -137
- package/cli/kanban/client/dist/assets/BurndownView-BBl1LOfu.js +0 -3
- package/cli/kanban/client/dist/assets/DepsView-D0N9Tg4d.css +0 -1
- package/cli/kanban/client/dist/assets/DepsView-DXREli3v.js +0 -1
- package/cli/kanban/client/dist/assets/DocsView--bhcgCS3.js +0 -1
- package/cli/kanban/client/dist/assets/DocsView-CBBzt7Ru.css +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-8AMci9M2.css +0 -1
- package/cli/kanban/client/dist/assets/SprintsView-CLKf2BTm.js +0 -1
- package/cli/kanban/client/dist/assets/index-DI89vrQ2.js +0 -4
- package/cli/kanban/client/dist/assets/index-DRj2q7mf.css +0 -1
- package/cli/kanban/client/src/lib/kanban-nav.js +0 -119
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
3
|
+
import { lstat, mkdir, open, readdir, readFile, rename, rm } from 'node:fs/promises';
|
|
4
|
+
import { Document, isMap, isScalar, isSeq, parseDocument, visit } from 'yaml';
|
|
5
|
+
import { SprintStatusSchema } from '../../shared/schemas.js';
|
|
6
|
+
import { STORY_ID_RE } from '../../shared/ids.js';
|
|
7
|
+
import { acquireLock, LockedError } from './lock.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Single write point of .bmad/sprint-status.yaml.
|
|
11
|
+
* Lock -> re-read -> validate -> mutate a `yaml` Document (comments, key order and
|
|
12
|
+
* flow/block style survive) -> re-validate the serialized text -> tmp + fsync + rename.
|
|
13
|
+
* Reads elsewhere in the server stay on js-yaml: every string we write is double-quoted
|
|
14
|
+
* unless it is a safe plain word, so js-yaml never reads back a Date or a boolean.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { LockedError };
|
|
18
|
+
|
|
19
|
+
export class ConflictError extends Error {
|
|
20
|
+
constructor(reason = 'conflict', current = null) {
|
|
21
|
+
super(`sprint-status.yaml conflict: ${reason}`);
|
|
22
|
+
this.code = 'CONFLICT';
|
|
23
|
+
this.reason = reason;
|
|
24
|
+
this.current = current;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** kind: missing | not_regular | too_large | syntax | schema | result */
|
|
29
|
+
export class InvalidStatusFileError extends Error {
|
|
30
|
+
constructor(kind, issues = []) {
|
|
31
|
+
super(`sprint-status.yaml is invalid (${kind})`);
|
|
32
|
+
this.code = 'SPRINT_STATUS_INVALID';
|
|
33
|
+
this.kind = kind;
|
|
34
|
+
this.issues = issues;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const MAX_BYTES = 5 * 1024 * 1024;
|
|
39
|
+
const STRINGIFY = { indent: 2, lineWidth: 0 };
|
|
40
|
+
const NODE_OPTS = { aliasDuplicateObjects: false };
|
|
41
|
+
const KEY_RE = /^[A-Za-z_][A-Za-z0-9_-]*$/;
|
|
42
|
+
const FORBIDDEN_KEYS = new Set(['__proto__', 'constructor', 'prototype']);
|
|
43
|
+
const SAFE_PLAIN = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
44
|
+
const RESERVED_PLAIN = /^(?:true|false|null|yes|no|on|off|y|n)$/i;
|
|
45
|
+
const STORY_HEAD = ['title', 'status', 'previous_status', 'sprint_id'];
|
|
46
|
+
// Shell writers chain several yq calls inside one lock section: wait ~2 s (50 x 40 ms), not lock.js's ~200 ms.
|
|
47
|
+
const LOCK_WAIT = { retries: 50, retryDelayMs: 40 };
|
|
48
|
+
const HISTORY_KEYS = ['timestamp', 'from', 'to', 'by', 'reason'];
|
|
49
|
+
|
|
50
|
+
const sha12 = (text) => createHash('sha1').update(text).digest('hex').slice(0, 12);
|
|
51
|
+
|
|
52
|
+
function sortedJson(value) {
|
|
53
|
+
if (Array.isArray(value)) return `[${value.map(sortedJson).join(',')}]`;
|
|
54
|
+
if (value && typeof value === 'object') {
|
|
55
|
+
// Code-unit order, as a bare .sort(): stable and locale-independent.
|
|
56
|
+
const keys = Object.keys(value).sort((a, b) => Number(a > b) - Number(a < b));
|
|
57
|
+
return `{${keys.map((k) => `${JSON.stringify(k)}:${sortedJson(value[k])}`).join(',')}}`;
|
|
58
|
+
}
|
|
59
|
+
return JSON.stringify(value ?? null);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @returns {string} sha1 (12 hex) of the key-sorted JSON of `value` */
|
|
63
|
+
export function revOf(value) {
|
|
64
|
+
return sha12(sortedJson(value));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// --- validation -------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
function assertKey(key) {
|
|
70
|
+
if (typeof key !== 'string' || !KEY_RE.test(key) || FORBIDDEN_KEYS.has(key)) {
|
|
71
|
+
throw new TypeError(`invalid key: ${JSON.stringify(key)}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function assertStoryId(id) {
|
|
76
|
+
if (typeof id !== 'string' || !STORY_ID_RE.test(id)) throw new TypeError(`invalid story id: ${JSON.stringify(id)}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function entriesOf(fields) {
|
|
80
|
+
if (!fields || typeof fields !== 'object' || Array.isArray(fields)) throw new TypeError('fields must be an object');
|
|
81
|
+
const entries = Object.entries(fields);
|
|
82
|
+
entries.forEach(([k]) => assertKey(k));
|
|
83
|
+
return entries;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function deepFreeze(value) {
|
|
87
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
88
|
+
Object.values(value).forEach(deepFreeze);
|
|
89
|
+
Object.freeze(value);
|
|
90
|
+
}
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Parses and validates; throws InvalidStatusFileError(syntaxKind | schemaKind). */
|
|
95
|
+
function parseChecked(text, syntaxKind, schemaKind) {
|
|
96
|
+
const doc = parseDocument(text, { uniqueKeys: true });
|
|
97
|
+
if (doc.errors.length)
|
|
98
|
+
throw new InvalidStatusFileError(
|
|
99
|
+
syntaxKind,
|
|
100
|
+
doc.errors.map(({ code, message }) => ({ code, message }))
|
|
101
|
+
);
|
|
102
|
+
let data;
|
|
103
|
+
try {
|
|
104
|
+
data = doc.toJS({ maxAliasCount: 100 });
|
|
105
|
+
} catch (err) {
|
|
106
|
+
throw new InvalidStatusFileError(syntaxKind, [{ code: 'ALIAS', message: err.message }]);
|
|
107
|
+
}
|
|
108
|
+
const result = SprintStatusSchema.safeParse(data);
|
|
109
|
+
if (!result.success) throw new InvalidStatusFileError(schemaKind, result.error.issues);
|
|
110
|
+
return { doc, data };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// --- node building ----------------------------------------------------------
|
|
114
|
+
|
|
115
|
+
/** One-line double quotes unless a plain word is safe: grep-based readers and js-yaml stay correct. */
|
|
116
|
+
function styleStrings(node, keepPlain = false) {
|
|
117
|
+
visit(node, {
|
|
118
|
+
Scalar(key, scalar) {
|
|
119
|
+
if (key === 'key' || typeof scalar.value !== 'string') return;
|
|
120
|
+
const plain = keepPlain && SAFE_PLAIN.test(scalar.value) && !RESERVED_PLAIN.test(scalar.value);
|
|
121
|
+
scalar.type = plain ? 'PLAIN' : 'QUOTE_DOUBLE';
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
return node;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function toNode(doc, value) {
|
|
128
|
+
const node = doc.createNode(value, NODE_OPTS);
|
|
129
|
+
if (isMap(node) || isSeq(node)) visit(node, { Collection: (_, c) => void (c.flow = false) });
|
|
130
|
+
return styleStrings(node);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function setField(doc, map, key, value) {
|
|
134
|
+
const cur = map.get(key, true);
|
|
135
|
+
if (isScalar(cur) && (value === null || typeof value !== 'object')) {
|
|
136
|
+
cur.value = value;
|
|
137
|
+
styleStrings(cur, cur.type === 'PLAIN');
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
map.set(key, toNode(doc, value));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Map at `key` of `parent`, created (block style) when absent. */
|
|
144
|
+
function childMap(doc, parent, key) {
|
|
145
|
+
let node = parent.get(key, true);
|
|
146
|
+
if (!isMap(node)) {
|
|
147
|
+
node = toNode(doc, {});
|
|
148
|
+
parent.set(key, node);
|
|
149
|
+
}
|
|
150
|
+
if (node.items.length === 0) node.flow = false;
|
|
151
|
+
return node;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// --- shell compatibility ----------------------------------------------------
|
|
155
|
+
|
|
156
|
+
const keyOf = (pair) => (isScalar(pair.key) ? pair.key.value : pair.key);
|
|
157
|
+
|
|
158
|
+
function isOneSafeLine(pair) {
|
|
159
|
+
const v = pair.value;
|
|
160
|
+
return (
|
|
161
|
+
isScalar(v) &&
|
|
162
|
+
!String(keyOf(pair)).includes('status') &&
|
|
163
|
+
!String(v.value).includes('status:') &&
|
|
164
|
+
!String(v.type).startsWith('BLOCK') &&
|
|
165
|
+
!pair.key?.commentBefore &&
|
|
166
|
+
!v.commentBefore &&
|
|
167
|
+
!v.comment
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Shell fallback: `grep -A 5 "^ <id>:" | grep "status:" | head -1`. If anything before
|
|
173
|
+
* `status` could match first (or push it past 5 lines), move `status` to the top of the story.
|
|
174
|
+
*/
|
|
175
|
+
function keepStatusGreppable(story) {
|
|
176
|
+
const i = story.items.findIndex((pair) => keyOf(pair) === 'status');
|
|
177
|
+
if (i <= 0 || (i <= 3 && story.items.slice(0, i).every(isOneSafeLine))) return;
|
|
178
|
+
story.items.unshift(...story.items.splice(i, 1));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// --- transaction ------------------------------------------------------------
|
|
182
|
+
|
|
183
|
+
function storyNode(doc, id) {
|
|
184
|
+
assertStoryId(id);
|
|
185
|
+
const node = doc.getIn(['stories', id], true);
|
|
186
|
+
if (!isMap(node)) throw new RangeError(`story ${id} not found`);
|
|
187
|
+
node.flow = false;
|
|
188
|
+
return node;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function orderedEntry(entry, head) {
|
|
192
|
+
const ordered = {};
|
|
193
|
+
for (const k of head) if (k in entry) ordered[k] = entry[k];
|
|
194
|
+
return Object.assign(ordered, entry);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function addStory(doc, id, entry) {
|
|
198
|
+
assertStoryId(id);
|
|
199
|
+
entriesOf(entry);
|
|
200
|
+
const stories = childMap(doc, doc.contents, 'stories');
|
|
201
|
+
if (stories.has(id)) throw new RangeError(`story ${id} already exists`);
|
|
202
|
+
const pair = doc.createPair(id, toNode(doc, orderedEntry(entry, STORY_HEAD)));
|
|
203
|
+
if (stories.items.at(-1)?.key?.spaceBefore) pair.key.spaceBefore = true;
|
|
204
|
+
keepStatusGreppable(pair.value);
|
|
205
|
+
stories.items.push(pair);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function appendHistory(doc, id, entry, now) {
|
|
209
|
+
const story = storyNode(doc, id);
|
|
210
|
+
entriesOf(entry);
|
|
211
|
+
const full = orderedEntry({ timestamp: now().toISOString(), by: 'kanban', reason: '', ...entry }, HISTORY_KEYS);
|
|
212
|
+
let history = story.get('history', true);
|
|
213
|
+
if (!isSeq(history)) {
|
|
214
|
+
history = toNode(doc, []);
|
|
215
|
+
story.set('history', history);
|
|
216
|
+
}
|
|
217
|
+
history.flow = false;
|
|
218
|
+
history.items.push(toNode(doc, full));
|
|
219
|
+
keepStatusGreppable(story);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Closed-sprint entry: story leaves stay one-liners (`{ status: done, points: 3 }`) like the hand-written ones. */
|
|
223
|
+
function setArchive(doc, id, entry) {
|
|
224
|
+
assertKey(id);
|
|
225
|
+
entriesOf(entry);
|
|
226
|
+
const archived = childMap(doc, doc.contents, 'archived_sprints');
|
|
227
|
+
const node = toNode(doc, entry);
|
|
228
|
+
const stories = node.get('stories', true);
|
|
229
|
+
if (isMap(stories)) stories.items.forEach((pair) => isMap(pair.value) && (pair.value.flow = true));
|
|
230
|
+
archived.set(id, node);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function makeTx(doc, data, now, version) {
|
|
234
|
+
return {
|
|
235
|
+
data: deepFreeze(data),
|
|
236
|
+
version,
|
|
237
|
+
setStory(id, fields) {
|
|
238
|
+
const node = storyNode(doc, id);
|
|
239
|
+
for (const [k, v] of entriesOf(fields)) setField(doc, node, k, v);
|
|
240
|
+
keepStatusGreppable(node);
|
|
241
|
+
},
|
|
242
|
+
addStory: (id, entry) => addStory(doc, id, entry),
|
|
243
|
+
removeStory(id) {
|
|
244
|
+
assertStoryId(id);
|
|
245
|
+
return doc.deleteIn(['stories', id]);
|
|
246
|
+
},
|
|
247
|
+
appendHistory: (id, entry) => appendHistory(doc, id, entry, now),
|
|
248
|
+
setMetadata(fields) {
|
|
249
|
+
const meta = childMap(doc, doc.contents, 'metadata');
|
|
250
|
+
for (const [k, v] of entriesOf(fields)) setField(doc, meta, k, v);
|
|
251
|
+
},
|
|
252
|
+
setArchive: (id, entry) => setArchive(doc, id, entry),
|
|
253
|
+
setRoot(key, value) {
|
|
254
|
+
assertKey(key);
|
|
255
|
+
setField(doc, doc.contents, key, value);
|
|
256
|
+
},
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// --- file I/O ---------------------------------------------------------------
|
|
261
|
+
|
|
262
|
+
async function lstatOrNull(file) {
|
|
263
|
+
try {
|
|
264
|
+
return await lstat(file);
|
|
265
|
+
} catch (err) {
|
|
266
|
+
if (err.code === 'ENOENT') return null;
|
|
267
|
+
throw err;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async function readSource(yamlPath, create) {
|
|
272
|
+
const st = await lstatOrNull(yamlPath);
|
|
273
|
+
if (!st) {
|
|
274
|
+
if (!create) throw new InvalidStatusFileError('missing');
|
|
275
|
+
const doc = new Document({ version: '1.0', metadata: {}, stories: {} });
|
|
276
|
+
return { doc, data: doc.toJS(), src: null, mode: 0o644 };
|
|
277
|
+
}
|
|
278
|
+
if (!st.isFile()) throw new InvalidStatusFileError('not_regular');
|
|
279
|
+
if (st.size > MAX_BYTES) throw new InvalidStatusFileError('too_large');
|
|
280
|
+
const src = await readFile(yamlPath, 'utf8');
|
|
281
|
+
return { ...parseChecked(src, 'syntax', 'schema'), src, mode: st.mode & 0o777 };
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function pidAlive(pid) {
|
|
285
|
+
try {
|
|
286
|
+
process.kill(pid, 0);
|
|
287
|
+
return true;
|
|
288
|
+
} catch (err) {
|
|
289
|
+
return err.code !== 'ESRCH';
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** Under the lock no cooperating writer is mid-write: tmp files of dead (or our own) pids are orphans. */
|
|
294
|
+
async function sweepOrphans(yamlPath) {
|
|
295
|
+
const prefix = `${path.basename(yamlPath)}.tmp-`;
|
|
296
|
+
for (const name of await readdir(path.dirname(yamlPath))) {
|
|
297
|
+
const pid = name.startsWith(prefix) ? Number.parseInt(name.slice(prefix.length), 10) : Number.NaN;
|
|
298
|
+
if (Number.isInteger(pid) && (pid === process.pid || !pidAlive(pid))) {
|
|
299
|
+
await rm(path.join(path.dirname(yamlPath), name), { force: true });
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** Catches a writer that ignored the lock (e.g. `yq -i`) between our read and our rename. */
|
|
305
|
+
async function assertUnchanged(yamlPath, src) {
|
|
306
|
+
const now = (await lstatOrNull(yamlPath)) ? await readFile(yamlPath, 'utf8') : null;
|
|
307
|
+
if (now !== src) throw new ConflictError('file_changed');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async function writeAtomic(yamlPath, text, src, mode) {
|
|
311
|
+
const tmp = `${yamlPath}.tmp-${process.pid}-${randomUUID()}`;
|
|
312
|
+
try {
|
|
313
|
+
const fd = await open(tmp, 'wx', mode);
|
|
314
|
+
try {
|
|
315
|
+
await fd.writeFile(text, 'utf8');
|
|
316
|
+
await fd.sync();
|
|
317
|
+
} finally {
|
|
318
|
+
await fd.close();
|
|
319
|
+
}
|
|
320
|
+
await assertUnchanged(yamlPath, src);
|
|
321
|
+
await rename(tmp, yamlPath);
|
|
322
|
+
} catch (err) {
|
|
323
|
+
await rm(tmp, { force: true });
|
|
324
|
+
throw err;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/** No `.bmad/` folder means no status file: the lock cannot even be created there. */
|
|
329
|
+
async function lockStatusFile(lockPath, ttlMs) {
|
|
330
|
+
try {
|
|
331
|
+
return await acquireLock(lockPath, { ttlMs, ...LOCK_WAIT });
|
|
332
|
+
} catch (err) {
|
|
333
|
+
if (err.code === 'ENOENT') throw new InvalidStatusFileError('missing');
|
|
334
|
+
throw err;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
async function runLocked(yamlPath, mutate, { now, lockTtlMs, create }) {
|
|
339
|
+
if (create) await mkdir(path.dirname(yamlPath), { recursive: true });
|
|
340
|
+
const lockPath = `${yamlPath}.lock`;
|
|
341
|
+
const release = await lockStatusFile(lockPath, lockTtlMs);
|
|
342
|
+
const started = Date.now();
|
|
343
|
+
try {
|
|
344
|
+
await sweepOrphans(yamlPath);
|
|
345
|
+
const { doc, data, src, mode } = await readSource(yamlPath, create);
|
|
346
|
+
await mutate(makeTx(doc, data, now, src === null ? null : sha12(src)));
|
|
347
|
+
const text = doc.toString(STRINGIFY);
|
|
348
|
+
const written = parseChecked(text, 'result', 'result').data;
|
|
349
|
+
// Past the TTL another process may have reclaimed the lock as stale: do not write.
|
|
350
|
+
if (Date.now() - started > lockTtlMs) throw new LockedError(lockPath);
|
|
351
|
+
await writeAtomic(yamlPath, text, src, mode);
|
|
352
|
+
return { data: written, version: sha12(text) };
|
|
353
|
+
} finally {
|
|
354
|
+
await release();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// In-process queue per file: the file lock alone only retries ~200 ms, so concurrent
|
|
359
|
+
// requests of this server would otherwise fail with LockedError instead of waiting.
|
|
360
|
+
const queues = new Map();
|
|
361
|
+
|
|
362
|
+
function enqueue(key, task) {
|
|
363
|
+
const run = (queues.get(key) ?? Promise.resolve()).then(task);
|
|
364
|
+
// `run` (returned) carries the failure to its caller; the tail only keeps the queue going for the next task.
|
|
365
|
+
const tail = run.catch(() => {});
|
|
366
|
+
queues.set(key, tail);
|
|
367
|
+
tail.then(() => queues.get(key) === tail && queues.delete(key));
|
|
368
|
+
return run;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* @param {string} projectRoot - parent of `.bmad/`
|
|
373
|
+
* @param {(tx: object) => (void|Promise<void>)} mutate - tx.data is a frozen snapshot read under the lock
|
|
374
|
+
* @param {{ now?: () => Date, lockTtlMs?: number, create?: boolean }} [opts]
|
|
375
|
+
* @returns {Promise<{ data: object, version: string }>} version = sha1 (12 hex) of the written text
|
|
376
|
+
* @throws {LockedError|ConflictError|InvalidStatusFileError}
|
|
377
|
+
*/
|
|
378
|
+
export async function mutateSprintStatus(
|
|
379
|
+
projectRoot,
|
|
380
|
+
mutate,
|
|
381
|
+
{ now = () => new Date(), lockTtlMs = 10_000, create = false } = {}
|
|
382
|
+
) {
|
|
383
|
+
const yamlPath = path.join(projectRoot, '.bmad', 'sprint-status.yaml');
|
|
384
|
+
return enqueue(yamlPath, () => runLocked(yamlPath, mutate, { now, lockTtlMs, create }));
|
|
385
|
+
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import { mkdir, open, readFile, rename, rm, stat } from 'node:fs/promises';
|
|
4
|
+
import { parseString } from './frontmatter.js';
|
|
5
|
+
import { stripComments } from './markdown-metadata.js';
|
|
6
|
+
import { acquireLock } from './lock.js';
|
|
7
|
+
import { MtimeMismatchError } from './file-writer.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Story markdown files: pure text helpers (render, patch the `## Metadata` list) and the few
|
|
11
|
+
* file operations the story routes need. Status is NEVER written to markdown: it lives in
|
|
12
|
+
* .bmad/sprint-status.yaml (tests/content/ssy-source-of-truth.test.mjs).
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const MAX_SLUG = 50;
|
|
16
|
+
const EMPTY = '—';
|
|
17
|
+
const MOSCOW = { must: 'Must', should: 'Should', could: 'Could', wont: 'Wont' };
|
|
18
|
+
|
|
19
|
+
const normalize = (s) =>
|
|
20
|
+
s
|
|
21
|
+
.normalize('NFD')
|
|
22
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
23
|
+
.toLowerCase()
|
|
24
|
+
.trim();
|
|
25
|
+
|
|
26
|
+
/** @returns {string} ASCII slug, 1..50 chars, no leading/trailing dash, never empty */
|
|
27
|
+
export function slugify(title) {
|
|
28
|
+
const slug = normalize(String(title ?? ''))
|
|
29
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
30
|
+
// Dash runs are already collapsed above: at most one dash at each end.
|
|
31
|
+
.replace(/^-/, '')
|
|
32
|
+
.slice(0, MAX_SLUG)
|
|
33
|
+
.replace(/-$/, '');
|
|
34
|
+
return slug || 'story';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** One line, no comment markers or control characters: user text cannot add or end structure. */
|
|
38
|
+
function oneLine(value) {
|
|
39
|
+
return String(value ?? '')
|
|
40
|
+
.replace(/<!--|--!?>/g, ' ')
|
|
41
|
+
.replace(/[\p{Cc}\p{Zl}\p{Zp}]/gu, ' ')
|
|
42
|
+
.replace(/\s+/g, ' ')
|
|
43
|
+
.trim();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const orDash = (value) => oneLine(value) || EMPTY;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Story file from the structure of Project/i18n/en/templates/user-story.md.
|
|
50
|
+
* No frontmatter and no status line.
|
|
51
|
+
*/
|
|
52
|
+
export function renderStoryMarkdown({
|
|
53
|
+
id,
|
|
54
|
+
title,
|
|
55
|
+
epic_id = null,
|
|
56
|
+
story_points = 0,
|
|
57
|
+
priority = 'should',
|
|
58
|
+
persona = '',
|
|
59
|
+
sprint_id = null,
|
|
60
|
+
date,
|
|
61
|
+
}) {
|
|
62
|
+
const who = oneLine(persona);
|
|
63
|
+
const lines = [
|
|
64
|
+
`# ${id}: ${oneLine(title) || id}`,
|
|
65
|
+
'',
|
|
66
|
+
'## Metadata',
|
|
67
|
+
`- **ID**: ${id}`,
|
|
68
|
+
`- **EPIC**: ${orDash(epic_id)}`,
|
|
69
|
+
`- **Sprint**: ${orDash(sprint_id)}`,
|
|
70
|
+
`- **Points**: ${Number(story_points) || 0}`,
|
|
71
|
+
`- **MoSCoW**: ${MOSCOW[priority] ?? MOSCOW.should}`,
|
|
72
|
+
...(who ? [`- **Persona**: ${who}`] : []),
|
|
73
|
+
`- **Created on**: ${oneLine(date)}`,
|
|
74
|
+
`- **Updated**: ${oneLine(date)}`,
|
|
75
|
+
'',
|
|
76
|
+
'## Traceability',
|
|
77
|
+
`- **Depends on**: ${EMPTY}`,
|
|
78
|
+
'',
|
|
79
|
+
'## User Story',
|
|
80
|
+
'',
|
|
81
|
+
`**As a** ${who || 'user'},`,
|
|
82
|
+
'**I want** …,',
|
|
83
|
+
'**so that** ….',
|
|
84
|
+
'',
|
|
85
|
+
'## Acceptance Criteria',
|
|
86
|
+
'',
|
|
87
|
+
'### AC-1',
|
|
88
|
+
'```gherkin',
|
|
89
|
+
'GIVEN …',
|
|
90
|
+
'WHEN …',
|
|
91
|
+
'THEN …',
|
|
92
|
+
'```',
|
|
93
|
+
'',
|
|
94
|
+
'## Notes',
|
|
95
|
+
'',
|
|
96
|
+
];
|
|
97
|
+
return lines.join('\n');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// --- `## Metadata` list ------------------------------------------------------
|
|
101
|
+
|
|
102
|
+
const SECTION_RE = /^##\s+(?:metadata|metadonnees|metadatos|metadaten|metadados)\s*$/;
|
|
103
|
+
const NEXT_HEADING_RE = /^#{1,2}\s/;
|
|
104
|
+
const ITEM_HEAD_RE = /^(\s*[-*]\s+\*\*)([^*]+)(\*\*\s*:)/;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* `- **Label**: value` → [prefix, label, separator, value, trailing whitespace], or null.
|
|
108
|
+
* Same groups as /^(\s*[-*]\s+\*\*)([^*]+?)(\*\*\s*:\s*)(.*?)(\s*)$/, in linear time.
|
|
109
|
+
*/
|
|
110
|
+
export function splitItem(line) {
|
|
111
|
+
const m = ITEM_HEAD_RE.exec(line);
|
|
112
|
+
if (!m) return null;
|
|
113
|
+
const rest = line.slice(m[0].length);
|
|
114
|
+
if (/[\n\r\u2028\u2029]/.test(rest.trim())) return null;
|
|
115
|
+
const value = rest.trim();
|
|
116
|
+
const lead = rest.length - rest.trimStart().length;
|
|
117
|
+
return [m[1], m[2], m[3] + rest.slice(0, lead), value, rest.slice(lead + value.length)];
|
|
118
|
+
}
|
|
119
|
+
const STATUS_LABELS = new Set(['status', 'statut', 'estado']);
|
|
120
|
+
|
|
121
|
+
const LABEL_KEYS = new Map([
|
|
122
|
+
['epic', 'epic'],
|
|
123
|
+
['sprint', 'sprint'],
|
|
124
|
+
...['points', 'puntos', 'punkte', 'pontos'].map((l) => [l, 'points']),
|
|
125
|
+
...['updated', 'mis a jour', 'actualizado', 'aktualisiert', 'atualizado'].map((l) => [l, 'updated']),
|
|
126
|
+
]);
|
|
127
|
+
|
|
128
|
+
const ADDED = { epic: 'EPIC', sprint: 'Sprint', points: 'Points', updated: 'Updated' };
|
|
129
|
+
|
|
130
|
+
const valueOf = (v) => (v === null ? EMPTY : oneLine(v) || EMPTY);
|
|
131
|
+
|
|
132
|
+
function sectionRange(lines) {
|
|
133
|
+
const start = lines.findIndex((l) => SECTION_RE.test(normalize(l)));
|
|
134
|
+
if (start < 0) return null;
|
|
135
|
+
const rest = lines.slice(start + 1).findIndex((l) => NEXT_HEADING_RE.test(l));
|
|
136
|
+
return { start, end: rest < 0 ? lines.length : start + 1 + rest };
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Updates (or appends) the `Points`, `EPIC`, `Sprint` and `Updated` lines of the `## Metadata`
|
|
141
|
+
* section and touches nothing else. `null` epic/sprint is written as an em dash. A text without
|
|
142
|
+
* the section is returned unchanged. Never writes a Status line.
|
|
143
|
+
* @param {string} text
|
|
144
|
+
* @param {{ points?: number, epic?: string|null, sprint?: string|null, updated?: string }} fields
|
|
145
|
+
*/
|
|
146
|
+
export function patchMetadataList(text, fields) {
|
|
147
|
+
const lines = text.split('\n');
|
|
148
|
+
const range = sectionRange(lines);
|
|
149
|
+
if (!range) return text;
|
|
150
|
+
const pending = new Map(Object.keys(ADDED).flatMap((k) => (fields[k] === undefined ? [] : [[k, fields[k]]])));
|
|
151
|
+
let last = range.start;
|
|
152
|
+
for (let i = range.start + 1; i < range.end; i++) {
|
|
153
|
+
const m = splitItem(lines[i]);
|
|
154
|
+
if (!m) continue;
|
|
155
|
+
last = i;
|
|
156
|
+
const key = LABEL_KEYS.get(normalize(m[1]));
|
|
157
|
+
if (!key || !pending.has(key)) continue;
|
|
158
|
+
lines[i] = `${m[0]}${m[1]}${m[2]}${valueOf(pending.get(key))}${m[4]}`;
|
|
159
|
+
pending.delete(key);
|
|
160
|
+
}
|
|
161
|
+
const cr = text.includes('\r\n') ? '\r' : '';
|
|
162
|
+
const added = Object.keys(ADDED)
|
|
163
|
+
.filter((k) => pending.has(k))
|
|
164
|
+
.map((k) => `- **${ADDED[k]}**: ${valueOf(pending.get(k))}${cr}`);
|
|
165
|
+
lines.splice(last + 1, 0, ...added);
|
|
166
|
+
return lines.join('\n');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* True when a list line carries a real status (`- **Status**: 🔴 To Do`). The pointer written by the
|
|
171
|
+
* templates (`- **Status**: tracked in .bmad/sprint-status.yaml`) is not a status.
|
|
172
|
+
*/
|
|
173
|
+
export function hasStatusLine(markdown) {
|
|
174
|
+
// Same view as the reader (markdown-metadata.js), which drops HTML comments first: `**Sta<!-- -->tus**`.
|
|
175
|
+
return stripComments(String(markdown ?? ''))
|
|
176
|
+
.split('\n')
|
|
177
|
+
.some((line) => {
|
|
178
|
+
const m = splitItem(line);
|
|
179
|
+
return !!m && STATUS_LABELS.has(normalize(m[1])) && !/sprint-status/i.test(m[3]);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// --- file operations ---------------------------------------------------------
|
|
184
|
+
|
|
185
|
+
async function writeAtomic(file, text) {
|
|
186
|
+
const tmp = `${file}.tmp-${process.pid}-${randomUUID()}`;
|
|
187
|
+
let mode = 0o644;
|
|
188
|
+
try {
|
|
189
|
+
mode = (await stat(file)).mode & 0o777;
|
|
190
|
+
} catch (err) {
|
|
191
|
+
if (err.code !== 'ENOENT') throw err;
|
|
192
|
+
}
|
|
193
|
+
try {
|
|
194
|
+
const fd = await open(tmp, 'wx', mode);
|
|
195
|
+
try {
|
|
196
|
+
await fd.writeFile(text, 'utf8');
|
|
197
|
+
await fd.sync();
|
|
198
|
+
} finally {
|
|
199
|
+
await fd.close();
|
|
200
|
+
}
|
|
201
|
+
await rename(tmp, file);
|
|
202
|
+
} catch (err) {
|
|
203
|
+
await rm(tmp, { force: true });
|
|
204
|
+
throw err;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** Lock + tmp + rename. */
|
|
209
|
+
export async function writeTextAtomic(file, text) {
|
|
210
|
+
const release = await acquireLock(`${file}.lock`);
|
|
211
|
+
try {
|
|
212
|
+
await writeAtomic(file, text);
|
|
213
|
+
} finally {
|
|
214
|
+
await release();
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** The new body would not be read back as the body: it opens a frontmatter (status included) in a file without one. */
|
|
219
|
+
export class BodyChangesFrontmatterError extends Error {
|
|
220
|
+
constructor() {
|
|
221
|
+
super('the markdown body would be read back as a frontmatter');
|
|
222
|
+
this.code = 'BODY_CHANGES_FRONTMATTER';
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Replaces the markdown BODY (what follows the frontmatter; the whole file when there is none),
|
|
228
|
+
* keeping the frontmatter byte for byte.
|
|
229
|
+
* @throws {MtimeMismatchError} when the file changed since `expectedMtime`
|
|
230
|
+
* @throws {BodyChangesFrontmatterError} when `markdown` would turn into (part of) a frontmatter
|
|
231
|
+
* @returns {Promise<{ mtime: number }>}
|
|
232
|
+
*/
|
|
233
|
+
export async function replaceBody(file, markdown, expectedMtime) {
|
|
234
|
+
const release = await acquireLock(`${file}.lock`);
|
|
235
|
+
try {
|
|
236
|
+
const actual = (await stat(file)).mtimeMs;
|
|
237
|
+
if (actual !== expectedMtime) throw new MtimeMismatchError(file, expectedMtime, actual);
|
|
238
|
+
const raw = await readFile(file, 'utf8');
|
|
239
|
+
const { body } = parseString(raw);
|
|
240
|
+
const next = raw.slice(0, raw.length - body.length) + markdown;
|
|
241
|
+
if (parseString(next).body !== markdown) throw new BodyChangesFrontmatterError();
|
|
242
|
+
await writeAtomic(file, next);
|
|
243
|
+
return { mtime: (await stat(file)).mtimeMs };
|
|
244
|
+
} finally {
|
|
245
|
+
await release();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/** Creates `file` (and its folder) only if absent. @throws {Error} code EEXIST when it already exists */
|
|
250
|
+
export async function createExclusive(file, text) {
|
|
251
|
+
await mkdir(path.dirname(file), { recursive: true });
|
|
252
|
+
const fd = await open(file, 'wx');
|
|
253
|
+
try {
|
|
254
|
+
await fd.writeFile(text, 'utf8');
|
|
255
|
+
} catch (err) {
|
|
256
|
+
await rm(file, { force: true });
|
|
257
|
+
throw err;
|
|
258
|
+
} finally {
|
|
259
|
+
await fd.close();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
async function exists(file) {
|
|
264
|
+
try {
|
|
265
|
+
await stat(file);
|
|
266
|
+
return true;
|
|
267
|
+
} catch (err) {
|
|
268
|
+
if (err.code === 'ENOENT') return false;
|
|
269
|
+
throw err;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/** Moves `file` to `<dir>/.trash/` (hidden: the scanner ignores it); an earlier trashed copy is kept. */
|
|
274
|
+
export async function trashFile(file) {
|
|
275
|
+
const trash = path.join(path.dirname(file), '.trash');
|
|
276
|
+
await mkdir(trash, { recursive: true });
|
|
277
|
+
const { name, ext } = path.parse(file);
|
|
278
|
+
let target = path.join(trash, `${name}${ext}`);
|
|
279
|
+
if (await exists(target)) target = path.join(trash, `${name}-${randomUUID().slice(0, 8)}${ext}`);
|
|
280
|
+
await rename(file, target);
|
|
281
|
+
return target;
|
|
282
|
+
}
|