claude-autopm 2.2.1 → 2.2.2

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.
@@ -612,57 +612,6 @@ async function prdValidate(argv) {
612
612
  }
613
613
  }
614
614
 
615
- /**
616
- * Main command handler
617
- * @param {Object} argv - Command arguments
618
- */
619
- async function handler(argv) {
620
- // Validate action
621
- const validActions = ['list', 'new', 'show', 'edit', 'status', 'parse', 'extract-epics', 'summarize', 'validate'];
622
-
623
- if (!validActions.includes(argv.action)) {
624
- console.error(chalk.red(`\nError: Unknown action: ${argv.action}`));
625
- console.error(chalk.yellow(`Valid actions: ${validActions.join(', ')}`));
626
- return;
627
- }
628
-
629
- // Route to appropriate handler
630
- try {
631
- switch (argv.action) {
632
- case 'list':
633
- await prdList(argv);
634
- break;
635
- case 'new':
636
- await prdNew(argv);
637
- break;
638
- case 'show':
639
- await prdShow(argv);
640
- break;
641
- case 'edit':
642
- await prdEdit(argv);
643
- break;
644
- case 'status':
645
- await prdStatus(argv);
646
- break;
647
- case 'parse':
648
- await prdParse(argv);
649
- break;
650
- case 'extract-epics':
651
- await prdExtractEpics(argv);
652
- break;
653
- case 'summarize':
654
- await prdSummarize(argv);
655
- break;
656
- case 'validate':
657
- await prdValidate(argv);
658
- break;
659
- }
660
- } catch (error) {
661
- // Global error handler for unexpected errors
662
- console.error(chalk.red(`\nUnexpected error: ${error.message}`));
663
- }
664
- }
665
-
666
615
  /**
667
616
  * Command builder - registers all subcommands
668
617
  * @param {Object} yargs - Yargs instance
@@ -676,7 +625,8 @@ function builder(yargs) {
676
625
  (yargs) => {
677
626
  return yargs
678
627
  .example('autopm prd list', 'Show all PRDs');
679
- }
628
+ },
629
+ prdList // Handler
680
630
  )
681
631
  .command(
682
632
  'new <name>',
@@ -694,7 +644,8 @@ function builder(yargs) {
694
644
  })
695
645
  .example('autopm prd new my-feature', 'Create PRD with wizard')
696
646
  .example('autopm prd new payment-api --template api-feature', 'Create PRD from template');
697
- }
647
+ },
648
+ prdNew // Handler
698
649
  )
699
650
  .command(
700
651
  'show <name>',
@@ -706,7 +657,8 @@ function builder(yargs) {
706
657
  type: 'string'
707
658
  })
708
659
  .example('autopm prd show my-feature', 'Display PRD content');
709
- }
660
+ },
661
+ prdShow // Handler
710
662
  )
711
663
  .command(
712
664
  'edit <name>',
@@ -719,7 +671,8 @@ function builder(yargs) {
719
671
  })
720
672
  .example('autopm prd edit my-feature', 'Open PRD in editor')
721
673
  .example('EDITOR=code autopm prd edit my-feature', 'Open PRD in VS Code');
722
- }
674
+ },
675
+ prdEdit // Handler
723
676
  )
724
677
  .command(
725
678
  'status <name>',
@@ -731,7 +684,8 @@ function builder(yargs) {
731
684
  type: 'string'
732
685
  })
733
686
  .example('autopm prd status my-feature', 'Show PRD status report');
734
- }
687
+ },
688
+ prdStatus // Handler
735
689
  )
736
690
  .command(
737
691
  'parse <name>',
@@ -752,7 +706,8 @@ function builder(yargs) {
752
706
  type: 'boolean',
753
707
  default: true
754
708
  });
755
- }
709
+ },
710
+ prdParse // Handler
756
711
  )
757
712
  .command(
758
713
  'extract-epics <name>',
@@ -768,7 +723,8 @@ function builder(yargs) {
768
723
  type: 'boolean',
769
724
  default: false
770
725
  });
771
- }
726
+ },
727
+ prdExtractEpics // Handler
772
728
  )
773
729
  .command(
774
730
  'summarize <name>',
@@ -784,7 +740,8 @@ function builder(yargs) {
784
740
  type: 'boolean',
785
741
  default: false
786
742
  });
787
- }
743
+ },
744
+ prdSummarize // Handler
788
745
  )
789
746
  .command(
790
747
  'validate <name>',
@@ -795,7 +752,8 @@ function builder(yargs) {
795
752
  describe: 'PRD name (without .md extension)',
796
753
  type: 'string'
797
754
  });
798
- }
755
+ },
756
+ prdValidate // Handler
799
757
  )
800
758
  .demandCommand(1, 'You must specify a PRD action')
801
759
  .strictCommands()
@@ -806,10 +764,27 @@ function builder(yargs) {
806
764
  * Command export
807
765
  */
808
766
  module.exports = {
809
- command: 'prd <action> [name]',
767
+ command: 'prd',
810
768
  describe: 'Manage PRD (Product Requirements Documents)',
811
769
  builder,
812
- handler,
770
+ handler: (argv) => {
771
+ // This is just for catching the base command without subcommand
772
+ if (!argv._.includes('prd') || argv._.length === 1) {
773
+ console.log(chalk.yellow('\nPlease specify a PRD command\n'));
774
+ console.log('Usage: autopm prd <command>\n');
775
+ console.log('Available commands:');
776
+ console.log(' list List all PRDs');
777
+ console.log(' new <name> Create new PRD');
778
+ console.log(' show <name> Display PRD');
779
+ console.log(' edit <name> Edit PRD');
780
+ console.log(' status <name> Show PRD status');
781
+ console.log(' parse <name> Parse PRD with AI');
782
+ console.log(' extract-epics <name> Extract epics');
783
+ console.log(' summarize <name> Generate summary');
784
+ console.log(' validate <name> Validate structure');
785
+ console.log('\nUse: autopm prd <command> --help for more info\n');
786
+ }
787
+ },
813
788
  handlers: {
814
789
  list: prdList,
815
790
  new: prdNew,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-autopm",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Autonomous Project Management Framework for Claude Code - Advanced AI-powered development automation",
5
5
  "main": "bin/autopm.js",
6
6
  "bin": {