{
  "feature": "enhancements",
  "version": "1.0.0",
  "project": "na-cli",
  "branchName": "feat/nax-dogfood-enhancements",
  "description": "Two small enhancements to na-cli: (A) a 'na list' command to discover available templates, and (E) smart package manager detection for 'na generate --install'.",
  "userStories": [
    {
      "id": "US-001",
      "title": "na list command shows all available templates",
      "description": "Add a 'na list' (alias: 'na ls') command that prints all available templates with their names and descriptions, so users don't need to run 'na generate' and pick from an interactive prompt just to discover what exists.\n\nExisting patterns to follow:\n- Look at src/index.ts for how commands are registered with yargs\n- Look at src/utils/template.ts for the TEMPLATE_NAME enum and template definitions\n- List output should be formatted: name (left-padded) + description column\n- Tests go in: test/list.test.ts (create test/ dir if needed)\n- Build: npm run build (compiles TypeScript to dist/)\n- No external dependencies — use only what's already installed",
      "acceptanceCriteria": [
        "AC1: 'na list' prints all template names from the TEMPLATE_NAME enum, one per line",
        "AC2: Each line shows template name and a short description (e.g. 'nestjs-api — NestJS REST API template')",
        "AC3: 'na ls' works as an alias for 'na list'",
        "AC4: Output is sorted alphabetically by template name",
        "AC5: Unit tests cover the list output format and alias"
      ],
      "complexity": "simple",
      "status": "passed",
      "contextFiles": [
        "src/index.ts",
        "src/utils/template.ts"
      ],
      "attempts": 0,
      "priorErrors": [],
      "escalations": [],
      "dependencies": [],
      "tags": [],
      "storyPoints": 1,
      "passes": true
    },
    {
      "id": "US-002",
      "title": "na generate --install detects correct package manager",
      "description": "The 'na generate --install' flag currently hardcodes 'npm install'. It should auto-detect the correct package manager from lockfiles in the generated project directory.\n\nDetection priority (highest to lowest):\n1. bun.lockb or bun.lock → bun install\n2. pnpm-lock.yaml → pnpm install\n3. yarn.lock → yarn install\n4. package-lock.json or none → npm install\n\nExisting patterns to follow:\n- Look at src/utils/template.ts for where 'npm install' is currently called (search for 'install')\n- Detection should happen AFTER template files are written (lockfile may be part of template)\n- Tests go in: test/package-manager.test.ts\n- Build: npm run build",
      "acceptanceCriteria": [
        "AC1: If generated project contains bun.lockb or bun.lock, runs 'bun install'",
        "AC2: If generated project contains pnpm-lock.yaml, runs 'pnpm install'",
        "AC3: If generated project contains yarn.lock, runs 'yarn install'",
        "AC4: Falls back to 'npm install' when no lockfile present",
        "AC5: Lockfile detection checks the target output directory (not cwd)",
        "AC6: Unit tests cover all four detection scenarios"
      ],
      "complexity": "simple",
      "status": "passed",
      "contextFiles": [
        "src/utils/template.ts",
        "src/index.ts"
      ],
      "attempts": 0,
      "priorErrors": [],
      "escalations": [],
      "dependencies": [],
      "tags": [],
      "storyPoints": 1,
      "passes": true
    }
  ],
  "updatedAt": "2026-03-01T09:39:55.209Z"
}