ai-fob 1.2.1 → 1.3.1

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.
Files changed (33) hide show
  1. package/assets/agents/build-validator-agent.md +4 -0
  2. package/assets/agents/meta-validator-agent.md +1 -1
  3. package/assets/commands/build-cc-assets-phases.md +8 -6
  4. package/assets/commands/build-phase-V2.md +28 -1
  5. package/assets/commands/create-highlevel-plan-phases.md +5 -2
  6. package/assets/commands/handoff.md +1 -1
  7. package/assets/commands/plan-cc-assets-phases.md +11 -8
  8. package/assets/commands/plan-project.md +1 -1
  9. package/assets/commands/repair-workflow.md +3 -3
  10. package/assets/commands/reverse-engineer-from-code.md +1 -1
  11. package/assets/commands/{audit-cc-assets.md → run-audit-cc-assets.md} +1 -1
  12. package/assets/commands/setup-convex-dev-deployment.md +288 -0
  13. package/assets/commands/setup-project.md +1 -1
  14. package/assets/skills/audit-cc-assets/SKILL.md +2 -2
  15. package/assets/skills/audit-cc-assets/templates/audit-report.md +1 -1
  16. package/assets/skills/audit-cc-assets/templates/audit-state-schema.md +1 -1
  17. package/assets/skills/claude-code-primitives/SKILL.md +3 -3
  18. package/assets/skills/claude-code-primitives/reference/agents-guide.md +17 -17
  19. package/assets/skills/claude-code-primitives/reference/commands-guide.md +4 -3
  20. package/assets/skills/claude-code-primitives/reference/hooks-guide.md +4 -3
  21. package/assets/skills/claude-code-primitives/reference/skills-guide.md +2 -1
  22. package/assets/skills/convex-best-practices-skill/SKILL.md +20 -1
  23. package/assets/skills/convex-best-practices-skill/reference/deployment-management.md +185 -0
  24. package/assets/skills/deep-research/SKILL.md +2 -2
  25. package/assets/skills/testing-and-validation/SKILL.md +16 -0
  26. package/assets/skills/workflow-repair/reports/2026-03-28_mobile-viewport-testing.md +136 -0
  27. package/assets/supporting/hooks/session-start-model.sh +76 -0
  28. package/assets/supporting/settings.json +17 -0
  29. package/assets/supporting/statusline.sh +110 -0
  30. package/bin/install.js +26 -0
  31. package/manifest.json +14 -6
  32. package/package.json +1 -1
  33. /package/assets/commands/{deep-research.md → run-deep-research.md} +0 -0
@@ -26,6 +26,10 @@ You are a rigorous build validator. Your job is to run validation checks provide
26
26
 
27
27
  Run every validation check. Report exactly what you observe. If a check fails, describe the failure precisely -- what was expected vs. what actually happened. Do not attempt to fix the code or suggest fixes. Your report goes back to the orchestrator who will route failures to a builder agent for correction.
28
28
 
29
+ ## Browser Tool Constraint
30
+
31
+ NEVER use the macOS `open` command to open URLs in a browser. ALWAYS use `agent-browser open <url>` for all browser-based checks. The `open` command launches Safari, which cannot be automated, snapshotted, or device-emulated. All browser interactions MUST go through `agent-browser` (Chromium via Playwright).
32
+
29
33
  ## Checks
30
34
 
31
35
  The calling prompt provides a numbered list of checks to run. Execute every check listed -- no more, no fewer. For each check:
@@ -4,7 +4,7 @@ description: >
4
4
  CC Asset Validator. Validates CC asset plans, design specs, and built
5
5
  assets using CC-specific conventions and testing patterns. Operates in
6
6
  plan-validation or build-validation mode as directed by the calling prompt.
7
- tools: Read, Write, Grep, Glob, Bash, WebFetch, WebSearch, Skill, Task
7
+ tools: Read, Write, Grep, Glob, Bash, WebFetch, WebSearch, Skill, Agent
8
8
  model: opus
9
9
  color: red
10
10
  skills:
@@ -3,7 +3,7 @@ description: Build one phase of a CC assets plan — executes a single phase thr
3
3
  argument-hint: [path to cc-assets-plan] [phase number]
4
4
  model: opus
5
5
  disable-model-invocation: false
6
- allowed-tools: Skill, Task, Read, Glob, Grep, Write, Bash
6
+ allowed-tools: Skill, Agent, Read, Glob, Grep, Write, Bash
7
7
  ---
8
8
 
9
9
  # Build CC Assets Phase
@@ -706,6 +706,7 @@ Assemble structural AND functional checks based on ASSET_TYPE, then delegate to
706
706
  5. **Referenced files exist** — Find all markdown links in SKILL.md (pattern: `[text](path)`). For each link pointing to a relative file path, verify the file exists relative to the skill directory. PASS if all referenced files found. FAIL if any missing.
707
707
  6. **Directory structure** — List the skill directory contents. PASS if only recognized items: SKILL.md, reference/, templates/, scripts/, workflows/. FAIL if unexpected files or directories.
708
708
  7. **Description quality** — The `description` field is a complete sentence explaining what the skill provides. PASS if it reads as a complete description with context for when to use it. FAIL if it is a fragment or lacks guidance.
709
+ 8. **No command name collision** — Verify that no file named `{ASSET_NAME}.md` exists in `.claude/commands/`. If a skill and command share the same name, the skill takes precedence and the command becomes uninvocable. Use Glob to check `.claude/commands/{ASSET_NAME}.md`. PASS if no such file exists. FAIL if a matching command file is found.
709
710
 
710
711
  **Structural checks when ASSET_TYPE == "agent":**
711
712
 
@@ -727,6 +728,7 @@ Assemble structural AND functional checks based on ASSET_TYPE, then delegate to
727
728
  6. **Has workflow steps** — The body contains numbered or headed workflow steps (patterns like `### Step` or `## Step` or numbered lists within a Workflow section). PASS if workflow structure found. FAIL if body lacks clear workflow organization.
728
729
  7. **Skill invocations valid** — If `Skill` appears in `allowed-tools`, search the body for skill invocation references. Verify each referenced skill exists at `.claude/skills/{name}/SKILL.md`. PASS if all found or `Skill` not in allowed-tools. FAIL if referenced skill not found.
729
730
  8. **Argument handling consistent** — If `argument-hint:` is set in frontmatter, verify `$ARGUMENTS` appears in the body. PASS if consistent (both present or both absent). FAIL if argument-hint is set but $ARGUMENTS not used.
731
+ 9. **No skill name collision** — Verify that no skill directory named `{ASSET_NAME}` exists in `.claude/skills/`. If a skill and command share the same name, the skill takes precedence and the command becomes uninvocable. Use Glob to check `.claude/skills/{ASSET_NAME}/SKILL.md`. PASS if no such skill exists. FAIL if a matching skill directory is found.
730
732
 
731
733
  **Modification add-on (when ASSET_ACTION == "modify", append to whichever type-specific list):**
732
734
 
@@ -737,9 +739,9 @@ Store the total structural check count as `STRUCTURAL_CHECK_COUNT`.
737
739
 
738
740
  **Functional checks when ASSET_TYPE == "skill"** (append after structural checks):
739
741
 
740
- 8. **Skill loads via Skill tool** — Invoke the skill `{ASSET_NAME}` using the Skill tool. PASS if the skill loads without error. FAIL if an error occurs.
741
- 9. **Reference files accessible** — After loading the skill, use Glob to list files in the skill's `reference/` and `templates/` directories. Read each file. PASS if all files listed in SKILL.md are readable. FAIL if any file fails to read.
742
- 10. **Knowledge verification** — After loading the skill, derive a knowledge question from the test scenario: {TEST_SCENARIO}. The question should require specific knowledge from the skill's content (not general knowledge). Evaluate whether the skill's content addresses the test scenario's success criteria. PASS if the skill content supports the expected knowledge. FAIL if it does not.
742
+ 9. **Skill loads via Skill tool** — Invoke the skill `{ASSET_NAME}` using the Skill tool. PASS if the skill loads without error. FAIL if an error occurs.
743
+ 10. **Reference files accessible** — After loading the skill, use Glob to list files in the skill's `reference/` and `templates/` directories. Read each file. PASS if all files listed in SKILL.md are readable. FAIL if any file fails to read.
744
+ 11. **Knowledge verification** — After loading the skill, derive a knowledge question from the test scenario: {TEST_SCENARIO}. The question should require specific knowledge from the skill's content (not general knowledge). Evaluate whether the skill's content addresses the test scenario's success criteria. PASS if the skill content supports the expected knowledge. FAIL if it does not.
743
745
 
744
746
  **Functional checks when ASSET_TYPE == "agent"** (append after structural checks):
745
747
 
@@ -748,7 +750,7 @@ Store the total structural check count as `STRUCTURAL_CHECK_COUNT`.
748
750
 
749
751
  **Functional checks when ASSET_TYPE == "command"** (append after structural checks):
750
752
 
751
- 9. **Manual test instructions written** — Write manual test instructions to `{PHASE_DIR}/manual_test_instructions.md` using this format:
753
+ 10. **Manual test instructions written** — Write manual test instructions to `{PHASE_DIR}/manual_test_instructions.md` using this format:
752
754
 
753
755
  ```
754
756
  # Manual Test: /{ASSET_NAME}
@@ -1098,4 +1100,4 @@ Run /{ASSET_NAME} with test scenario inputs.
1098
1100
  Instructions: {PHASE_DIR}/manual_test_instructions.md}
1099
1101
 
1100
1102
  Next Phase: {If PHASE_NUMBER < total phases: "Phase {PHASE_NUMBER + 1}: {next phase name} — run /build-cc-assets-phases {PLAN_PATH} {PHASE_NUMBER + 1}" | "All phases complete."}
1101
- ```
1103
+ ```
@@ -3,7 +3,7 @@ description: Build one phase of a phased high-level plan (Research + Implementat
3
3
  argument-hint: [path to HL plan] [phase number]
4
4
  model: opus
5
5
  disable-model-invocation: true
6
- allowed-tools: Skill, Task, Read, Glob, Grep, Write, Bash
6
+ allowed-tools: Skill, Agent, Read, Glob, Grep, Write, Bash
7
7
  ---
8
8
 
9
9
  # Build Phase V2
@@ -927,6 +927,12 @@ Store the total check count as `BUILD_CHECK_COUNT`. Store the count of HL criter
927
927
 
928
928
  Determine if browser checks exist: scan the assembled check list for any check that mentions "browser", "agent-browser", "navigate", "page", "UI", or "localhost". Store as `HAS_BROWSER_CHECKS` (true/false).
929
929
 
930
+ If `HAS_BROWSER_CHECKS` is true: Read the Mobile Test Devices section from the testing-and-validation skill. Extract the Primary Device and Secondary Device values. Store as `MOBILE_PRIMARY_DEVICE` and `MOBILE_SECONDARY_DEVICE`. Determine `HAS_MOBILE_CHECKS`:
931
+ - If `MOBILE_PRIMARY_DEVICE` is "NONE": set `HAS_MOBILE_CHECKS = false`.
932
+ - Otherwise: set `HAS_MOBILE_CHECKS = true`.
933
+
934
+ If `HAS_BROWSER_CHECKS` is false: set `HAS_MOBILE_CHECKS = false`.
935
+
930
936
  #### 5b. Start Dev Server (if needed)
931
937
 
932
938
  If `HAS_BROWSER_CHECKS` is true:
@@ -997,6 +1003,27 @@ Read the build report(s) for context on what was built:
997
1003
  If Username is "REPLACE_WITH_TEST_USERNAME":
998
1004
  "Test credentials have NOT been configured in the testing-and-validation skill. The placeholder values have not been replaced. Browser checks that require authentication MUST be marked as BLOCKED with reason: 'Test credentials not configured in testing-and-validation skill -- user must replace placeholder values.'"}
999
1005
 
1006
+ ## Mobile Device Testing
1007
+ {Read the Mobile Test Devices section from the testing-and-validation skill. Extract the Primary Device and Secondary Device values.
1008
+
1009
+ If HAS_MOBILE_CHECKS is true (Primary Device is NOT "NONE"):
1010
+ "Mobile viewport testing is configured for this project. After completing each browser check at the default desktop viewport, you MUST repeat the visual/layout portions of that check at the mobile viewport.
1011
+
1012
+ Mobile testing procedure (use the agent-browser skill):
1013
+ 1. Complete the browser check at the default desktop viewport first
1014
+ 2. Set the mobile device: `agent-browser set device \"{MOBILE_PRIMARY_DEVICE}\"`
1015
+ 3. Reload the page: `agent-browser reload`
1016
+ 4. Take a snapshot to verify layout at mobile viewport: `agent-browser snapshot -i`
1017
+ 5. Take a screenshot for visual evidence: `agent-browser screenshot`
1018
+ 6. Verify the page renders correctly at the mobile viewport -- no overlapping elements, no horizontal scrolling, no truncated content, no inaccessible interactive elements
1019
+ 7. Reset to desktop viewport when done: `agent-browser set viewport 1920 1080`{If MOBILE_SECONDARY_DEVICE is not "NONE":
1020
+ 8. Repeat steps 2-7 with the secondary device: `agent-browser set device \"{MOBILE_SECONDARY_DEVICE}\"`}
1021
+
1022
+ For each browser check, report desktop and mobile results separately. If a check passes at desktop but fails at mobile, the overall check result is FAIL. Include the device name in the findings (e.g., 'FAIL at iPhone 12 Pro: navigation menu overlaps content')."
1023
+
1024
+ If HAS_MOBILE_CHECKS is false:
1025
+ "Mobile viewport testing is not configured (Primary Device is NONE in the testing-and-validation skill). All browser checks run at the default desktop viewport only."}
1026
+
1000
1027
  ## Validation Checks ({BUILD_CHECK_COUNT} -- run ALL of these)
1001
1028
 
1002
1029
  {The assembled numbered check list from step 5a -- paste the full list verbatim, including the [HL] prefixed checks at the end}
@@ -3,7 +3,7 @@ description: Create a high-level plan with phased implementation breakdown and p
3
3
  argument-hint: [task description or feature document path]
4
4
  model: opus
5
5
  disable-model-invocation: true
6
- allowed-tools: Skill, Task, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet
6
+ allowed-tools: Skill, Agent, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet
7
7
  ---
8
8
 
9
9
  # Create High-Level Plan (Phased)
@@ -93,7 +93,8 @@ The user provided a feature document from a reverse-engineering analysis. Use it
93
93
  - **Name**: short descriptive name
94
94
  - **Goal**: 1-2 sentences on what this phase achieves and why it comes at this position
95
95
  - **Dependencies**: which prior phase(s) must complete first (or "None" for the first)
96
- - **Success criteria**: concrete, verifiable statements (can be user stories, anti-stories, API checks, state checks, UI checks, build checks)
96
+ - **Success criteria**: concrete, verifiable statements (can be user stories, anti-stories, API checks, state checks, UI checks, build checks, mobile viewport checks)
97
+ - For phases with UI work, ask: "Does this need to work on mobile viewports?" If yes, include mobile-specific success criteria (e.g., "Navigation menu is usable on iPhone 12 Pro viewport")
97
98
  Target 3-5 phases. Present the suggested phases to the user:
98
99
  ```
99
100
  Based on the feature document, I suggest this phase breakdown:
@@ -155,7 +156,9 @@ The user provided a feature document from a reverse-engineering analysis. Use it
155
156
  - State/infrastructure checks: "Database tables exist and are accessible"
156
157
  - UI checks: "Login form renders with email and password fields"
157
158
  - Build/tooling checks: "`bun dev` starts without errors"
159
+ - Mobile viewport checks: "Navigation is usable at iPhone 12 Pro viewport"
158
160
  - For phases with user-facing behavior, success criteria MUST include both user stories (what users CAN do) and anti-stories (what users CANNOT do)
161
+ - For phases with UI work, ask the user: "Does this need to work on mobile viewports?" If yes, include mobile-specific success criteria. Mobile viewport testing is configured in the testing-and-validation skill.
159
162
  - Each criterion must be testable -- a future validator should be able to determine PASS/FAIL
160
163
  - The last phase should typically be "Integration & Polish"
161
164
  8. Do NOT proceed to Phase 2 until you and the user explicitly agree on the task description, user stories, anti-stories, phase breakdown, and detailed specifications (if any were provided).
@@ -2,7 +2,7 @@
2
2
  description: Hand off plan implementation to a sub-agent
3
3
  model: opus
4
4
  disable-model-invocation: true
5
- allowed-tools: Task, Read, Glob
5
+ allowed-tools: Agent, Read, Glob
6
6
  ---
7
7
 
8
8
  # Handoff
@@ -3,7 +3,7 @@ description: Plan a phased system of CC assets (skills, agents, commands)
3
3
  argument-hint: [description of the system to plan]
4
4
  model: opus
5
5
  disable-model-invocation: true
6
- allowed-tools: Skill, Task, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet
6
+ allowed-tools: Skill, Agent, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet
7
7
  ---
8
8
 
9
9
  # Plan CC Assets (Phased)
@@ -205,6 +205,7 @@ You (the main agent) handle this step directly. Using the understanding from Ste
205
205
  - **The command controls behavior via prompts.** When a workflow needs an agent to do three different things (e.g., scan broadly, then trace deeply, then synthesize), that's three Task tool calls to the same agent with different prompts — not three separate agent definitions.
206
206
  - **Challenge every "New Agent".** For each proposed new agent, ask: "Could an existing agent do this if given the right prompt?" If yes, it's a Reuse, not a New Agent.
207
207
  - **Skills earn their place.** Only propose a new skill if there is genuine domain knowledge that needs to be encoded and reused across multiple agents or commands. A one-off workflow does not need its own skill.
208
+ - **No cross-type name collisions.** A new skill MUST NOT share its directory name with any existing or planned command filename (minus `.md`), and vice versa. If a skill and command share the same name, the skill takes precedence and the command becomes uninvocable. For every proposed asset, check: `ls .claude/skills/` and `ls .claude/commands/` and verify no collision exists among planned assets either.
208
209
 
209
210
  With the minimalism principle in mind:
210
211
 
@@ -430,7 +431,7 @@ Read the plan file at: {SAVE_PATH}
430
431
  ### Confirmed Asset Inventory
431
432
  {The asset inventory as confirmed by the user in Step 3}
432
433
 
433
- ## Validation Checks (8 — run ALL of these)
434
+ ## Validation Checks (9 — run ALL of these)
434
435
 
435
436
  1. **Existing asset references** — Does every referenced existing asset actually exist on disk? For each asset the plan says to "reuse" or "modify", verify the file exists: skills in `.claude/skills/{name}/SKILL.md`, agents in `.claude/agents/{name}.md`, commands in `.claude/commands/{name}.md`. Use Glob to check. Flag any reference to an asset that does not exist.
436
437
 
@@ -448,6 +449,8 @@ Read the plan file at: {SAVE_PATH}
448
449
 
449
450
  8. **Minimalism compliance** — Does the asset inventory follow the minimalism principle? Check for: (a) agents with the same tools and skills that should be consolidated into one agent spawned with different prompts, (b) skills that encode knowledge used by only one agent for one task, (c) new assets that could be replaced by reusing existing ones. Cross-reference with the existing asset landscape from the context. Flag any violation of minimalism.
450
451
 
452
+ 9. **No cross-type name collisions** — Does any proposed skill share its directory name with a proposed or existing command filename (minus `.md`), or vice versa? For each skill in the asset inventory, check if a command with the same name exists in `.claude/commands/` or is planned in the inventory. For each command, check if a skill with the same name exists in `.claude/skills/` or is planned. If a skill and command share the same name, the skill takes precedence and the command becomes uninvocable. Flag any collision.
453
+
451
454
  ## Output
452
455
  Present the validation report directly in your response using your standard validation report format (Overall PASS/FAIL, checks table, issues found, verified claims).
453
456
  ```
@@ -466,13 +469,13 @@ After the validator completes, read the validation report:
466
469
  - **With agent teams**: Read the Validator's report from the shared task list.
467
470
  - **With Task tool fallback**: Use the captured output from the Task delegation.
468
471
 
469
- **If validation PASSES (all 8 checks):**
472
+ **If validation PASSES (all 9 checks):**
470
473
  - Note the validation result for the final report
471
474
  - Proceed to Step 6
472
475
 
473
476
  **If validation FAILS:**
474
477
 
475
- 1. Present the validation failures to the user briefly: "{N}/8 checks passed. The following issues were found: {summary of FAIL items}. Sending back to the architect for corrections."
478
+ 1. Present the validation failures to the user briefly: "{N}/9 checks passed. The following issues were found: {summary of FAIL items}. Sending back to the architect for corrections."
476
479
 
477
480
  2. Send corrections to the architect:
478
481
 
@@ -524,7 +527,7 @@ Apply corrections and write the updated plan back to the same path using the Wri
524
527
 
525
528
  Read the plan from SAVE_PATH and present it to the user in full. Include the validation status:
526
529
 
527
- "The following CC assets plan has been produced and validated ({checks_passed}/8 checks passed{', with known issues noted' if any checks failed after max cycles}). Plan file: {SAVE_PATH}"
530
+ "The following CC assets plan has been produced and validated ({checks_passed}/9 checks passed{', with known issues noted' if any checks failed after max cycles}). Plan file: {SAVE_PATH}"
528
531
 
529
532
  Then present the complete plan content (read from disk).
530
533
 
@@ -613,7 +616,7 @@ Asset Summary:
613
616
  Reuse (existing): {count}
614
617
  Total: {count}
615
618
 
616
- Validation: {PASSED | PASSED with warnings} ({checks_passed}/8 checks verified)
619
+ Validation: {PASSED | PASSED with warnings} ({checks_passed}/9 checks verified)
617
620
  Architect Iterations: {count}
618
621
 
619
622
  Delegation Mode: {Agent Teams | Task Tool (fallback)}
@@ -622,7 +625,7 @@ Team Members Used:
622
625
  - Explorer: completed
623
626
  - Docs Researcher: completed
624
627
  - Architect: completed ({N} iterations)
625
- - Validator: {PASSED | FAILED} ({checks_passed}/8 checks verified)
628
+ - Validator: {PASSED | FAILED} ({checks_passed}/9 checks verified)
626
629
 
627
630
  Next Step:
628
631
  Run /build-cc-assets-phases {SAVE_PATH} 1
@@ -688,4 +691,4 @@ How all assets work together once all phases are complete. Trace the end-to-end
688
691
 
689
692
  ## 6. Key Considerations
690
693
  Risks, open questions, dependencies on external factors.
691
- ```
694
+ ```
@@ -2,7 +2,7 @@
2
2
  description: Interactive project planning — gathers requirements, researches tech docs, produces specs/project.md
3
3
  argument-hint: [project idea or name]
4
4
  model: opus
5
- allowed-tools: Skill, Task, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, Read, Write, Bash, Glob, Grep
5
+ allowed-tools: Skill, Agent, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, AskUserQuestion, Read, Write, Bash, Glob, Grep
6
6
  disable-model-invocation: true
7
7
  ---
8
8
 
@@ -3,7 +3,7 @@ description: Diagnose and fix broken CC assets -- traces problems through the pr
3
3
  argument-hint: [description of the problem or path to affected asset]
4
4
  model: opus
5
5
  disable-model-invocation: true
6
- allowed-tools: Agent, Skill, Task, Read, Write, Edit, Glob, Grep, Bash, MultiEdit
6
+ allowed-tools: Agent, Skill, Read, Write, Edit, Glob, Grep, Bash, MultiEdit
7
7
  ---
8
8
 
9
9
  # Repair Workflow
@@ -119,8 +119,8 @@ You are checking whether current CC documentation affects a broken CC asset.
119
119
  ## Your Research Tasks
120
120
 
121
121
  1. Check current Claude Code skills documentation at https://code.claude.com/docs/en/skills
122
- 2. Check current Claude Code sub-agents documentation at https://docs.anthropic.com/en/docs/claude-code/sub-agents
123
- 3. Check current Claude Code settings documentation at https://docs.anthropic.com/en/docs/claude-code/settings
122
+ 2. Check current Claude Code sub-agents documentation at https://code.claude.com/docs/en/sub-agents
123
+ 3. Check current Claude Code settings documentation at https://code.claude.com/docs/en/settings
124
124
  4. If the affected asset uses agent teams, check teams documentation at https://code.claude.com/docs/en/agent-teams
125
125
 
126
126
  ## Output Format
@@ -3,7 +3,7 @@ description: Reverse-engineer a feature from a locally cloned repo into a tech-a
3
3
  argument-hint: [repo-path]
4
4
  model: opus
5
5
  disable-model-invocation: true
6
- allowed-tools: Skill, Task, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, Read, Glob, Grep, Write, Bash
6
+ allowed-tools: Skill, Agent, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, Read, Glob, Grep, Write, Bash
7
7
  ---
8
8
 
9
9
  # Reverse-Engineer From Code
@@ -581,5 +581,5 @@ Output:
581
581
 
582
582
  Next Steps:
583
583
  - Review MISSING findings in the audit report for manual design decisions
584
- - Run /audit-cc-assets again after the next CC update to check for new changes
584
+ - Run /run-audit-cc-assets again after the next CC update to check for new changes
585
585
  ```
@@ -0,0 +1,288 @@
1
+ ---
2
+ description: Provision an isolated Convex dev deployment seeded with data from the current dev deployment
3
+ allowed-tools: Agent, Skill, Bash, Read, Glob, Grep, AskUserQuestion
4
+ model: opus
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ # Setup Convex Dev Deployment
9
+
10
+ Provision a new, isolated Convex development deployment for feature work. Exports data from the current dev deployment, guides you through creating a new Convex project, imports the data snapshot, copies environment variables, and provides auth webhook instructions. The output (deployment name + URL) can feed into `/feature-dev-worktree` to create a git worktree pointed at the new deployment.
11
+
12
+ **Required Skill**: Before starting Phase 1, invoke the `convex-best-practices` skill using the Skill tool to load deployment management knowledge. This provides the CLI commands, deployment model, and auth reconnection patterns used throughout the workflow.
13
+
14
+ ## Variables
15
+
16
+ FEATURE_NAME: $ARGUMENTS
17
+
18
+ ## Workflow
19
+
20
+ ### Phase 1: Detect Project Setup (Explorer Agent)
21
+
22
+ You (the main agent) handle argument parsing and skill invocation. Then delegate detection to the explorer-agent.
23
+
24
+ 1. **Parse arguments.** Extract FEATURE_NAME from `$ARGUMENTS`.
25
+ - If FEATURE_NAME is empty (no arguments provided), use AskUserQuestion to ask: "What is the name of the feature you are creating this deployment for? (e.g., auth-refactor, payments-v2, onboarding-flow)"
26
+ - Store the FEATURE_NAME for use in Phase 3 naming suggestions.
27
+
28
+ 2. **Invoke the skill.** The `convex-best-practices` skill should already be loaded from the Required Skill invocation above. Confirm it is available in context. The deployment management knowledge from `reference/deployment-management.md` provides the CLI commands and patterns for all subsequent phases.
29
+
30
+ 3. **Delegate to explorer-agent.** Use the Agent tool to delegate to `explorer-agent` (set `subagent_type` to `explorer-agent`). Include this FULL prompt:
31
+
32
+ ```
33
+ You are scanning this project to identify its Convex setup. This information is needed to provision an isolated dev deployment.
34
+
35
+ ## Your Detection Tasks
36
+
37
+ Report the following with exact values:
38
+
39
+ 1. **Convex directory**: Where is the `convex/` directory? (relative path from project root)
40
+ 2. **Monorepo**: Is this a monorepo? If so, what type? (Turborepo, Bun workspaces, npm workspaces, pnpm workspaces, or "not a monorepo")
41
+ 3. **Package manager**: What package manager is used? (bun, npm, pnpm, yarn) -- check for lock files: bun.lock/bun.lockb, package-lock.json, pnpm-lock.yaml, yarn.lock
42
+ 4. **Env file location**: Where is `.env.local`? (may be at project root or in a specific app directory in a monorepo)
43
+ 5. **CONVEX_DEPLOYMENT**: What is the current `CONVEX_DEPLOYMENT` value from `.env.local`?
44
+ 6. **Deployment URL variable**: What is the deployment URL variable name and value? (e.g., `NEXT_PUBLIC_CONVEX_URL`, `VITE_CONVEX_URL`, `EXPO_PUBLIC_CONVEX_URL`)
45
+ 7. **Auth provider**: What auth provider is used? Search for: `@clerk/nextjs` or `@clerk/react` (Clerk), `next-auth` (NextAuth), `@auth0/nextjs-auth0` (Auth0), `convex/auth` imports (Convex Auth), or none
46
+ 8. **Clerk webhook**: If Clerk: is there a `clerk-users-webhook` HTTP action in the convex directory? Search for files containing "clerk-users-webhook" or httpAction handlers related to Clerk
47
+ 9. **Team name**: What is the Convex team name? Parse the `CONVEX_DEPLOYMENT` value -- the format is typically `<team>:<project>:<deployment>` or check `convex.json` for team info
48
+ 10. **Other env files**: Are there any other `.env` files? (`.env`, `.env.development`, `.env.production`, etc.)
49
+
50
+ ## Output Format
51
+
52
+ Report your findings as a structured list:
53
+
54
+ - **Convex Directory**: {path}
55
+ - **Monorepo**: {type or "No"}
56
+ - **Package Manager**: {name}
57
+ - **Env File Location**: {path to .env.local}
58
+ - **CONVEX_DEPLOYMENT**: {value}
59
+ - **Deployment URL Variable**: {NAME}={value}
60
+ - **Auth Provider**: {name or "None"}
61
+ - **Clerk Webhook Action**: {Yes/No -- file path if yes}
62
+ - **Team Name**: {name}
63
+ - **Other Env Files**: {list or "None"}
64
+
65
+ Do NOT suggest improvements or changes. Only report what exists.
66
+ ```
67
+
68
+ 4. **Validate findings.** After the explorer returns:
69
+ - If no `convex/` directory was found: STOP and tell the user: "No Convex setup detected in this project. This command requires an existing Convex project with a `convex/` directory and `.env.local` file."
70
+ - If `.env.local` was not found or `CONVEX_DEPLOYMENT` is empty: STOP and tell the user: "No `.env.local` file found with a `CONVEX_DEPLOYMENT` value. This command requires an existing Convex dev deployment. Run `npx convex dev` first to set up your initial deployment."
71
+ - Store all explorer findings for use in subsequent phases. In particular, store:
72
+ - `ORIGINAL_DEPLOYMENT_NAME` = the `CONVEX_DEPLOYMENT` value (this is CRITICAL -- it will be needed in Phase 6 after `.env.local` is overwritten)
73
+ - `ORIGINAL_DEPLOYMENT_URL` = the deployment URL value
74
+ - `ENV_FILE_PATH` = the path to `.env.local`
75
+ - `WORKING_DIR` = the directory containing `.env.local` (this is where Convex CLI commands should run)
76
+ - `AUTH_PROVIDER` = the auth provider name
77
+ - `HAS_CLERK_WEBHOOK` = whether a clerk-users-webhook action exists
78
+ - `TEAM_NAME` = the Convex team name
79
+
80
+ ### Phase 2: Export Snapshot
81
+
82
+ Using the explorer's findings, export a data snapshot from the current dev deployment.
83
+
84
+ 1. **Create temp directory.** Run via Bash:
85
+ ```
86
+ TIMESTAMP=$(date +%Y%m%d_%H%M%S)
87
+ mkdir -p /tmp/convex-snapshot-${TIMESTAMP}
88
+ echo "/tmp/convex-snapshot-${TIMESTAMP}"
89
+ ```
90
+ Store the temp directory path as `SNAPSHOT_DIR`.
91
+
92
+ 2. **Export data.** Run via Bash (from the WORKING_DIR):
93
+ ```
94
+ cd {WORKING_DIR} && npx convex export --path {SNAPSHOT_DIR}/snapshot.zip
95
+ ```
96
+
97
+ Note: Do NOT use `--include-file-storage` unless the user specifically asks for it. Storage files (profile pictures, uploads, etc.) can be large and are often acceptable losses for a feature deployment.
98
+
99
+ 3. **Verify export.** Run via Bash:
100
+ ```
101
+ ls -lh {SNAPSHOT_DIR}/snapshot.zip
102
+ ```
103
+ - If the export failed (non-zero exit code or file does not exist): STOP and report the error to the user. Include the full error output.
104
+ - If successful: report the snapshot file size to the user.
105
+
106
+ 4. **Report to user:**
107
+ > Snapshot exported successfully.
108
+ > - File: `{SNAPSHOT_DIR}/snapshot.zip`
109
+ > - Size: {file size}
110
+ >
111
+ > Proceeding to create a new Convex project.
112
+
113
+ ### Phase 3: Create New Project (User Manual Step)
114
+
115
+ **CONFIRMATION GATE**: Do NOT proceed to Phase 4 until the user confirms the new project has been created.
116
+
117
+ 1. **Derive project name suggestion.** Parse the current project name from `ORIGINAL_DEPLOYMENT_NAME` or from the closest `package.json` name field. Suggest a name following the convention: `{project-name}-feature-{FEATURE_NAME}`.
118
+
119
+ 2. **Present instructions via AskUserQuestion:**
120
+
121
+ > **ACTION REQUIRED: Create a new Convex project**
122
+ >
123
+ > Please create a new project in the Convex dashboard:
124
+ >
125
+ > 1. Open: https://dashboard.convex.dev
126
+ > 2. Click "Create Project"
127
+ > 3. Suggested name: `{project-name}-feature-{FEATURE_NAME}`
128
+ > 4. Select your team: `{TEAM_NAME}`
129
+ > 5. Once created, come back here
130
+ >
131
+ > What is the name of the new project you created?
132
+
133
+ 3. **Store the response** as `NEW_PROJECT_NAME`.
134
+
135
+ ### Phase 4: Configure New Deployment (User Manual Step)
136
+
137
+ **CONFIRMATION GATE**: Do NOT proceed to Phase 5 until the user confirms the deployment is configured.
138
+
139
+ 1. **Present instructions via AskUserQuestion:**
140
+
141
+ > **ACTION REQUIRED: Connect to the new deployment**
142
+ >
143
+ > Run this command in a **separate terminal** (not in Claude Code):
144
+ > ```
145
+ > npx convex dev --configure=existing --team {TEAM_NAME} --project {NEW_PROJECT_NAME}
146
+ > ```
147
+ >
148
+ > This will update your `.env.local` with the new deployment's `CONVEX_DEPLOYMENT` and URL.
149
+ >
150
+ > **IMPORTANT**: After running this command, leave that terminal running -- it deploys your schema and functions to the new deployment. Come back here and confirm when the deployment is ready.
151
+ >
152
+ > Have you run the command and is the deployment ready?
153
+
154
+ 2. **Capture new deployment values.** After the user confirms, read the `.env.local` file at `ENV_FILE_PATH` to capture:
155
+ - `NEW_DEPLOYMENT_NAME` = the new `CONVEX_DEPLOYMENT` value
156
+ - `NEW_DEPLOYMENT_URL` = the new deployment URL value
157
+
158
+ 3. **Verify the switch.** Confirm that `NEW_DEPLOYMENT_NAME` is different from `ORIGINAL_DEPLOYMENT_NAME`. If they are the same, warn the user: "It looks like `.env.local` still points to the original deployment. Please check that you ran `npx convex dev --configure=existing` successfully."
159
+
160
+ ### Phase 5: Import Snapshot
161
+
162
+ Import the previously exported data into the new deployment.
163
+
164
+ 1. **Import data.** Run via Bash (from the WORKING_DIR):
165
+ ```
166
+ cd {WORKING_DIR} && npx convex import {SNAPSHOT_DIR}/snapshot.zip
167
+ ```
168
+
169
+ 2. **Handle import result:**
170
+ - If successful: report "Data imported successfully" and proceed to Phase 6.
171
+ - If failed with "table already contains data" or similar: retry with the `--replace` flag:
172
+ ```
173
+ cd {WORKING_DIR} && npx convex import --replace {SNAPSHOT_DIR}/snapshot.zip
174
+ ```
175
+ - If the retry also fails: report the full error to the user and use AskUserQuestion to ask how to proceed:
176
+ > Import failed. Error: {error details}
177
+ >
178
+ > Options:
179
+ > A) Retry with different flags
180
+ > B) Skip import -- I'll handle data manually
181
+ > C) Abort -- I'll fix the issue and try again later
182
+
183
+ 3. **Report to user:**
184
+ > Data imported to the new deployment.
185
+ > - Source: `{ORIGINAL_DEPLOYMENT_NAME}`
186
+ > - Target: `{NEW_DEPLOYMENT_NAME}`
187
+
188
+ ### Phase 6: Copy Environment Variables
189
+
190
+ Copy environment variables from the source deployment to the new deployment.
191
+
192
+ 1. **List source env vars.** Since `.env.local` now points to the new deployment, use `--deployment-name` to target the original. Run via Bash:
193
+ ```
194
+ cd {WORKING_DIR} && npx convex env list --deployment-name {ORIGINAL_DEPLOYMENT_NAME}
195
+ ```
196
+
197
+ Note: This is why we stored `ORIGINAL_DEPLOYMENT_NAME` in Phase 1 -- `.env.local` was overwritten in Phase 4.
198
+
199
+ 2. **Parse the output.** Extract NAME=VALUE pairs from the env list output. If the output is empty (no environment variables), skip to Phase 7 with a note: "No environment variables found on the source deployment. Skipping env var copy."
200
+
201
+ 3. **Present to user via AskUserQuestion:**
202
+
203
+ > **Environment Variables from source deployment (`{ORIGINAL_DEPLOYMENT_NAME}`):**
204
+ >
205
+ > {list each variable with name visible and value partially masked, e.g., CLERK_SECRET_KEY=sk_test_***...***abc}
206
+ >
207
+ > Which variables should be copied to the new deployment?
208
+ > A) All of them (Recommended)
209
+ > B) Let me select which ones to exclude
210
+ > C) Skip -- I'll set them manually
211
+
212
+ 4. **Handle response:**
213
+ - If A: copy all variables
214
+ - If B: use AskUserQuestion to ask which variables to exclude, then copy the rest
215
+ - If C: skip to Phase 7
216
+
217
+ 5. **Copy approved variables.** For each approved variable, run via Bash:
218
+ ```
219
+ cd {WORKING_DIR} && npx convex env set {NAME} '{VALUE}'
220
+ ```
221
+
222
+ Run these sequentially, not in parallel. Report progress as each variable is set.
223
+
224
+ 6. **Track results.** Store the count of copied vs. skipped variables and the names of any skipped variables for the final report.
225
+
226
+ ### Phase 7: Cleanup and Report
227
+
228
+ 1. **Clean up temp snapshot.** Run via Bash:
229
+ ```
230
+ rm -rf {SNAPSHOT_DIR}
231
+ ```
232
+
233
+ 2. **Determine auth instructions.** Based on the explorer findings:
234
+ - If AUTH_PROVIDER is "Clerk" AND HAS_CLERK_WEBHOOK is true, present Clerk webhook instructions (see below).
235
+ - If AUTH_PROVIDER is "Clerk" but no webhook action was found, present a generic note: "Your project uses Clerk. Verify that your auth configuration works with the new deployment. If you have webhook-based user sync, you may need to add a new webhook endpoint."
236
+ - If AUTH_PROVIDER is something other than "Clerk" and not "None", present: "Your project uses {AUTH_PROVIDER}. If your auth setup includes webhooks or deployment-specific configuration, you may need to update it for the new deployment."
237
+ - If AUTH_PROVIDER is "None", skip auth instructions.
238
+
239
+ 3. **Clerk webhook instructions** (if applicable):
240
+
241
+ > **ACTION REQUIRED: Configure Clerk Webhook**
242
+ >
243
+ > Your project uses Clerk with a webhook for user sync. You need to add a new webhook endpoint in the Clerk dashboard:
244
+ >
245
+ > 1. Open the Clerk dashboard: https://dashboard.clerk.com
246
+ > 2. Go to **Webhooks**
247
+ > 3. Click **Add Endpoint**
248
+ > 4. URL: `https://{NEW_DEPLOYMENT_NAME}.convex.site/clerk-users-webhook`
249
+ > 5. Subscribe to the same events as your existing webhook (typically: `user.created`, `user.updated`, `user.deleted`)
250
+ >
251
+ > Without this, user creation/updates in Clerk will not sync to your new deployment's database.
252
+
253
+ Note: The `{NEW_DEPLOYMENT_NAME}` is used as the deployment slug in the `.convex.site` URL. If the deployment name format includes a team prefix (e.g., `team:project:deployment`), extract just the deployment slug portion. The correct slug is typically visible in the Convex dashboard URL.
254
+
255
+ 4. **Present the final report.**
256
+
257
+ ## Report
258
+
259
+ Present the final report in this exact format:
260
+
261
+ ```
262
+ DEPLOYMENT SETUP COMPLETE
263
+
264
+ Source Deployment: {ORIGINAL_DEPLOYMENT_NAME}
265
+ New Deployment: {NEW_DEPLOYMENT_NAME}
266
+ New URL: {NEW_DEPLOYMENT_URL}
267
+ Feature: {FEATURE_NAME}
268
+
269
+ Data:
270
+ Snapshot exported: {file size}
271
+ Tables imported: successfully
272
+ Storage files: Not transferred (expected)
273
+
274
+ Environment Variables:
275
+ Copied: {count} of {total}
276
+ Skipped: {list of skipped var names, or "None"}
277
+
278
+ Auth:
279
+ Provider: {AUTH_PROVIDER}
280
+ Webhook setup: {Required -- see instructions above | Not applicable}
281
+
282
+ Next Steps:
283
+ 1. {If Clerk webhook needed: "Configure the Clerk webhook (see instructions above)"}
284
+ 2. Verify the new deployment works: open https://dashboard.convex.dev and check your data
285
+ 3. Your .env.local now points to the new deployment -- all local dev uses the new deployment
286
+ 4. To switch back to the original: npx convex dev --configure=existing --team {TEAM_NAME} --project {original project name}
287
+ 5. Future: run /feature-dev-worktree to create a git worktree using this deployment
288
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  description: Scaffold a new project from specs/project.md — creates codebase, installs packages, initializes state files
3
- allowed-tools: Task, Skill, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, Read, Glob, Grep, AskUserQuestion
3
+ allowed-tools: Agent, Skill, TeamCreate, SendMessage, TaskCreate, TaskUpdate, TaskList, TaskGet, Read, Glob, Grep, AskUserQuestion
4
4
  model: opus
5
5
  disable-model-invocation: true
6
6
  ---
@@ -212,7 +212,7 @@ For the structured report template that aggregates findings, see [templates/audi
212
212
 
213
213
  ## For Agents Consuming This Skill
214
214
 
215
- This section guides the meta-auditor-agent and the `/audit-cc-assets` command in applying this methodology. The meta-auditor-agent has this skill pre-loaded via its `skills:` frontmatter field. The command also invokes this skill via the Skill tool for its own context.
215
+ This section guides the meta-auditor-agent and the `/run-audit-cc-assets` command in applying this methodology. The meta-auditor-agent has this skill pre-loaded via its `skills:` frontmatter field. The command also invokes this skill via the Skill tool for its own context.
216
216
 
217
217
  ### Agent Roles
218
218
 
@@ -233,7 +233,7 @@ This section guides the meta-auditor-agent and the `/audit-cc-assets` command in
233
233
 
234
234
  ### What This Skill Does NOT Cover
235
235
 
236
- - This skill does NOT contain workflow steps for the audit process (those belong in the `/audit-cc-assets` command, Phase 3).
236
+ - This skill does NOT contain workflow steps for the audit process (those belong in the `/run-audit-cc-assets` command, Phase 3).
237
237
  - This skill does NOT prescribe which tools to use or how to interact with the user (those are command and agent concerns).
238
238
  - This skill does NOT encode domain-specific technology knowledge (e.g., React, Convex, TypeScript).
239
239
  - This skill does NOT duplicate CC asset creation knowledge (that belongs in the `claude-code-primitives` skill).
@@ -1,6 +1,6 @@
1
1
  # Audit Report Template
2
2
 
3
- This template defines the structured output format for CC asset audit findings. The meta-auditor-agent uses this template to produce its report. The `/audit-cc-assets` command presents this report to the user and uses it to drive the fix approval workflow.
3
+ This template defines the structured output format for CC asset audit findings. The meta-auditor-agent uses this template to produce its report. The `/run-audit-cc-assets` command presents this report to the user and uses it to drive the fix approval workflow.
4
4
 
5
5
  ## Template
6
6
 
@@ -52,6 +52,6 @@ The file `.claude/audit-state.json` tracks audit history for the project. It is
52
52
 
53
53
  - The `auditHistory` array is append-only. New entries are added at the end after each audit completes. Do not remove or modify previous entries.
54
54
  - The `lastAuditSummary` object is always overwritten with the most recent audit's data. It provides a quick snapshot without needing to parse the full history array.
55
- - The `/audit-cc-assets` command reads this file at the start of each audit to determine whether to run a full or incremental audit. If `lastAuditedCCVersion` is more than 5 versions behind the current CC version, a full audit is recommended.
55
+ - The `/run-audit-cc-assets` command reads this file at the start of each audit to determine whether to run a full or incremental audit. If `lastAuditedCCVersion` is more than 5 versions behind the current CC version, a full audit is recommended.
56
56
  - If the file does not exist, the command creates it after the first audit completes. The first audit is always a full audit.
57
57
  - The file should be committed to version control so that all team members share the same audit baseline.