nitm-ai-dev-toolkit 5.1.1 → 5.1.3

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.
@@ -27,6 +27,28 @@ Analyze the project structure and customize AI instruction templates for this co
27
27
  - Codex MCP uses native `[mcp_servers.name]` TOML, not `.mcp.json`. Treat other harness MCP templates as references only; do not activate servers, copy credentials, or install hooks automatically.
28
28
  - Update and audit only confirmed harness targets. For Codex-only setup, `AGENTS.md`, `.agents/skills/`, and `.codex/config.toml` are the native targets. `--env codex` also includes `.github/instructions/` and `.claude/rules-snippets/` solely as AGENTS-linked standards and their wrapper sources, not automatically loaded rules or evidence of Copilot/Claude use; other harness command, agent, and config directories are excluded. The remaining tool-specific examples below are conditional.
29
29
 
30
+ ## Thin Wrapper Policy
31
+
32
+ Canonical policy lives only in `.claude/rules-snippets/`, `.claude/prompt-snippets/`, and `.claude/agents-snippets/`. Every harness wrapper (`.claude/{rules,commands,agents}/`, `.cursor/{rules,commands,agents}/`, `.github/{instructions,prompts,agents}/`, `.opencode/{rules,commands,agents}/`, and Codex and Copilot entry files) is a thin link to its snippet: frontmatter, a title, the link line, at most five key points, and optionally one short summary line. Its agent-dispatch table is activation metadata and may stay.
33
+
34
+ - **Create or change policy in the snippet first, then the wrapper.** Never write a wrapper with a copy of the policy, and never let a wrapper diverge from its snippet.
35
+ - **Skills that restate a snippet's policy point to the snippet** (or, where the skill is the source, the snippet points to the skill). Keep one source of policy text.
36
+ - **Existing wrappers that inline policy or diverge from their snippet** are reported (`npx nitm-ai-dev-toolkit doctor` lists them). Propose moving the content into the snippet and reducing the wrapper to a link. Change nothing without the operator's approval.
37
+
38
+ ## Relevance and Retirement
39
+
40
+ The template ships files for every stack, tracker and test tool. Decide what applies to this project; do not copy the whole template.
41
+
42
+ - **Relevance comes from the project:** the tracker (git origin host, or `"trackers"` in `.nitm/retired.json`), Playwright, Prisma, the UI framework, and whether MCP servers are configured. `npx nitm-ai-dev-toolkit patch --dry-run` prints each template file's classification with its reason (add, update, needs review, not relevant, retired). Use that plan; do not copy template files by hand.
43
+ - **Retire what does not apply** by recording it in `.nitm/retired.json` after the operator agrees, with a reason and date:
44
+
45
+ ```json
46
+ { "retired": [{ "path": ".agents/skills/linear-cli", "reason": "GitHub Issues is the tracker", "date": "2026-10-27" }] }
47
+ ```
48
+
49
+ A directory path retires every file under it. Patch and upgrade never re-add retired paths, and doctor reports them as retired, not missing. Never delete files to retire them; that removes nothing from the template.
50
+ - **Override tracker detection** with `"trackers": ["github"]` (or `[]` for none) when the git origin does not name the tracker, for example a Linear project hosted on GitHub.
51
+
30
52
  ## Process
31
53
 
32
54
  > **Merge, don't clobber.** If a target file already exists and carries project-specific content — customized agents, rules, skills, or `{{PLACEHOLDER}}` values already replaced — preserve it. Add missing structure; never overwrite a customized file with template defaults. When a template change conflicts with an existing customization, merge the addition and flag it for the user rather than replacing the file. For incremental updates after the first bootstrap, prefer `/bootstrap-patch`, which is purpose-built for meticulous merging.
@@ -503,13 +525,18 @@ Before recommending skills, identify the running harness from session/runtime in
503
525
  - Example: confirmed Cursor and Copilot → `-a cursor -a github-copilot`
504
526
  - If no harness is confirmed, ask before installing (or let the CLI prompt); do not infer from scaffold directories
505
527
 
506
- ### Step 7: AI Agent Skills Recommendation
528
+ ### Step 7: AI Agent Skills by Need
529
+
530
+ Recommend skills from [skills.sh](https://skills.sh/) and [agentskills.io](https://agentskills.io/) only for needs this project has: its tracker, framework, language, and test tooling. Never install a whole repository with `--skill '*'`. The toolkit already ships the core workflow skills (TDD, debugging, planning, review) in `.agents/skills/`, so do not recommend them again.
507
531
 
508
- Based on detected ecosystem and frameworks, recommend relevant skills from [skills.sh](https://skills.sh/) and [agentskills.io](https://agentskills.io/).
532
+ **Rules for every recommendation:**
533
+ - One named skill per install (`--skill <name>`). Confirm the name exists in its source repository first (its README or skill listing). If you cannot confirm it, leave that install out and say so.
534
+ - List the detected need next to each skill. Recommend nothing without a need.
535
+ - Install nothing before the operator approves that skill. Approving one skill does not approve the others.
509
536
 
510
537
  **Important:** Use the detected agent flags from Step 6 in all `npx skills add` commands. This prevents creating unnecessary configurations for agents the user doesn't have installed.
511
538
 
512
- **Core Skills (Always Recommend):**
539
+ **Generic workflow skills (optional; the toolkit already ships equivalents):**
513
540
 
514
541
  | Skill Repository | Purpose |
515
542
  | -------------------------- | ---------------------------------------------------------- |
@@ -531,9 +558,9 @@ This template bundles issue tracker skills in `.agents/skills/`. Verify the corr
531
558
 
532
559
  1. **Map tracker → expected CLI skill:** Jira → `acli`, GitHub Issues → `gh-cli`, Linear → `linear-cli`
533
560
  2. **Verify presence:** Check `.agents/skills/issue-tracker/SKILL.md` and `.agents/skills/{expected-cli}/SKILL.md` exist
534
- 3. **Warn on mismatch:** If a *different* CLI skill is present, warn the user and offer to prune
535
- 4. **Prune unused CLI skills:** On confirmation, delete mismatched skill directory and update AGENTS.md Skills table
536
- 5. **If missing:** Warn and offer to copy from the template bundle
561
+ 3. **Warn on mismatch:** If a *different* CLI skill is present, warn the user and offer to retire it in `.nitm/retired.json` (the patch plan then leaves it out)
562
+ 4. **Remove only with approval:** Deleting a skill directory needs explicit approval, a backup copy, and an updated AGENTS.md Skills table. Retiring it (step 3) needs no deletion
563
+ 5. **If missing:** `patch --dry-run` shows whether the matching CLI skill applies; add it only when the operator approves
537
564
 
538
565
  **Framework-Specific Skills:**
539
566
 
@@ -566,13 +593,13 @@ This template bundles issue tracker skills in `.agents/skills/`. Verify the corr
566
593
  | React | `vercel-labs/agent-skills` | `npx -y skills add {{AGENT_FLAGS}} vercel-labs/agent-skills --skill "vercel-react-best-practices"` |
567
594
  | Vue | `onmax/nuxt-skills` (vue) | `npx -y skills add {{AGENT_FLAGS}} onmax/nuxt-skills --skill "vue"` |
568
595
  | Nuxt | `onmax/nuxt-skills` (nuxt) | `npx -y skills add {{AGENT_FLAGS}} onmax/nuxt-skills --skill "nuxt"` |
569
- | Expo | `expo/skills` | `npx -y skills add {{AGENT_FLAGS}} expo/skills --skill '*'` |
570
- | TypeScript | `pproenca/dot-skills` (typescript) | `npx -y skills add {{AGENT_FLAGS}} pproenca/dot-skills --skill '*'` |
571
- | Advanced Types | `wshobson/agents` (ts-advanced-types) | `npx -y skills add {{AGENT_FLAGS}} wshobson/agents --skill '*'` |
596
+ | Expo | `expo/skills` | `npx -y skills add {{AGENT_FLAGS}} expo/skills --skill <name confirmed in the repository>` |
597
+ | TypeScript | `pproenca/dot-skills` (typescript) | `npx -y skills add {{AGENT_FLAGS}} pproenca/dot-skills --skill "typescript"` |
598
+ | Advanced Types | `wshobson/agents` (ts-advanced-types) | `npx -y skills add {{AGENT_FLAGS}} wshobson/agents --skill "ts-advanced-types"` |
572
599
 
573
600
  **Skill Creation for Unsupported Frameworks:**
574
601
 
575
- Use `npx -y skills add {{AGENT_FLAGS}} anthropics/skills --skill '*'` (includes `skill-creator`) to create custom skills.
602
+ To create a custom skill for an unsupported framework, install only `skill-creator` from `anthropics/skills`: `npx -y skills add {{AGENT_FLAGS}} anthropics/skills --skill "skill-creator"`.
576
603
 
577
604
  **Present Recommendation:**
578
605
 
@@ -584,12 +611,10 @@ Using flags: {{AGENT_FLAGS}}
584
611
 
585
612
  Based on your project ({{FRAMEWORK}}/{{LANGUAGE}}):
586
613
 
587
- ### Core Skills (recommended for all projects)
614
+ ### Approved installs (none until the operator approves each one)
588
615
 
589
616
  ```bash
590
- npx -y skills add {{AGENT_FLAGS}} obra/superpowers --skill '*'
591
- npx -y skills add {{AGENT_FLAGS}} trailofbits/skills --skill '*'
592
- npx -y skills add {{AGENT_FLAGS}} softaworks/agent-toolkit --skill '*'
617
+ npx -y skills add {{AGENT_FLAGS}} <owner/repo> --skill <confirmed name> # one line per approved skill
593
618
  `````
594
619
 
595
620
  ### Issue Tracker Skills (bundled — {{ISSUE_TRACKER}})
@@ -597,7 +622,7 @@ npx -y skills add {{AGENT_FLAGS}} softaworks/agent-toolkit --skill '*'
597
622
  ```
598
623
  ✅ .agents/skills/issue-tracker/SKILL.md (shared strategy)
599
624
  ✅ Matching CLI reference: .agents/skills/acli/SKILL.md, .agents/skills/gh-cli/SKILL.md, or .agents/skills/linear-cli/SKILL.md
600
- ⚠️ Prune any issue-tracker CLI skills that do not match {{ISSUE_TRACKER}} (if any)
625
+ ⚠️ Retire any issue-tracker CLI skills that do not match {{ISSUE_TRACKER}} (if any; record them in .nitm/retired.json)
601
626
  ```
602
627
 
603
628
  ````
@@ -605,12 +630,12 @@ npx -y skills add {{AGENT_FLAGS}} softaworks/agent-toolkit --skill '*'
605
630
  ### Framework-Specific Skills
606
631
 
607
632
  ```bash
608
- npx -y skills add {{AGENT_FLAGS}} {{FRAMEWORK_SKILL_REPO}} --skill '*'
633
+ npx -y skills add {{AGENT_FLAGS}} {{FRAMEWORK_SKILL_REPO}} --skill <confirmed name>
609
634
  ```
610
635
 
611
- ### Install All?
636
+ ### Approve Each Skill
612
637
 
613
- Would you like to install these skills now? (Y/n)
638
+ Install only the skills named here, nothing else. Which of these should be installed? (name each one, or none)
614
639
 
615
640
  ````
616
641
 
@@ -662,7 +687,7 @@ Populate this example with only files actually changed and skills actually insta
662
687
  6. Create custom skills at https://agentskills.io/specification
663
688
  ```
664
689
 
665
- ### Step 8: Skills Review & Cleanup
690
+ ### Step 8: Skill Review & Retirement
666
691
 
667
692
  After bootstrap completion, review all installed skills for relevance:
668
693
 
@@ -710,22 +735,18 @@ After bootstrap completion, review all installed skills for relevance:
710
735
  | php | PHP patterns | No PHP files found - TypeScript project |
711
736
  | swift-development | SwiftUI patterns | No iOS/Swift code detected |
712
737
 
713
- ### 🚫 Remove Unnecessary Skills?
738
+ ### 🚫 Retire Unnecessary Skills?
714
739
 
715
740
  These skills don't match your detected tech stack and may clutter AI context.
716
741
 
717
- Remove flagged skills? (Y/n)
742
+ Retire flagged skills? (Y/n)
718
743
  ```
719
744
 
720
745
  **On Confirmation:**
721
746
 
722
747
  ```bash
723
- # Remove unnecessary skills
724
- rm -rf .github/skills/django-expert/
725
- rm -rf .cursor/skills/php/
726
- rm -rf .github/skills/swift-development/
727
-
728
- # Update AGENTS.md to remove references
748
+ # Retire each approved skill in .nitm/retired.json (see Relevance and Retirement); patch then leaves it out.
749
+ # Delete a directory only after separate approval and a backup, then update the AGENTS.md references.
729
750
  ```
730
751
 
731
752
  **Post-Cleanup Report:**
@@ -733,7 +754,7 @@ rm -rf .github/skills/swift-development/
733
754
  ```markdown
734
755
  ## ✅ Skill Cleanup Complete
735
756
 
736
- Removed {{N}} unnecessary skills:
757
+ Retired {{N}} unnecessary skills (recorded in .nitm/retired.json):
737
758
 
738
759
  - django-expert
739
760
  - php
@@ -801,10 +822,12 @@ Create recommended instructions? (Y/n)
801
822
 
802
823
  **On Confirmation (only if Copilot is confirmed in use):**
803
824
 
804
- Generate missing Copilot instruction files with appropriate templates; skip creation for a Codex-only audit even when shared reference standards are present:
825
+ Write the policy of each missing Copilot instruction into `.claude/rules-snippets/<name>.md` first, then create `.github/instructions/<name>.instructions.md` as a thin wrapper (see Thin Wrapper Policy); skip creation for a Codex-only audit even when shared reference standards are present:
805
826
 
806
827
  **Copilot Example: Framework Instruction Template (only if confirmed in use)**
807
828
 
829
+ The body below is the shared snippet, `.claude/rules-snippets/<name>.md`. Write it there first. The `.github/instructions/<name>.instructions.md` file is then a thin wrapper: its frontmatter, a title, a link to the snippet, and at most five key points. Never copy this body into the wrapper.
830
+
808
831
  ```markdown
809
832
  ---
810
833
  applyTo: "src/**"
@@ -1,6 +1,6 @@
1
1
  # Claude Code Skills
2
2
 
3
- This folder is for skills installed via `npx -y skills add -a claude-code <owner/repo> --skill '*'`.
3
+ This folder is for skills installed via `npx -y skills add -a claude-code <owner/repo> --skill <confirmed name>`.
4
4
 
5
5
  ## About Skills
6
6
 
@@ -12,10 +12,10 @@ Install skills from [skills.sh](https://skills.sh/) using the `-a claude-code` f
12
12
 
13
13
  ```bash
14
14
  # For Claude Code only
15
- npx -y skills add -a claude-code <owner/repo> --skill '*'
15
+ npx -y skills add -a claude-code <owner/repo> --skill <confirmed name>
16
16
 
17
17
  # For multiple agents (e.g., Claude Code + GitHub Copilot)
18
- npx -y skills add -a claude-code -a github-copilot <owner/repo> --skill '*'
18
+ npx -y skills add -a claude-code -a github-copilot <owner/repo> --skill <confirmed name>
19
19
  ```
20
20
 
21
21
  **Tip:** The skills CLI automatically detects installed agents. If you omit `-a claude-code`, you'll be prompted to choose from detected agents.
@@ -37,14 +37,14 @@ Universal workflow skills are pre-installed in `.agents/skills/`. These include:
37
37
 
38
38
  ```bash
39
39
  # Frontend skills
40
- npx -y skills add -a claude-code onmax/nuxt-skills --skill '*'
41
- npx -y skills add -a claude-code vercel-labs/agent-skills --skill '*'
40
+ npx -y skills add -a claude-code onmax/nuxt-skills --skill vue
41
+ npx -y skills add -a claude-code vercel-labs/agent-skills --skill vercel-react-best-practices
42
42
 
43
43
  # Security skills
44
- npx -y skills add -a claude-code trailofbits/skills --skill '*'
44
+ npx -y skills add -a claude-code trailofbits/skills --skill <confirmed name>
45
45
 
46
46
  # Framework-specific
47
- npx -y skills add -a claude-code better-auth/skills --skill '*'
47
+ npx -y skills add -a claude-code better-auth/skills --skill <confirmed name>
48
48
  ```
49
49
 
50
50
  See the main README.md for a full list of recommended skills.
@@ -1,6 +1,6 @@
1
1
  # Cursor Skills
2
2
 
3
- This folder is for skills installed via `npx -y skills add <owner/repo> --skill '*' --agent github-copilot cursor`.
3
+ This folder is for skills installed via `npx -y skills add <owner/repo> --skill <confirmed name> --agent github-copilot cursor`.
4
4
 
5
5
  ## About Skills
6
6
 
@@ -12,13 +12,13 @@ Install skills from [skills.sh](https://skills.sh/) using the `-a cursor` flag:
12
12
 
13
13
  ```bash
14
14
  # For Cursor only
15
- npx -y skills add -a cursor <owner/repo> --skill '*' --agent github-copilot cursor
15
+ npx -y skills add -a cursor <owner/repo> --skill <confirmed name> --agent github-copilot cursor
16
16
 
17
17
  # For multiple agents (e.g., Cursor + GitHub Copilot)
18
- npx -y skills add -a cursor -a github-copilot <owner/repo> --skill '*' --agent github-copilot cursor
18
+ npx -y skills add -a cursor -a github-copilot <owner/repo> --skill <confirmed name> --agent github-copilot cursor
19
19
  ```
20
20
 
21
- **Tip:** The skills CLI automatically detects installed agents. If you omit `-a cursor`, you'll be prompted to choose from detected agents. Use `--skill '*' --agent github-copilot cursor` to avoid skill-selection prompts when installing from a repo.
21
+ **Tip:** The skills CLI automatically detects installed agents. If you omit `-a cursor`, you'll be prompted to choose from detected agents. Use `--skill <confirmed name> --agent github-copilot cursor` when installing one named skill from a repo.
22
22
 
23
23
  **Important:** Always use `-a cursor` to install only for Cursor (or add multiple `-a` flags if you use multiple agents). This prevents creating unnecessary configuration files for other agents.
24
24
 
@@ -37,14 +37,14 @@ Universal workflow skills are pre-installed in `.agents/skills/`. These include:
37
37
 
38
38
  ```bash
39
39
  # Frontend skills
40
- npx -y skills add -a cursor onmax/nuxt-skills --skill '*' --agent github-copilot cursor
41
- npx -y skills add -a cursor vercel-labs/agent-skills --skill '*' --agent github-copilot cursor
40
+ npx -y skills add -a cursor onmax/nuxt-skills --skill vue --agent github-copilot cursor
41
+ npx -y skills add -a cursor vercel-labs/agent-skills --skill vercel-react-best-practices --agent github-copilot cursor
42
42
 
43
43
  # Security skills
44
- npx -y skills add -a cursor trailofbits/skills --skill '*' --agent github-copilot cursor
44
+ npx -y skills add -a cursor trailofbits/skills --skill <confirmed name> --agent github-copilot cursor
45
45
 
46
46
  # Framework-specific
47
- npx -y skills add -a cursor better-auth/skills --skill '*' --agent github-copilot cursor
47
+ npx -y skills add -a cursor better-auth/skills --skill <confirmed name> --agent github-copilot cursor
48
48
  ```
49
49
 
50
50
  See the main README.md for a full list of recommended skills.
@@ -1,6 +1,6 @@
1
1
  # GitHub Copilot Skills
2
2
 
3
- This folder is for skills installed via `npx -y skills add <owner/repo> --skill '*' --agent github-copilot cursor` when using GitHub Copilot.
3
+ This folder is for skills installed via `npx -y skills add <owner/repo> --skill <confirmed name> --agent github-copilot cursor` when using GitHub Copilot.
4
4
 
5
5
  ## About Skills
6
6
 
@@ -12,13 +12,13 @@ Install skills from [skills.sh](https://skills.sh/) using the `-a github-copilot
12
12
 
13
13
  ```bash
14
14
  # For GitHub Copilot only
15
- npx -y skills add -a github-copilot <owner/repo> --skill '*' --agent github-copilot cursor
15
+ npx -y skills add -a github-copilot <owner/repo> --skill <confirmed name> --agent github-copilot cursor
16
16
 
17
17
  # For multiple agents (e.g., Copilot + Cursor)
18
- npx -y skills add -a github-copilot -a cursor <owner/repo> --skill '*' --agent github-copilot cursor
18
+ npx -y skills add -a github-copilot -a cursor <owner/repo> --skill <confirmed name> --agent github-copilot cursor
19
19
  ```
20
20
 
21
- **Tip:** The skills CLI automatically detects installed agents. If you omit `-a github-copilot`, you'll be prompted to choose from detected agents. Use `--skill '*' --agent github-copilot cursor` to avoid skill-selection prompts when installing from a repo.
21
+ **Tip:** The skills CLI automatically detects installed agents. If you omit `-a github-copilot`, you'll be prompted to choose from detected agents. Use `--skill <confirmed name> --agent github-copilot cursor` when installing one named skill from a repo.
22
22
 
23
23
  **Important:** Always use `-a github-copilot` to install only for GitHub Copilot (or add multiple `-a` flags if you use multiple agents). This prevents creating unnecessary configuration files for other agents.
24
24
 
@@ -9,3 +9,7 @@ description: "Review currently staged files before committing"
9
9
  |-------|-------------|
10
10
  | `reviewer` | Standard pre-commit review — correctness, style, patterns |
11
11
  | `oracle` | Complex staged change — trade-offs, security, scalability |
12
+
13
+ Read and follow `.claude/prompt-snippets/review-staged.md` before executing this command.
14
+
15
+ $ARGUMENTS
@@ -93,6 +93,8 @@ Any value other than exactly `auto` is treated as `human`.
93
93
 
94
94
  By default each job builds in its own git worktree on branch `factory/<id>`, so the main checkout stays free. A job's `job.json` records this in `worktree` (`true`) and the worktree path in `worktree_path`. Worktrees live in `.worktrees/<id>/` at the repo root; the factory adds `.worktrees/` to `.gitignore` if it is missing.
95
95
 
96
+ Tools that do not honor `.gitignore` (Jest/Vitest test discovery, ESLint, `tsc`, workspace globs) should exclude `.worktrees/`. The local merge runs tests in the main checkout while other job worktrees may still exist.
97
+
96
98
  ### Worktree bootstrap
97
99
 
98
100
  Before the builder starts in a new worktree, the factory runs the steps listed in `factory/worktree-bootstrap.md`: one shell command per line, in order, from the worktree root. Typical steps install dependencies or vendored packages, copy `.env` from the main checkout, and create or migrate a database for the job. The file ships with no active steps, so edit it for your project. Each step receives `FACTORY_JOB_ID`, `FACTORY_PORT_BUILDER`, `FACTORY_WORKTREE`, and `FACTORY_MAIN_CHECKOUT`.