claude-dev-env 2.14.0 → 2.14.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.
@@ -1,76 +0,0 @@
1
- ---
2
- description: Initialize the Neon schema used by the hook-log extractor
3
- allowed-tools: Bash
4
- ---
5
-
6
- Initialize the Neon Postgres schema that backs the hook-log diagnostic
7
- extractor. Run this once per new machine, or after rotating the Neon
8
- project, before the Stop hook begins inserting rows.
9
-
10
- ## Prerequisites
11
-
12
- One-time setup on each machine:
13
-
14
- 1. **Install the Bitwarden Secret Manager CLI** so the `bws` command is on PATH.
15
- See https://bitwarden.com/help/secrets-manager-cli/ for platform-specific instructions.
16
-
17
- 2. **Create a Bitwarden machine account** scoped to the Neon connection
18
- secret, generate its access token, and export it to the current user
19
- environment.
20
-
21
- On Windows (PowerShell):
22
-
23
- ```powershell
24
- setx BWS_ACCESS_TOKEN "<machine-account-access-token>"
25
- ```
26
-
27
- Open a new terminal so the variable takes effect.
28
-
29
- On macOS or Linux (bash/zsh — add to `~/.bashrc`, `~/.zshrc`, or the
30
- equivalent profile so new shells inherit it):
31
-
32
- ```bash
33
- export BWS_ACCESS_TOKEN="<machine-account-access-token>"
34
- ```
35
-
36
- 3. **Store the Neon connection string** in the Bitwarden Secrets Manager
37
- under the key `NEON_HOOK_LOGS_DATABASE_URL`. The value is the full
38
- `postgres://user:password@host/database?sslmode=require` URL that
39
- Neon provides on the project dashboard.
40
-
41
- 4. **Install the Python dependencies** so the extractor can reach Neon.
42
- Production runtime:
43
-
44
- ```
45
- pip install -r packages/claude-dev-env/hooks/diagnostic/requirements-hook-logs.txt
46
- ```
47
-
48
- Development (adds `pytest` on top of the runtime deps):
49
-
50
- ```
51
- pip install -r packages/claude-dev-env/hooks/diagnostic/requirements-hook-logs-dev.txt
52
- ```
53
-
54
- ## Run the init
55
-
56
- ```
57
- bws run -- python packages/claude-dev-env/hooks/diagnostic/hook_log_init.py
58
- ```
59
-
60
- The init script performs these steps in order:
61
-
62
- 1. Verifies `NEON_HOOK_LOGS_DATABASE_URL` is set. `BWS_ACCESS_TOKEN` is
63
- consumed by the outer `bws` CLI before it spawns the Python child
64
- process; `bws run` intentionally strips it from the child
65
- environment to prevent subprocess credential leakage, so the Python
66
- script never sees it.
67
- 2. Connects to Neon with a 5-second timeout.
68
- 3. Applies the DDL in `packages/claude-dev-env/hooks/diagnostic/schema.sql`
69
- using `CREATE TABLE IF NOT EXISTS`, `CREATE INDEX IF NOT EXISTS`, and
70
- `CREATE OR REPLACE VIEW` so the script stays idempotent.
71
- 4. Inserts a sentinel row with `outcome = 'init_probe'`, selects it back,
72
- and deletes it to confirm read-write parity.
73
- 5. Prints a success report showing the Neon host, table name, and row count.
74
-
75
- A missing environment variable exits with status 1 and lists the
76
- missing name on stderr; any other failure surfaces the psycopg exception.
@@ -1,102 +0,0 @@
1
- ---
2
- description: Provide full implementation context to right-sized engineer in XML format
3
- allowed-tools: Task, Read, Grep, Glob
4
- ---
5
-
6
- **Implementation with Full Context - XML-Structured Guidance**
7
-
8
- Launch a clean-coder agent — `model: sonnet`, worker-model routing per [`skills/orchestrator/SKILL.md`](../skills/orchestrator/SKILL.md#workflow-agent-routing); resolver-supplied sonnet-equivalent on third-party hosts — with COMPREHENSIVE implementation context provided in structured XML format.
9
-
10
- ## Process:
11
-
12
- 1. **Gather Complete Context** - Analyze the codebase to understand:
13
- - Existing patterns and conventions
14
- - Available dependencies and libraries
15
- - Testing approaches and frameworks
16
- - File organization and naming conventions
17
-
18
- 2. **Structure the Implementation Request in XML**:
19
- ```xml
20
- <implementation-context>
21
- <requirements>
22
- <user-request>Exact user requirements</user-request>
23
- <acceptance-criteria>What defines success</acceptance-criteria>
24
- <constraints>Any limitations or must-haves</constraints>
25
- </requirements>
26
-
27
- <project-context>
28
- <codebase-patterns>
29
- <pattern>Existing patterns found in codebase</pattern>
30
- <conventions>Naming and style conventions observed</conventions>
31
- <architecture>Current architectural approach</architecture>
32
- </codebase-patterns>
33
- <dependencies>
34
- <available>List of available libraries/frameworks</available>
35
- <avoid>Libraries NOT to use</avoid>
36
- </dependencies>
37
- <testing-approach>
38
- <framework>Testing framework in use</framework>
39
- <patterns>Test file patterns and locations</patterns>
40
- </testing-approach>
41
- </project-context>
42
-
43
- <implementation-plan>
44
- <approach>High-level approach to implementation</approach>
45
- <steps>
46
- <step priority="1">First implementation step</step>
47
- <step priority="2">Second implementation step</step>
48
- <!-- Additional steps as needed -->
49
- </steps>
50
- <test-strategy>
51
- <tdd-requirement>MANDATORY: Write failing tests first</tdd-requirement>
52
- <coverage>Expected test coverage approach</coverage>
53
- </test-strategy>
54
- </implementation-plan>
55
-
56
- <engineering-principles>
57
- <must-follow>
58
- <principle>TDD - No production code without failing test</principle>
59
- <principle>Follow existing patterns exactly</principle>
60
- <principle>Use available utilities - no reinventing</principle>
61
- <principle>Small, focused functions</principle>
62
- <principle>Proper error handling</principle>
63
- </must-follow>
64
- <avoid>
65
- <anti-pattern>Over-engineering for current scale</anti-pattern>
66
- <anti-pattern>Breaking existing conventions</anti-pattern>
67
- <anti-pattern>Copy-paste programming</anti-pattern>
68
- <anti-pattern>Magic numbers/strings</anti-pattern>
69
- </avoid>
70
- </engineering-principles>
71
-
72
- <success-criteria>
73
- <criterion>All tests pass</criterion>
74
- <criterion>Follows existing patterns</criterion>
75
- <criterion>No linting/type errors</criterion>
76
- <criterion>Maintains backward compatibility</criterion>
77
- </success-criteria>
78
- </implementation-context>
79
- ```
80
-
81
- 3. **Provide to Agent with Clear Instructions**:
82
- - "ULTRATHINK through this implementation"
83
- - "Follow TDD strictly - write tests FIRST"
84
- - "Match existing patterns EXACTLY"
85
- - "Use the XML context to understand all requirements and constraints"
86
-
87
- 4. **Agent Should**:
88
- - Parse the XML context thoroughly
89
- - Implement following TDD (Red-Green-Refactor)
90
- - Match existing codebase patterns
91
- - Use available utilities and libraries
92
- - Apply right-sized engineering principles
93
- - Validate against success criteria
94
-
95
- **CRITICAL REQUIREMENTS**:
96
- - Provide COMPLETE context - incomplete context leads to wrong implementations
97
- - Ensure XML is well-formed and comprehensive
98
- - Include concrete examples from existing code
99
- - Specify exact file locations and patterns
100
- - Make constraints and requirements crystal clear
101
-
102
- This ensures the implementation agent has everything needed to deliver a solution that integrates seamlessly with the existing codebase while following best practices.
package/commands/plan.md DELETED
@@ -1,14 +0,0 @@
1
- Plan a feature through the workflow-backed `anthropic-plan` skill.
2
-
3
- Invoke `anthropic-plan` with the user request. The skill launches the Claude Code Workflow at:
4
-
5
- `$HOME/.claude/skills/anthropic-plan/workflow/plan-packet.mjs`
6
-
7
- The workflow creates a validated `docs/plans/<slug>/` packet, spawns the fresh `plan-packet-validator` agent, repairs packet findings, and stops before implementation.
8
-
9
- Usage:
10
-
11
- ```text
12
- /plan add user authentication
13
- /plan refactor the payment system
14
- ```
@@ -1,47 +0,0 @@
1
- ---
2
- description: Fetch and display all comments from a GitHub PR (fetches comments from the current repo)
3
- ---
4
-
5
- You are an AI assistant integrated into a git-based version control system. Your task is to fetch and display comments from a GitHub pull request.
6
-
7
- **CRITICAL: Detect the repository from the current git remote (upstream preferred, then origin).**
8
-
9
- Follow these steps:
10
-
11
- 1. Detect `{owner}/{repo}` from `gh repo view --json nameWithOwner -q .nameWithOwner`
12
- 2. Extract PR number from the argument (e.g., "PR44" → 44, "44" → 44)
13
- 3. Use `gh api repos/{owner}/{repo}/issues/{number}/comments` to get PR-level comments
14
- 4. Use `gh api repos/{owner}/{repo}/pulls/{number}/comments` to get inline review comments
15
- 5. Use `gh api repos/{owner}/{repo}/pulls/{number}/reviews` to get review summaries
16
- 6. Parse and format all comments in chronological order
17
- 7. Return ONLY the formatted comments, with no additional text
18
-
19
- Format the comments as:
20
-
21
- ## Comments
22
-
23
- ### PR-level Comments
24
-
25
- [For each issue comment:]
26
- - @author (timestamp):
27
- > quoted comment text
28
-
29
- ### Review: @reviewer [action] (timestamp)
30
-
31
- [Review summary if present]
32
-
33
- [For each inline code comment:]
34
- - @author file.ts#line:
35
- ```diff
36
- [diff_hunk from the API response]
37
- ```
38
- > quoted comment text
39
-
40
- If there are no comments, return "No comments found."
41
-
42
- Remember:
43
- 1. Only show the actual comments, no explanatory text
44
- 2. Include PR-level comments, review summaries, and inline code review comments
45
- 3. Preserve chronological order
46
- 4. Show the file and line number context for inline code review comments
47
- 5. Detect {owner}/{repo} dynamically from the current git remote
@@ -1,5 +0,0 @@
1
- Review the current plan against code standards.
2
-
3
- 1. Identify plan files in `.planning/phases/` or `docs/plans/`
4
- 2. Review the plan against CODE_RULES.md standards
5
- 3. Report the verdict back to the user
@@ -1,15 +0,0 @@
1
- ---
2
- description: Prevent over/under-engineering
3
- allowed-tools: Task
4
- ---
5
-
6
- Launch the clean-coder agent — `model: sonnet`, worker-model routing per [`skills/orchestrator/SKILL.md`](../skills/orchestrator/SKILL.md#workflow-agent-routing); resolver-supplied sonnet-equivalent on third-party hosts — to review code for appropriate engineering practices.
7
-
8
- The agent will evaluate whether abstractions, patterns, and practices match the actual needs of the project, ensuring code is neither over-engineered nor under-engineered for its current scale and purpose.
9
-
10
- The review will identify:
11
- - **Over-engineering**: Abstract classes with single implementations, unnecessary interfaces, complex patterns where simple functions would suffice
12
- - **Under-engineering**: Hardcoded values, magic numbers/strings, copy-pasted code, missing error handling
13
- - **Good examples**: Appropriate constant extraction, well-scoped functions, clear error handling, simple maintainable solutions
14
-
15
- The goal is to build it right, but build it simple - applying good engineering principles at the appropriate scale for the project.
package/commands/sum.md DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- name: sum
3
- description: Generate a formatted session summary for quick pickup in new sessions
4
- ---
5
-
6
- Provide a nicely formatted summary of where we are leaving off in this session.
7
-
8
- Use this format with proper line breaks:
9
-
10
- ```
11
- ---
12
-
13
- **Session Summary: [Project/Task Name]**
14
-
15
- **Status:** [Current state - e.g., Complete, In Progress, Blocked]
16
-
17
- **Commits:** (if any)
18
- - `hash` - Description
19
-
20
- **What's Done:**
21
- - Item 1
22
- - Item 2
23
-
24
- **Next Step:**
25
- [Single clear next action]
26
-
27
- ---
28
- ```
29
-
30
- Keep it concise but readable. Focus on actionable context, not history.