cc-dev-template 0.1.82 → 0.1.83

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-dev-template",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "Structured AI-assisted development framework for Claude Code",
5
5
  "bin": {
6
6
  "cc-dev-template": "./bin/install.js"
@@ -1,23 +1,43 @@
1
1
  ---
2
2
  name: objective-researcher
3
3
  description: Answers codebase questions objectively without knowing the feature being built. Produces factual research documentation.
4
- tools: Read, Grep, Glob, Bash, Write
5
4
  permissionMode: bypassPermissions
6
5
  maxTurns: 30
7
6
  model: sonnet
7
+ hooks:
8
+ PreToolUse:
9
+ - matcher: "Read"
10
+ hooks:
11
+ - type: command
12
+ command: "$HOME/.claude/scripts/restrict-researcher.sh"
13
+ - matcher: "Write"
14
+ hooks:
15
+ - type: command
16
+ command: "$HOME/.claude/scripts/restrict-researcher.sh"
17
+ - matcher: "Edit"
18
+ hooks:
19
+ - type: command
20
+ command: "$HOME/.claude/scripts/restrict-researcher.sh"
21
+ - matcher: "Grep"
22
+ hooks:
23
+ - type: command
24
+ command: "$HOME/.claude/scripts/restrict-researcher.sh"
25
+ - matcher: "Glob"
26
+ hooks:
27
+ - type: command
28
+ command: "$HOME/.claude/scripts/restrict-researcher.sh"
8
29
  ---
9
30
 
10
- You are an objective codebase researcher. You receive questions about a codebase and answer them by exploring the code.
31
+ You are an objective codebase researcher. You receive questions about a codebase and answer them by exploring the source code.
11
32
 
12
- ## Critical Rule
13
-
14
- You do NOT know what feature is being built. You only have questions. Answer them factually.
33
+ You do NOT know what feature is being built. You only have questions. Answer them factually by reading source code.
15
34
 
16
35
  - Report what EXISTS, not what SHOULD exist
17
36
  - Do not suggest implementations or improvements
18
37
  - Do not speculate about what someone might want to build
19
38
  - If you find multiple patterns for the same thing, report ALL of them with locations
20
39
  - If a question cannot be answered from the codebase, say so explicitly
40
+ - Explore source code only — not documentation, READMEs, or markdown files in docs/
21
41
 
22
42
  ## Process
23
43
 
@@ -19,52 +19,34 @@ hooks:
19
19
 
20
20
  You are a question generator. You read a feature intent document and produce research questions that a senior engineer would need answered about the codebase before implementing this feature.
21
21
 
22
- ## Your Role
23
-
24
- You generate questions. You do NOT:
25
-
26
- - Research or explore the codebase (you have no search tools)
27
- - Suggest implementations or architectural decisions
28
- - Write code or pseudocode
29
- - Speculate about how the codebase might work
22
+ You generate questions only. You cannot explore the codebase, suggest implementations, write code, or speculate about how the codebase works.
30
23
 
31
24
  ## Process
32
25
 
33
26
  1. Read the intent document at the path provided in your prompt
34
- 2. Think about what a senior engineer would need to know about the codebase before they could implement this
27
+ 2. Think deeply about what you'd need to know to actually build this — not just what the system looks like, but how you'd hook into it
35
28
  3. Write organized, specific questions to the output path provided
36
29
 
37
- ## Output Format
30
+ ## Thinking Lenses
38
31
 
39
- Write a markdown file with questions organized by category:
32
+ Go beyond "what exists" questions. Apply these lenses:
40
33
 
41
- ```markdown
42
- # Research Questions
34
+ **Integration seams** — Where would this feature plug into the existing system? What hooks, extension points, callbacks, event systems, or middleware would you need? How does the system currently propagate changes, and can you intercept or extend that flow?
43
35
 
44
- ## Existing Patterns
45
- - How does the codebase currently handle {relevant functionality}?
46
- - What patterns are used for {similar features}?
47
- - Are there existing utilities or helpers for {relevant operations}?
36
+ **Identity and addressing** — How are the entities this feature touches identified, referenced, and addressed? What are their keys, IDs, or paths? What happens to identity when entities are created, split, merged, moved, or deleted?
48
37
 
49
- ## Data Model
50
- - What data structures exist for {relevant entities}?
51
- - How is {relevant data} currently stored and accessed?
38
+ **Implicit contracts** — What assumptions does the existing code likely make that this feature might violate? What invariants exist around data shape, ordering, uniqueness, or lifecycle? What would break if two users did the same thing simultaneously?
52
39
 
53
- ## Integration Points
54
- - What services or modules would this feature interact with?
55
- - Are there existing APIs or interfaces it should conform to?
40
+ **Data flow and mutation** — How does data currently flow from user action → state change → persistence → UI update? Can you inject operations into that flow, or do you have to replace it? Is state management pull-based or push-based?
56
41
 
57
- ## Testing Infrastructure
58
- - What testing patterns does the project use for {relevant scenarios}?
59
- - What test runners and frameworks are configured?
42
+ **Failure and recovery** — What happens when this feature partially fails? What are the rollback semantics? How does the system currently handle the degraded versions of what this feature introduces?
43
+
44
+ ## Output Format
60
45
 
61
- ## Dependencies
62
- - Are there existing libraries in the project for {relevant functionality}?
63
- - What versions of key frameworks are in use?
64
- ```
46
+ Write a markdown file with questions organized by category. Derive categories from the feature — they should reflect the actual problem domains, not generic buckets.
65
47
 
66
48
  Each question must be:
67
49
 
68
50
  - **Specific**: "How does the auth module handle session tokens?" not "How does auth work?"
69
51
  - **Codebase-answerable**: Answerable by reading project files, not by asking the user
70
- - **Relevant**: Directly related to implementing the feature described in the intent
52
+ - **Deep**: Prioritize "how would I hook into X" over "what does X look like"
@@ -0,0 +1,49 @@
1
+ #!/bin/bash
2
+ # Restricts objective-researcher from reading docs/intent or any documentation.
3
+ # The researcher must answer questions by exploring CODE, not documentation.
4
+ # It can only read questions.md (input) and write research.md (output) in docs/specs/.
5
+ # Receives JSON on stdin with tool_name and tool_input.
6
+
7
+ input=$(cat)
8
+ tool_name=$(echo "$input" | jq -r '.tool_name // empty')
9
+ file_path=$(echo "$input" | jq -r '.tool_input.file_path // empty')
10
+ search_path=$(echo "$input" | jq -r '.tool_input.path // empty')
11
+
12
+ # Write/Edit: only allow research.md in docs/specs/
13
+ if [[ "$tool_name" == "Write" || "$tool_name" == "Edit" ]]; then
14
+ if [[ "$file_path" == */docs/specs/*/research.md ]]; then
15
+ exit 0
16
+ fi
17
+ cat << 'EOF'
18
+ {"permissionDecision":"deny","message":"Write access restricted to research.md only."}
19
+ EOF
20
+ exit 0
21
+ fi
22
+
23
+ # Read: allow questions.md, block everything else in docs/
24
+ if [[ "$tool_name" == "Read" ]]; then
25
+ if [[ "$file_path" == */docs/specs/*/questions.md ]]; then
26
+ exit 0
27
+ fi
28
+ if [[ "$file_path" == */docs/* ]]; then
29
+ cat << 'EOF'
30
+ {"permissionDecision":"deny","message":"Cannot read documentation. Research the codebase source code only — not docs, READMEs, or intent files."}
31
+ EOF
32
+ exit 0
33
+ fi
34
+ exit 0
35
+ fi
36
+
37
+ # Grep/Glob: block if searching inside docs/
38
+ if [[ "$tool_name" == "Grep" || "$tool_name" == "Glob" ]]; then
39
+ if [[ "$search_path" == */docs/* || "$search_path" == */docs ]]; then
40
+ cat << 'EOF'
41
+ {"permissionDecision":"deny","message":"Cannot search documentation. Research the codebase source code only."}
42
+ EOF
43
+ exit 0
44
+ fi
45
+ exit 0
46
+ fi
47
+
48
+ # Allow everything else
49
+ exit 0
@@ -1,23 +1,43 @@
1
1
  #!/bin/bash
2
- # Restricts Read/Write operations to the docs/specs/ directory.
3
- # Used by question-generator sub-agent to prevent codebase exploration.
2
+ # Restricts question-generator to only reading intent.md and writing questions.md.
4
3
  # Receives JSON on stdin with tool_name and tool_input.
5
4
 
6
5
  input=$(cat)
6
+ tool_name=$(echo "$input" | jq -r '.tool_name // empty')
7
7
  file_path=$(echo "$input" | jq -r '.tool_input.file_path // empty')
8
8
 
9
- # If no file_path in the tool input, allow the operation
9
+ # If no file_path in the tool input, deny (shouldn't happen for Read/Write)
10
10
  if [ -z "$file_path" ]; then
11
+ cat << 'EOF'
12
+ {"permissionDecision":"deny","message":"No file path provided."}
13
+ EOF
14
+ exit 0
15
+ fi
16
+
17
+ # Read: only allow intent.md within docs/specs/
18
+ if [[ "$tool_name" == "Read" ]]; then
19
+ if [[ "$file_path" == */docs/specs/*/intent.md ]]; then
20
+ exit 0
21
+ fi
22
+ cat << 'EOF'
23
+ {"permissionDecision":"deny","message":"Read access restricted to intent.md only. You generate questions from the intent — do not explore the codebase."}
24
+ EOF
11
25
  exit 0
12
26
  fi
13
27
 
14
- # Allow access to docs/specs/ directory
15
- if [[ "$file_path" == *"/docs/specs/"* ]]; then
28
+ # Write: only allow questions.md within docs/specs/
29
+ if [[ "$tool_name" == "Write" ]]; then
30
+ if [[ "$file_path" == */docs/specs/*/questions.md ]]; then
31
+ exit 0
32
+ fi
33
+ cat << 'EOF'
34
+ {"permissionDecision":"deny","message":"Write access restricted to questions.md only."}
35
+ EOF
16
36
  exit 0
17
37
  fi
18
38
 
19
- # Deny everything else
39
+ # Deny anything else
20
40
  cat << 'EOF'
21
- {"permissionDecision":"deny","message":"Access restricted to docs/specs/ directory only."}
41
+ {"permissionDecision":"deny","message":"Access restricted to intent.md (read) and questions.md (write) only."}
22
42
  EOF
23
43
  exit 0
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: ignore-config
3
+ description: Analyze a project and recommend a .claudeignore file. Use when setting up or updating .claudeignore to exclude git-tracked files that aren't useful for Claude.
4
+ disable-model-invocation: true
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ # Claudeignore
9
+
10
+ Analyze the current project and recommend a `.claudeignore` configuration.
11
+
12
+ `.claudeignore` excludes files from Claude's indexing. Since `.gitignore` is already respected, `.claudeignore` targets **git-tracked files** that aren't useful for Claude — lock files, large generated assets, binary files, fixture data, etc.
13
+
14
+ Use the Read tool on `references/step-1-analyze.md` to begin the analysis.
@@ -0,0 +1,32 @@
1
+ # Step 1: Analyze the Project
2
+
3
+ ## Check Existing State
4
+
5
+ 1. Check if `.claudeignore` already exists. If it does, read it — this is an update flow, and recommendations should complement what's already there.
6
+ 2. Check `.gitignore` to understand what's already excluded from Claude's view.
7
+
8
+ ## Scan for Candidates
9
+
10
+ Run `git ls-files` and identify tracked files that are poor candidates for Claude's context. Focus on:
11
+
12
+ - **Lock files** — dependency locks are large and not useful for understanding code (package-lock.json, yarn.lock, pnpm-lock.yaml, Gemfile.lock, poetry.lock, Cargo.lock, composer.lock, etc.)
13
+ - **Generated/compiled assets** — minified JS/CSS, source maps, bundled output, compiled protobuf, auto-generated code committed to the repo
14
+ - **Binary files** — images, fonts, compiled binaries, archives, database files
15
+ - **Large data files** — fixtures, seed data, snapshots, migration dumps, sample datasets
16
+ - **Vendored dependencies** — committed vendor/ or third-party directories
17
+
18
+ Use file size as a signal — find the largest tracked files to surface high-impact candidates.
19
+
20
+ ## Present Recommendations
21
+
22
+ Group findings by category. For each recommendation, include:
23
+
24
+ - The pattern (e.g., `package-lock.json`, `*.min.js`, `vendor/`)
25
+ - Why it's not useful for Claude
26
+ - The file size or count impact
27
+
28
+ If the project is small and clean with nothing worth ignoring, say so — a `.claudeignore` isn't always needed.
29
+
30
+ If there is an existing `.claudeignore`, highlight only new recommendations not already covered.
31
+
32
+ Present the recommendations and ask the user which patterns to include. Use the Read tool on `references/step-2-create.md` to create the file based on their decisions.
@@ -0,0 +1,20 @@
1
+ # Step 2: Create the File
2
+
3
+ Based on the user's selections, write the `.claudeignore` file.
4
+
5
+ ## Format
6
+
7
+ - Group patterns by category with comment headers
8
+ - Add a brief comment at the top explaining the file's purpose
9
+ - One pattern per line
10
+ - Keep it clean — match `.gitignore` conventions
11
+
12
+ ## If Updating
13
+
14
+ Read the existing `.claudeignore` and merge. Place new patterns in the appropriate category sections. Avoid duplicates.
15
+
16
+ ## After Writing
17
+
18
+ Show the user the final file contents and confirm it looks right. If they want changes, apply them.
19
+
20
+ Use the Read tool on `references/step-3-reflect.md` to review your work and report results to the user.
@@ -0,0 +1,18 @@
1
+ # Step 3: Reflect
2
+
3
+ Review how this skill performed.
4
+
5
+ ## Assessment
6
+
7
+ - Were the scan heuristics effective? Did they catch the right files, or miss obvious candidates?
8
+ - Were any recommendations wrong — patterns that would have excluded files Claude actually needs?
9
+ - Did the category groupings make sense for this project type?
10
+ - Was the file size scan command effective, or did it need adjustment?
11
+
12
+ ## Action
13
+
14
+ If any instructions were wrong, incomplete, or misleading, identify the specific file where the issue lives, read it, and apply the fix. Only add knowledge a fresh Claude instance would not already have.
15
+
16
+ ## Report
17
+
18
+ Tell the user what was created and summarize the impact (approximate number of files/size excluded from Claude's context). If skill files were updated, explain what changed and why.