@champpaba/claude-agent-kit 1.6.0 → 1.7.0
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/.claude/CHANGELOG-v1.1.1.md +259 -259
- package/.claude/CLAUDE.md +21 -6
- package/.claude/agents/01-integration.md +1 -1
- package/.claude/agents/02-uxui-frontend.md +1 -1
- package/.claude/agents/03-test-debug.md +1 -1
- package/.claude/agents/04-frontend.md +1 -1
- package/.claude/agents/05-backend.md +1 -1
- package/.claude/agents/06-database.md +1 -1
- package/.claude/commands/agentsetup.md +1464 -1464
- package/.claude/commands/cdev.md +3 -4
- package/.claude/commands/csetup.md +82 -3
- package/.claude/commands/cstatus.md +60 -60
- package/.claude/commands/cview.md +364 -364
- package/.claude/commands/psetup.md +101 -101
- package/.claude/contexts/design/accessibility.md +611 -611
- package/.claude/contexts/design/layout.md +400 -400
- package/.claude/contexts/design/responsive.md +551 -551
- package/.claude/contexts/design/shadows.md +522 -522
- package/.claude/contexts/design/typography.md +465 -465
- package/.claude/contexts/domain/README.md +164 -164
- package/.claude/contexts/patterns/agent-coordination.md +388 -388
- package/.claude/contexts/patterns/agent-discovery.md +182 -182
- package/.claude/contexts/patterns/change-workflow.md +538 -538
- package/.claude/contexts/patterns/code-standards.md +515 -515
- package/.claude/contexts/patterns/development-principles.md +513 -513
- package/.claude/contexts/patterns/error-handling.md +478 -478
- package/.claude/contexts/patterns/error-recovery.md +365 -365
- package/.claude/contexts/patterns/logging.md +424 -424
- package/.claude/contexts/patterns/task-breakdown.md +452 -452
- package/.claude/contexts/patterns/task-classification.md +523 -523
- package/.claude/contexts/patterns/tdd-classification.md +516 -516
- package/.claude/contexts/patterns/testing.md +413 -413
- package/.claude/contexts/patterns/validation-framework.md +776 -776
- package/.claude/lib/agent-executor.md +450 -1
- package/.claude/lib/agent-router.md +572 -572
- package/.claude/lib/detailed-guides/agent-system.md +11 -9
- package/.claude/lib/detailed-guides/incremental-testing.md +460 -0
- package/.claude/lib/flags-updater.md +469 -469
- package/.claude/lib/task-analyzer.md +398 -2
- package/.claude/lib/tdd-classifier.md +345 -345
- package/.claude/lib/validation-gates.md +484 -484
- package/.claude/settings.local.json +42 -42
- package/.claude/templates/context-template.md +45 -45
- package/.claude/templates/flags-template.json +42 -42
- package/.claude/templates/phase-templates.json +173 -124
- package/.claude/templates/phases-sections/accessibility-test.md +17 -17
- package/.claude/templates/phases-sections/api-design.md +37 -37
- package/.claude/templates/phases-sections/backend-tests.md +16 -16
- package/.claude/templates/phases-sections/backend.md +37 -37
- package/.claude/templates/phases-sections/business-logic-validation.md +16 -16
- package/.claude/templates/phases-sections/component-tests.md +17 -17
- package/.claude/templates/phases-sections/contract-backend.md +16 -16
- package/.claude/templates/phases-sections/contract-frontend.md +16 -16
- package/.claude/templates/phases-sections/database.md +35 -35
- package/.claude/templates/phases-sections/documentation.md +17 -17
- package/.claude/templates/phases-sections/e2e-tests.md +16 -16
- package/.claude/templates/phases-sections/fix-implementation.md +17 -17
- package/.claude/templates/phases-sections/frontend-integration.md +18 -18
- package/.claude/templates/phases-sections/frontend-mockup.md +123 -123
- package/.claude/templates/phases-sections/manual-flow-test.md +15 -15
- package/.claude/templates/phases-sections/manual-ux-test.md +16 -16
- package/.claude/templates/phases-sections/refactor-implementation.md +17 -17
- package/.claude/templates/phases-sections/refactor.md +16 -16
- package/.claude/templates/phases-sections/regression-tests.md +15 -15
- package/.claude/templates/phases-sections/report.md +16 -16
- package/.claude/templates/phases-sections/responsive-test.md +16 -16
- package/.claude/templates/phases-sections/script-implementation.md +43 -43
- package/.claude/templates/phases-sections/test-coverage.md +16 -16
- package/.claude/templates/phases-sections/user-approval.md +14 -14
- package/LICENSE +21 -21
- package/README.md +171 -35
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Task Analyzer - TaskMaster-style Analysis
|
|
2
2
|
|
|
3
3
|
> **Enhanced task analysis for intelligent phase generation**
|
|
4
|
-
> **Version:** 1.
|
|
4
|
+
> **Version:** 1.4.0 (Incremental Testing Integration)
|
|
5
5
|
> **Used by:** `/csetup` command
|
|
6
6
|
|
|
7
7
|
---
|
|
@@ -15,6 +15,8 @@ Analyze tasks.md (from OpenSpec) and generate **intelligent task metadata** incl
|
|
|
15
15
|
- Research requirements
|
|
16
16
|
- Subtask breakdown recommendations
|
|
17
17
|
- Priority ranking
|
|
18
|
+
- **Incremental testing detection** (NEW in v1.4.0)
|
|
19
|
+
- **Milestone generation** (NEW in v1.4.0)
|
|
18
20
|
|
|
19
21
|
**Inspired by:** [claude-task-master](https://github.com/eyaltoledano/claude-task-master)
|
|
20
22
|
|
|
@@ -501,6 +503,357 @@ function getPriorityLabel(score: number): string {
|
|
|
501
503
|
|
|
502
504
|
---
|
|
503
505
|
|
|
506
|
+
### 7. Incremental Testing Detection
|
|
507
|
+
|
|
508
|
+
> **NEW in v1.4.0:** Automatic detection of tasks that require progressive validation
|
|
509
|
+
|
|
510
|
+
**Purpose:**
|
|
511
|
+
Identify high-risk/complex tasks that should be broken into milestones instead of being implemented all at once.
|
|
512
|
+
|
|
513
|
+
**Detection Logic:**
|
|
514
|
+
```typescript
|
|
515
|
+
function detectTestingStrategy(task: Task, metadata: TaskMetadata): TestingStrategy {
|
|
516
|
+
const { complexity, risk } = metadata
|
|
517
|
+
|
|
518
|
+
// Rule 1: HIGH risk always requires incremental testing
|
|
519
|
+
if (risk.level === 'HIGH') {
|
|
520
|
+
return {
|
|
521
|
+
type: 'incremental',
|
|
522
|
+
reason: `HIGH risk (${risk.score}/10) - Progressive validation required to catch issues early`
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// Rule 2: MEDIUM risk + High complexity
|
|
527
|
+
if (risk.level === 'MEDIUM' && complexity.score >= 7) {
|
|
528
|
+
return {
|
|
529
|
+
type: 'incremental',
|
|
530
|
+
reason: `MEDIUM risk + High complexity (${complexity.score}/10) - Incremental approach reduces debugging effort`
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// Rule 3: External API dependencies
|
|
535
|
+
if (hasExternalAPI(task)) {
|
|
536
|
+
return {
|
|
537
|
+
type: 'incremental',
|
|
538
|
+
reason: 'External API dependency - Test with small sample first to validate integration'
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// Rule 4: Data-intensive operations
|
|
543
|
+
if (isDataIntensive(task)) {
|
|
544
|
+
return {
|
|
545
|
+
type: 'incremental',
|
|
546
|
+
reason: 'Data-intensive operation - Scale testing from small to large dataset'
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// Default: Standard testing
|
|
551
|
+
return {
|
|
552
|
+
type: 'standard',
|
|
553
|
+
reason: 'Low risk, no external dependencies - Standard implementation approach'
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// Helper: Detect external API dependencies
|
|
558
|
+
function hasExternalAPI(task: Task): boolean {
|
|
559
|
+
const externalAPIs = [
|
|
560
|
+
'google', 'stripe', 'paypal', 'twilio', 'sendgrid',
|
|
561
|
+
'aws', 'azure', 'gcp', 'firebase', 'openai',
|
|
562
|
+
'third-party', 'external api', 'rest api', 'graphql api',
|
|
563
|
+
'oauth', 'saml', 'maps', 'payment gateway'
|
|
564
|
+
]
|
|
565
|
+
|
|
566
|
+
const taskLower = task.description.toLowerCase()
|
|
567
|
+
return externalAPIs.some(api => taskLower.includes(api))
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
// Helper: Detect data-intensive operations
|
|
571
|
+
function isDataIntensive(task: Task): boolean {
|
|
572
|
+
const dataIntensiveKeywords = [
|
|
573
|
+
'batch', 'bulk', 'import', 'export', 'migration',
|
|
574
|
+
'etl', 'thousands', 'large dataset', 'mass update',
|
|
575
|
+
'data transformation', 'sync', 'replicate'
|
|
576
|
+
]
|
|
577
|
+
|
|
578
|
+
const taskLower = task.description.toLowerCase()
|
|
579
|
+
return dataIntensiveKeywords.some(kw => taskLower.includes(kw))
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
**Output Examples:**
|
|
584
|
+
```
|
|
585
|
+
Task: "Integrate Google Maps API for store locator"
|
|
586
|
+
→ Strategy: INCREMENTAL (External API dependency)
|
|
587
|
+
|
|
588
|
+
Task: "Migrate 10,000 user records from legacy database"
|
|
589
|
+
→ Strategy: INCREMENTAL (Data-intensive operation)
|
|
590
|
+
|
|
591
|
+
Task: "Implement user login with JWT authentication"
|
|
592
|
+
→ Strategy: INCREMENTAL (HIGH risk - security critical)
|
|
593
|
+
|
|
594
|
+
Task: "Create simple contact form with validation"
|
|
595
|
+
→ Strategy: STANDARD (Low risk, no external deps)
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
### 8. Milestone Generation
|
|
601
|
+
|
|
602
|
+
> **NEW in v1.4.0:** Generate progressive validation milestones for incremental tasks
|
|
603
|
+
|
|
604
|
+
**Purpose:**
|
|
605
|
+
Break down incremental tasks into testable milestones that validate functionality from simple → complex.
|
|
606
|
+
|
|
607
|
+
**Generation Logic:**
|
|
608
|
+
```typescript
|
|
609
|
+
function generateMilestones(task: Task, metadata: TaskMetadata): Milestone[] {
|
|
610
|
+
const milestones: Milestone[] = []
|
|
611
|
+
const taskLower = task.description.toLowerCase()
|
|
612
|
+
const estimatedTime = metadata.estimatedTime.adjusted
|
|
613
|
+
|
|
614
|
+
// Pattern 1: Backend API Integration
|
|
615
|
+
if (hasExternalAPI(task) || taskLower.match(/api|integration|service/i)) {
|
|
616
|
+
milestones.push({
|
|
617
|
+
id: 1,
|
|
618
|
+
name: 'Core implementation (minimal viable)',
|
|
619
|
+
testScope: 'Single happy path (1 record, hardcoded input)',
|
|
620
|
+
exitCriteria: [
|
|
621
|
+
'Response status = 200 (or expected success code)',
|
|
622
|
+
'Data structure valid (matches expected schema)',
|
|
623
|
+
'Response time < 500ms',
|
|
624
|
+
'API authentication works (no 401/403 errors)'
|
|
625
|
+
],
|
|
626
|
+
estimatedTime: Math.ceil(estimatedTime * 0.3),
|
|
627
|
+
retryLimit: 2
|
|
628
|
+
})
|
|
629
|
+
|
|
630
|
+
milestones.push({
|
|
631
|
+
id: 2,
|
|
632
|
+
name: 'Parameterized query',
|
|
633
|
+
testScope: '10 records, dynamic user input',
|
|
634
|
+
exitCriteria: [
|
|
635
|
+
'Accepts dynamic input parameters',
|
|
636
|
+
'Returns correct results for all 10 test cases',
|
|
637
|
+
'No duplicate API calls (check request logs)',
|
|
638
|
+
'Response time < 700ms average'
|
|
639
|
+
],
|
|
640
|
+
estimatedTime: Math.ceil(estimatedTime * 0.3),
|
|
641
|
+
retryLimit: 2
|
|
642
|
+
})
|
|
643
|
+
|
|
644
|
+
milestones.push({
|
|
645
|
+
id: 3,
|
|
646
|
+
name: 'Error handling + edge cases',
|
|
647
|
+
testScope: 'Invalid input, API errors, timeouts, rate limits',
|
|
648
|
+
exitCriteria: [
|
|
649
|
+
'Invalid input handled gracefully (no crashes)',
|
|
650
|
+
'API errors caught and logged correctly',
|
|
651
|
+
'Timeout logic works (retry or fallback)',
|
|
652
|
+
'Rate limiting detected and handled',
|
|
653
|
+
'User-friendly error messages (no stack traces)'
|
|
654
|
+
],
|
|
655
|
+
estimatedTime: Math.ceil(estimatedTime * 0.2),
|
|
656
|
+
retryLimit: 2
|
|
657
|
+
})
|
|
658
|
+
|
|
659
|
+
milestones.push({
|
|
660
|
+
id: 4,
|
|
661
|
+
name: 'Scale + performance validation',
|
|
662
|
+
testScope: '100-1000 records, concurrent requests',
|
|
663
|
+
exitCriteria: [
|
|
664
|
+
'Response time < 2s for 100 records',
|
|
665
|
+
'No memory leaks under load',
|
|
666
|
+
'Pagination/batching works correctly (if applicable)',
|
|
667
|
+
'Caching reduces redundant API calls',
|
|
668
|
+
'No database connection exhaustion'
|
|
669
|
+
],
|
|
670
|
+
estimatedTime: Math.ceil(estimatedTime * 0.2),
|
|
671
|
+
retryLimit: 2
|
|
672
|
+
})
|
|
673
|
+
|
|
674
|
+
return milestones
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
// Pattern 2: Complex Form (architecture-first approach)
|
|
678
|
+
if (taskLower.match(/form|survey|questionnaire|wizard/i) && metadata.complexity.score >= 7) {
|
|
679
|
+
milestones.push({
|
|
680
|
+
id: 1,
|
|
681
|
+
name: 'Form architecture + skeleton',
|
|
682
|
+
testScope: 'Full structure with 2-3 critical fields only',
|
|
683
|
+
exitCriteria: [
|
|
684
|
+
'Multi-step logic works (if applicable)',
|
|
685
|
+
'Validation framework integrated',
|
|
686
|
+
'State management clear (React Hook Form, Formik, etc.)',
|
|
687
|
+
'Navigation between steps functional',
|
|
688
|
+
'Architecture supports scaling to full field count'
|
|
689
|
+
],
|
|
690
|
+
estimatedTime: Math.ceil(estimatedTime * 0.4),
|
|
691
|
+
retryLimit: 2
|
|
692
|
+
})
|
|
693
|
+
|
|
694
|
+
milestones.push({
|
|
695
|
+
id: 2,
|
|
696
|
+
name: 'End-to-end flow validation',
|
|
697
|
+
testScope: 'Submit minimal form → API → Database',
|
|
698
|
+
exitCriteria: [
|
|
699
|
+
'Data saved to database correctly',
|
|
700
|
+
'API contract validated (request/response format)',
|
|
701
|
+
'Success feedback shown to user',
|
|
702
|
+
'No console errors or warnings',
|
|
703
|
+
'Data retrieved correctly (read-after-write test)'
|
|
704
|
+
],
|
|
705
|
+
estimatedTime: Math.ceil(estimatedTime * 0.3),
|
|
706
|
+
retryLimit: 2
|
|
707
|
+
})
|
|
708
|
+
|
|
709
|
+
milestones.push({
|
|
710
|
+
id: 3,
|
|
711
|
+
name: 'Complete all fields + validation',
|
|
712
|
+
testScope: 'All fields + validation rules + accessibility',
|
|
713
|
+
exitCriteria: [
|
|
714
|
+
'All field validations work (required, format, custom)',
|
|
715
|
+
'No UX regressions (smooth transitions, no flickers)',
|
|
716
|
+
'Accessibility checklist passed (keyboard nav, ARIA labels)',
|
|
717
|
+
'Form submission with all fields succeeds',
|
|
718
|
+
'Error messages clear and actionable'
|
|
719
|
+
],
|
|
720
|
+
estimatedTime: Math.ceil(estimatedTime * 0.3),
|
|
721
|
+
retryLimit: 2
|
|
722
|
+
})
|
|
723
|
+
|
|
724
|
+
return milestones
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// Pattern 3: Database Migration / ETL
|
|
728
|
+
if (taskLower.match(/migrat|etl|import|batch|sync/i) || isDataIntensive(task)) {
|
|
729
|
+
milestones.push({
|
|
730
|
+
id: 1,
|
|
731
|
+
name: 'Dry-run with 10 records',
|
|
732
|
+
testScope: 'Test migration/ETL script on 10 sample records',
|
|
733
|
+
exitCriteria: [
|
|
734
|
+
'Data transforms correctly (validate output schema)',
|
|
735
|
+
'No data loss (record count matches)',
|
|
736
|
+
'Rollback mechanism works',
|
|
737
|
+
'Execution time reasonable (< 5s for 10 records)',
|
|
738
|
+
'Logs are clear and traceable'
|
|
739
|
+
],
|
|
740
|
+
estimatedTime: Math.ceil(estimatedTime * 0.25),
|
|
741
|
+
retryLimit: 2
|
|
742
|
+
})
|
|
743
|
+
|
|
744
|
+
milestones.push({
|
|
745
|
+
id: 2,
|
|
746
|
+
name: 'Scale to 100 records',
|
|
747
|
+
testScope: 'Validate performance and edge cases',
|
|
748
|
+
exitCriteria: [
|
|
749
|
+
'Completes within expected time (< 30s for 100 records)',
|
|
750
|
+
'Handles duplicates correctly (skip or merge)',
|
|
751
|
+
'Error logging works (failed records tracked)',
|
|
752
|
+
'Progress tracking accurate',
|
|
753
|
+
'Memory usage stable (no leaks)'
|
|
754
|
+
],
|
|
755
|
+
estimatedTime: Math.ceil(estimatedTime * 0.25),
|
|
756
|
+
retryLimit: 2
|
|
757
|
+
})
|
|
758
|
+
|
|
759
|
+
milestones.push({
|
|
760
|
+
id: 3,
|
|
761
|
+
name: 'Full dataset migration (staging)',
|
|
762
|
+
testScope: 'Migrate entire dataset on staging environment',
|
|
763
|
+
exitCriteria: [
|
|
764
|
+
'All records migrated successfully (100% completion)',
|
|
765
|
+
'Data integrity validated (checksums match)',
|
|
766
|
+
'No production impact (read-only or isolated)',
|
|
767
|
+
'Rollback plan tested and documented',
|
|
768
|
+
'Migration can be re-run safely (idempotent)'
|
|
769
|
+
],
|
|
770
|
+
estimatedTime: Math.ceil(estimatedTime * 0.5),
|
|
771
|
+
retryLimit: 2
|
|
772
|
+
})
|
|
773
|
+
|
|
774
|
+
return milestones
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
// Fallback: Generic incremental pattern (for unmatched patterns)
|
|
778
|
+
if (metadata.risk.level === 'HIGH' || metadata.complexity.score >= 8) {
|
|
779
|
+
milestones.push({
|
|
780
|
+
id: 1,
|
|
781
|
+
name: 'Core implementation (minimal)',
|
|
782
|
+
testScope: 'Basic functionality with simplest input',
|
|
783
|
+
exitCriteria: [
|
|
784
|
+
'Core logic works for happy path',
|
|
785
|
+
'No critical errors or crashes',
|
|
786
|
+
'Basic validation passes'
|
|
787
|
+
],
|
|
788
|
+
estimatedTime: Math.ceil(estimatedTime * 0.4),
|
|
789
|
+
retryLimit: 2
|
|
790
|
+
})
|
|
791
|
+
|
|
792
|
+
milestones.push({
|
|
793
|
+
id: 2,
|
|
794
|
+
name: 'Expand functionality + edge cases',
|
|
795
|
+
testScope: 'Full functionality with edge cases',
|
|
796
|
+
exitCriteria: [
|
|
797
|
+
'All features implemented',
|
|
798
|
+
'Edge cases handled correctly',
|
|
799
|
+
'Error handling comprehensive',
|
|
800
|
+
'Tests pass'
|
|
801
|
+
],
|
|
802
|
+
estimatedTime: Math.ceil(estimatedTime * 0.6),
|
|
803
|
+
retryLimit: 2
|
|
804
|
+
})
|
|
805
|
+
|
|
806
|
+
return milestones
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
// Should not reach here (detectTestingStrategy should filter)
|
|
810
|
+
return []
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
**Milestone Structure:**
|
|
815
|
+
```typescript
|
|
816
|
+
interface Milestone {
|
|
817
|
+
id: number // Sequential (1, 2, 3, ...)
|
|
818
|
+
name: string // Short description
|
|
819
|
+
testScope: string // What to test (clear, specific)
|
|
820
|
+
exitCriteria: string[] // Checklist to validate
|
|
821
|
+
estimatedTime: number // Minutes (derived from task estimate)
|
|
822
|
+
retryLimit: number // Always 2 (as confirmed)
|
|
823
|
+
}
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
**Output Example:**
|
|
827
|
+
```
|
|
828
|
+
Task: "Integrate Stripe payment processing"
|
|
829
|
+
→ Testing Strategy: INCREMENTAL (External API + HIGH risk)
|
|
830
|
+
→ Milestones: 4
|
|
831
|
+
|
|
832
|
+
Milestone 1: Core implementation (minimal viable)
|
|
833
|
+
Test Scope: Single happy path (1 record, hardcoded)
|
|
834
|
+
Exit Criteria:
|
|
835
|
+
- Response status = 200
|
|
836
|
+
- Data structure valid
|
|
837
|
+
- Response time < 500ms
|
|
838
|
+
- API authentication works
|
|
839
|
+
Estimated Time: 27 min
|
|
840
|
+
Retry Limit: 2
|
|
841
|
+
|
|
842
|
+
Milestone 2: Parameterized query
|
|
843
|
+
Test Scope: 10 records, dynamic input
|
|
844
|
+
Exit Criteria:
|
|
845
|
+
- Accepts dynamic input
|
|
846
|
+
- Returns correct results for all 10
|
|
847
|
+
- No duplicate API calls
|
|
848
|
+
- Response time < 700ms
|
|
849
|
+
Estimated Time: 27 min
|
|
850
|
+
Retry Limit: 2
|
|
851
|
+
|
|
852
|
+
... (Milestone 3 & 4)
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
---
|
|
856
|
+
|
|
504
857
|
## 📊 Output Format
|
|
505
858
|
|
|
506
859
|
### Enhanced Task Metadata
|
|
@@ -551,6 +904,22 @@ interface TaskMetadata {
|
|
|
551
904
|
adjusted: number // With buffer for complexity/risk
|
|
552
905
|
buffer: number // Percentage added
|
|
553
906
|
}
|
|
907
|
+
|
|
908
|
+
// NEW in v1.4.0: Incremental Testing
|
|
909
|
+
testingStrategy: {
|
|
910
|
+
type: 'standard' | 'incremental'
|
|
911
|
+
reason: string
|
|
912
|
+
milestones?: Milestone[] // Only if type = 'incremental'
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
interface Milestone {
|
|
917
|
+
id: number // Sequential (1, 2, 3, ...)
|
|
918
|
+
name: string // Short description
|
|
919
|
+
testScope: string // What to test (clear, specific)
|
|
920
|
+
exitCriteria: string[] // Checklist to validate
|
|
921
|
+
estimatedTime: number // Minutes (derived from task estimate)
|
|
922
|
+
retryLimit: number // Always 2
|
|
554
923
|
}
|
|
555
924
|
```
|
|
556
925
|
|
|
@@ -561,7 +930,7 @@ interface TaskMetadata {
|
|
|
561
930
|
**Integration Point: STEP 3.5 (after task detection, before template selection)**
|
|
562
931
|
|
|
563
932
|
```typescript
|
|
564
|
-
// STEP 3.5: Analyze Tasks (TaskMaster-style)
|
|
933
|
+
// STEP 3.5: Analyze Tasks (TaskMaster-style + Incremental Testing)
|
|
565
934
|
|
|
566
935
|
const tasks = parseTasksFromMd(tasksContent)
|
|
567
936
|
const analyzedTasks = []
|
|
@@ -575,6 +944,21 @@ for (const task of tasks) {
|
|
|
575
944
|
const subtasks = needsBreakdown ? generateSubtasks(task) : []
|
|
576
945
|
const priority = calculatePriority(task, { complexity, dependencies, risk })
|
|
577
946
|
|
|
947
|
+
// NEW: Detect testing strategy
|
|
948
|
+
const metadata = { complexity: { score: complexity }, risk, dependencies }
|
|
949
|
+
const testingStrategy = detectTestingStrategy(task, metadata)
|
|
950
|
+
|
|
951
|
+
// NEW: Generate milestones if incremental
|
|
952
|
+
let milestones = []
|
|
953
|
+
if (testingStrategy.type === 'incremental') {
|
|
954
|
+
const adjustedTime = adjustTimeForComplexity(task.estimatedTime, complexity, risk)
|
|
955
|
+
milestones = generateMilestones(task, {
|
|
956
|
+
...metadata,
|
|
957
|
+
complexity: { score: complexity, level: getComplexityLevel(complexity) },
|
|
958
|
+
estimatedTime: { adjusted: adjustedTime }
|
|
959
|
+
})
|
|
960
|
+
}
|
|
961
|
+
|
|
578
962
|
analyzedTasks.push({
|
|
579
963
|
...task,
|
|
580
964
|
complexity: {
|
|
@@ -598,6 +982,12 @@ for (const task of tasks) {
|
|
|
598
982
|
original: task.estimatedTime,
|
|
599
983
|
adjusted: adjustTimeForComplexity(task.estimatedTime, complexity, risk),
|
|
600
984
|
buffer: calculateBuffer(complexity, risk)
|
|
985
|
+
},
|
|
986
|
+
// NEW: Testing strategy
|
|
987
|
+
testingStrategy: {
|
|
988
|
+
type: testingStrategy.type,
|
|
989
|
+
reason: testingStrategy.reason,
|
|
990
|
+
milestones: milestones.length > 0 ? milestones : undefined
|
|
601
991
|
}
|
|
602
992
|
})
|
|
603
993
|
}
|
|
@@ -606,6 +996,8 @@ for (const task of tasks) {
|
|
|
606
996
|
analyzedTasks.sort((a, b) => b.priority.score - a.priority.score)
|
|
607
997
|
|
|
608
998
|
// Report analysis
|
|
999
|
+
const incrementalCount = analyzedTasks.filter(t => t.testingStrategy.type === 'incremental').length
|
|
1000
|
+
|
|
609
1001
|
output(`
|
|
610
1002
|
📊 Task Analysis Complete
|
|
611
1003
|
|
|
@@ -623,6 +1015,10 @@ Risk assessment:
|
|
|
623
1015
|
Research required: ${analyzedTasks.filter(t => t.research?.required).length} tasks
|
|
624
1016
|
|
|
625
1017
|
Subtask breakdown: ${analyzedTasks.filter(t => t.subtasks.length > 0).length} tasks expanded
|
|
1018
|
+
|
|
1019
|
+
🔄 Testing Strategy (NEW):
|
|
1020
|
+
- Incremental: ${incrementalCount} tasks (with milestones)
|
|
1021
|
+
- Standard: ${analyzedTasks.length - incrementalCount} tasks
|
|
626
1022
|
`)
|
|
627
1023
|
```
|
|
628
1024
|
|