@vyuhlabs/dxkit 2.4.8 → 2.5.0
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/CHANGELOG.md +235 -0
- package/README.md +360 -439
- package/dist/analyzers/security/aggregator.d.ts.map +1 -1
- package/dist/analyzers/security/aggregator.js +4 -46
- package/dist/analyzers/security/aggregator.js.map +1 -1
- package/dist/analyzers/tools/fingerprint.d.ts +91 -26
- package/dist/analyzers/tools/fingerprint.d.ts.map +1 -1
- package/dist/analyzers/tools/fingerprint.js +111 -22
- package/dist/analyzers/tools/fingerprint.js.map +1 -1
- package/dist/analyzers/tools/generic.d.ts.map +1 -1
- package/dist/analyzers/tools/generic.js +6 -1
- package/dist/analyzers/tools/generic.js.map +1 -1
- package/dist/analyzers/tools/gitleaks.d.ts +24 -1
- package/dist/analyzers/tools/gitleaks.d.ts.map +1 -1
- package/dist/analyzers/tools/gitleaks.js +20 -11
- package/dist/analyzers/tools/gitleaks.js.map +1 -1
- package/dist/analyzers/types.d.ts +6 -4
- package/dist/analyzers/types.d.ts.map +1 -1
- package/dist/baseline/baseline-file.d.ts +104 -0
- package/dist/baseline/baseline-file.d.ts.map +1 -0
- package/dist/baseline/baseline-file.js +110 -0
- package/dist/baseline/baseline-file.js.map +1 -0
- package/dist/baseline/check-renderers.d.ts +108 -0
- package/dist/baseline/check-renderers.d.ts.map +1 -0
- package/dist/baseline/check-renderers.js +379 -0
- package/dist/baseline/check-renderers.js.map +1 -0
- package/dist/baseline/check.d.ts +127 -0
- package/dist/baseline/check.d.ts.map +1 -0
- package/dist/baseline/check.js +462 -0
- package/dist/baseline/check.js.map +1 -0
- package/dist/baseline/content-hash.d.ts +83 -0
- package/dist/baseline/content-hash.d.ts.map +1 -0
- package/dist/baseline/content-hash.js +131 -0
- package/dist/baseline/content-hash.js.map +1 -0
- package/dist/baseline/create.d.ts +96 -0
- package/dist/baseline/create.d.ts.map +1 -0
- package/dist/baseline/create.js +339 -0
- package/dist/baseline/create.js.map +1 -0
- package/dist/baseline/entry-to-located.d.ts +35 -0
- package/dist/baseline/entry-to-located.d.ts.map +1 -0
- package/dist/baseline/entry-to-located.js +72 -0
- package/dist/baseline/entry-to-located.js.map +1 -0
- package/dist/baseline/finding-identity.d.ts +47 -0
- package/dist/baseline/finding-identity.d.ts.map +1 -0
- package/dist/baseline/finding-identity.js +292 -0
- package/dist/baseline/finding-identity.js.map +1 -0
- package/dist/baseline/git-aware-match.d.ts +146 -0
- package/dist/baseline/git-aware-match.d.ts.map +1 -0
- package/dist/baseline/git-aware-match.js +439 -0
- package/dist/baseline/git-aware-match.js.map +1 -0
- package/dist/baseline/policy.d.ts +171 -0
- package/dist/baseline/policy.d.ts.map +1 -0
- package/dist/baseline/policy.js +206 -0
- package/dist/baseline/policy.js.map +1 -0
- package/dist/baseline/producers/health.d.ts +30 -0
- package/dist/baseline/producers/health.d.ts.map +1 -0
- package/dist/baseline/producers/health.js +42 -0
- package/dist/baseline/producers/health.js.map +1 -0
- package/dist/baseline/producers/index.d.ts +164 -0
- package/dist/baseline/producers/index.d.ts.map +1 -0
- package/dist/baseline/producers/index.js +200 -0
- package/dist/baseline/producers/index.js.map +1 -0
- package/dist/baseline/producers/licenses.d.ts +23 -0
- package/dist/baseline/producers/licenses.d.ts.map +1 -0
- package/dist/baseline/producers/licenses.js +46 -0
- package/dist/baseline/producers/licenses.js.map +1 -0
- package/dist/baseline/producers/quality.d.ts +39 -0
- package/dist/baseline/producers/quality.d.ts.map +1 -0
- package/dist/baseline/producers/quality.js +84 -0
- package/dist/baseline/producers/quality.js.map +1 -0
- package/dist/baseline/producers/secret-hmac.d.ts +45 -0
- package/dist/baseline/producers/secret-hmac.d.ts.map +1 -0
- package/dist/baseline/producers/secret-hmac.js +70 -0
- package/dist/baseline/producers/secret-hmac.js.map +1 -0
- package/dist/baseline/producers/security.d.ts +59 -0
- package/dist/baseline/producers/security.d.ts.map +1 -0
- package/dist/baseline/producers/security.js +135 -0
- package/dist/baseline/producers/security.js.map +1 -0
- package/dist/baseline/producers/tests.d.ts +36 -0
- package/dist/baseline/producers/tests.d.ts.map +1 -0
- package/dist/baseline/producers/tests.js +69 -0
- package/dist/baseline/producers/tests.js.map +1 -0
- package/dist/baseline/salt.d.ts +45 -0
- package/dist/baseline/salt.d.ts.map +1 -0
- package/dist/baseline/salt.js +113 -0
- package/dist/baseline/salt.js.map +1 -0
- package/dist/baseline/show.d.ts +79 -0
- package/dist/baseline/show.d.ts.map +1 -0
- package/dist/baseline/show.js +233 -0
- package/dist/baseline/show.js.map +1 -0
- package/dist/baseline/types.d.ts +482 -0
- package/dist/baseline/types.d.ts.map +1 -0
- package/dist/baseline/types.js +53 -0
- package/dist/baseline/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +360 -81
- package/dist/cli.js.map +1 -1
- package/dist/codebase-scanner.d.ts.map +1 -1
- package/dist/codebase-scanner.js +0 -1
- package/dist/codebase-scanner.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -4
- package/dist/constants.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +22 -25
- package/dist/doctor.js.map +1 -1
- package/dist/fail-on.d.ts +84 -0
- package/dist/fail-on.d.ts.map +1 -0
- package/dist/fail-on.js +128 -0
- package/dist/fail-on.js.map +1 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +2 -141
- package/dist/generator.js.map +1 -1
- package/dist/languages/csharp.d.ts.map +1 -1
- package/dist/languages/csharp.js +0 -9
- package/dist/languages/csharp.js.map +1 -1
- package/dist/languages/go.d.ts.map +1 -1
- package/dist/languages/go.js +0 -15
- package/dist/languages/go.js.map +1 -1
- package/dist/languages/index.d.ts +1 -1
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/java.d.ts.map +1 -1
- package/dist/languages/java.js +0 -6
- package/dist/languages/java.js.map +1 -1
- package/dist/languages/kotlin.d.ts.map +1 -1
- package/dist/languages/kotlin.js +0 -11
- package/dist/languages/kotlin.js.map +1 -1
- package/dist/languages/python.d.ts.map +1 -1
- package/dist/languages/python.js +0 -15
- package/dist/languages/python.js.map +1 -1
- package/dist/languages/ruby.d.ts.map +1 -1
- package/dist/languages/ruby.js +0 -6
- package/dist/languages/ruby.js.map +1 -1
- package/dist/languages/rust.d.ts.map +1 -1
- package/dist/languages/rust.js +0 -4
- package/dist/languages/rust.js.map +1 -1
- package/dist/languages/types.d.ts +2 -28
- package/dist/languages/types.d.ts.map +1 -1
- package/dist/languages/typescript.d.ts.map +1 -1
- package/dist/languages/typescript.js +26 -4
- package/dist/languages/typescript.js.map +1 -1
- package/dist/lib.d.ts +2 -3
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +3 -6
- package/dist/lib.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +0 -10
- package/dist/prompts.js.map +1 -1
- package/dist/report-schema.d.ts +42 -0
- package/dist/report-schema.d.ts.map +1 -0
- package/dist/report-schema.js +54 -0
- package/dist/report-schema.js.map +1 -0
- package/dist/ship-installers.d.ts +106 -0
- package/dist/ship-installers.d.ts.map +1 -0
- package/dist/ship-installers.js +415 -0
- package/dist/ship-installers.js.map +1 -0
- package/dist/types.d.ts +0 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/update.d.ts.map +1 -1
- package/dist/update.js +0 -4
- package/dist/update.js.map +1 -1
- package/package.json +17 -11
- package/templates/.claude/agents/onboarding.md +5 -4
- package/templates/.claude/agents-available/codebase-explorer.md +1 -1
- package/templates/.claude/agents-available/debugger.md +2 -2
- package/templates/.claude/agents-available/health-auditor.md +2 -2
- package/templates/.claude/commands/doctor.md +20 -12
- package/templates/.claude/skills/build/SKILL.md.template +22 -30
- package/templates/.claude/skills/deploy/SKILL.md.template +5 -25
- package/templates/.claude/skills/doctor/SKILL.md +24 -47
- package/templates/.claude/skills/gcloud/SKILL.md +5 -5
- package/templates/.claude/skills/learned/SKILL.md +1 -1
- package/templates/.claude/skills/pulumi/SKILL.md +2 -2
- package/templates/.claude/skills/quality/SKILL.md.template +4 -23
- package/templates/.claude/skills/review/SKILL.md.template +4 -3
- package/templates/.claude/skills/scaffold/SKILL.md.template +5 -15
- package/templates/.claude/skills/secrets/SKILL.md +20 -21
- package/templates/.claude/skills/session/SKILL.md +20 -31
- package/templates/.claude/skills/test/SKILL.md.template +1 -7
- package/templates/.devcontainer/devcontainer.json +81 -0
- package/templates/.devcontainer/install-agent-clis.sh +42 -0
- package/templates/.devcontainer/post-create.sh +67 -0
- package/templates/.githooks/pre-commit +55 -0
- package/templates/.githooks/pre-push +63 -0
- package/templates/.github/workflows/dxkit-baseline-refresh.yml +78 -0
- package/templates/.github/workflows/dxkit-guardrails.yml +98 -0
- package/templates/CLAUDE.md.template +62 -196
- package/dist/project-yaml.d.ts +0 -13
- package/dist/project-yaml.d.ts.map +0 -1
- package/dist/project-yaml.js +0 -188
- package/dist/project-yaml.js.map +0 -1
- package/templates/.ai/README.md +0 -117
- package/templates/.ai/prompts/execution-prompt.md +0 -9
- package/templates/.ai/prompts/planning-prompt.md +0 -18
- package/templates/.ai/prompts/session-end-template.md +0 -182
- package/templates/.ai/prompts/session-end.md +0 -132
- package/templates/.ai/prompts/session-start.md +0 -109
- package/templates/.ai/prompts/step-by-step.md +0 -113
- package/templates/.ai/sessions/.gitkeep +0 -0
- package/templates/.claude/commands/setup-pr-review.md +0 -72
- package/templates/.devcontainer/Dockerfile.dev.template +0 -89
- package/templates/.devcontainer/devcontainer.json.template +0 -184
- package/templates/.devcontainer/docker-compose.yml.template +0 -105
- package/templates/.devcontainer/init-scripts/01-init.sql.template +0 -12
- package/templates/.devcontainer/post-create.sh.template +0 -298
- package/templates/.github/workflows/ci.yml.template +0 -399
- package/templates/.github/workflows/quality.yml.template +0 -376
- package/templates/.pre-commit-config.yaml.template +0 -106
- package/templates/.project/config/edit_config.py +0 -275
- package/templates/.project/config/project_config.py +0 -894
- package/templates/.project/scripts/codegen/generate-all.sh +0 -20
- package/templates/.project/scripts/codegen/validate-all.sh +0 -17
- package/templates/.project/scripts/docs/generate-all.sh +0 -30
- package/templates/.project/scripts/docs/serve.sh +0 -20
- package/templates/.project/scripts/quality/fix-all.sh +0 -138
- package/templates/.project/scripts/quality/lint-go.sh +0 -34
- package/templates/.project/scripts/quality/lint-python.sh +0 -54
- package/templates/.project/scripts/quality/run-all.sh +0 -497
- package/templates/.project/scripts/session/commit.sh +0 -70
- package/templates/.project/scripts/session/create-pr.sh +0 -165
- package/templates/.project/scripts/session/end.sh +0 -207
- package/templates/.project/scripts/session/start.sh +0 -233
- package/templates/.project/scripts/setup/doctor.sh +0 -404
- package/templates/.project/scripts/setup/interactive-setup.sh +0 -585
- package/templates/.project/scripts/sync/sync-template.sh +0 -328
- package/templates/.project/scripts/test/run-all.sh +0 -179
- package/templates/.project/scripts/test/run-quick.sh +0 -25
- package/templates/Makefile +0 -514
- package/templates/config/versions.yaml +0 -57
- package/templates/configs/go/.golangci.yml.template +0 -172
- package/templates/configs/go/go.mod.template +0 -15
- package/templates/configs/java/README.md +0 -6
- package/templates/configs/kotlin/README.md +0 -6
- package/templates/configs/node/package.json.template +0 -67
- package/templates/configs/node/tsconfig.json.template +0 -53
- package/templates/configs/python/pyproject.toml.template +0 -92
- package/templates/configs/python/pytest.ini.template +0 -64
- package/templates/configs/python/ruff.toml.template +0 -79
- package/templates/configs/ruby/README.md +0 -6
- package/templates/configs/rust/Cargo.toml.template +0 -51
- package/templates/configs/shared/.editorconfig +0 -67
- package/templates/scripts/validate-templates.sh +0 -449
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
I want to {YOUR_GOAL_HERE}
|
|
2
|
-
{IF_CONTINUING_FROM_CHECKPOINT}
|
|
3
|
-
I'm continuing from a previous session. Please read:
|
|
4
|
-
{CHECKPOINT_PATH}
|
|
5
|
-
|
|
6
|
-
Summarize what was accomplished and what's left to do.
|
|
7
|
-
{END_IF}
|
|
8
|
-
Before we start coding, let's plan this session:
|
|
9
|
-
|
|
10
|
-
1. What files will we need to create/modify?
|
|
11
|
-
2. What are the key components/functions?
|
|
12
|
-
3. What dependencies or external services do we need?
|
|
13
|
-
4. What tests should we write?
|
|
14
|
-
5. Can we complete this in one session (within context window)?
|
|
15
|
-
6. Does this align with our architecture?
|
|
16
|
-
7. Are there relevant gotchas or conventions in `.claude/skills/` to be aware of?
|
|
17
|
-
|
|
18
|
-
Once we have a solid plan that fits in one session, I'll ask you to proceed.
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# Session End - Create Checkpoint
|
|
2
|
-
|
|
3
|
-
Please create a comprehensive session checkpoint using your full conversation context.
|
|
4
|
-
|
|
5
|
-
## Session Information
|
|
6
|
-
- **Developer**: {DEVELOPER}
|
|
7
|
-
- **Date**: {DATE}
|
|
8
|
-
- **Session Number**: {SESSION_NUM}
|
|
9
|
-
- **Checkpoint File**: `{CHECKPOINT_FILE}`
|
|
10
|
-
|
|
11
|
-
## Your Task
|
|
12
|
-
|
|
13
|
-
You have the complete context of this development session. Create a comprehensive checkpoint.
|
|
14
|
-
|
|
15
|
-
### Step 1: Gather Information from User
|
|
16
|
-
|
|
17
|
-
Ask me for any details you need to complete the checkpoint:
|
|
18
|
-
- **Session duration**: Estimate from our conversation length, or ask me
|
|
19
|
-
- **Blockers**: Any issues or concerns for next session?
|
|
20
|
-
- **Completeness**: Did we finish what we planned, or is work in progress?
|
|
21
|
-
- **Anything unclear**: Any decisions or context you're unsure about?
|
|
22
|
-
|
|
23
|
-
### Step 2: Create Checkpoint File
|
|
24
|
-
|
|
25
|
-
Create the checkpoint at: `{CHECKPOINT_FILE}`
|
|
26
|
-
|
|
27
|
-
Use the template structure from: `.ai/templates/session-checkpoint-template.md`
|
|
28
|
-
|
|
29
|
-
Fill out **all sections thoroughly** using:
|
|
30
|
-
- ✅ **Our conversation history** - You know everything we discussed and built
|
|
31
|
-
- ✅ **Files you touched** - You know every file created/modified
|
|
32
|
-
- ✅ **Decisions we made** - You remember the reasoning and trade-offs
|
|
33
|
-
- ✅ **Plans we made** - You know what's next
|
|
34
|
-
|
|
35
|
-
## What to Document
|
|
36
|
-
|
|
37
|
-
### Accomplished ✅
|
|
38
|
-
List **specific** accomplishments (not vague):
|
|
39
|
-
- ❌ Bad: "Worked on the client"
|
|
40
|
-
- ✅ Good: "Implemented PolygonClient with 3 endpoints (get_quote, get_bars, get_options), added 15 unit tests, all passing"
|
|
41
|
-
|
|
42
|
-
### Files Created/Modified
|
|
43
|
-
Every file with description:
|
|
44
|
-
- Created files with purpose
|
|
45
|
-
- Modified files with what changed
|
|
46
|
-
|
|
47
|
-
### Key Decisions
|
|
48
|
-
Major decisions with reasoning:
|
|
49
|
-
- What we decided
|
|
50
|
-
- Why we chose this approach
|
|
51
|
-
- Alternatives we considered
|
|
52
|
-
- Trade-offs we accepted
|
|
53
|
-
|
|
54
|
-
### Implementation Details
|
|
55
|
-
How things work:
|
|
56
|
-
- Architecture/patterns used
|
|
57
|
-
- Key technical details
|
|
58
|
-
- Where to find important logic
|
|
59
|
-
|
|
60
|
-
### Testing Status
|
|
61
|
-
- Tests added/updated
|
|
62
|
-
- Coverage
|
|
63
|
-
- Passing status
|
|
64
|
-
- Manual testing done
|
|
65
|
-
|
|
66
|
-
### Next Session
|
|
67
|
-
**Clear, actionable steps** for next session:
|
|
68
|
-
- Specific enough to start immediately
|
|
69
|
-
- Ordered by priority
|
|
70
|
-
- With enough context
|
|
71
|
-
|
|
72
|
-
### Context for AI
|
|
73
|
-
Detailed context for next session's AI agent:
|
|
74
|
-
- What we just completed
|
|
75
|
-
- Current state of the codebase
|
|
76
|
-
- What to do next and why
|
|
77
|
-
- Key facts to remember
|
|
78
|
-
|
|
79
|
-
### Blockers / Considerations
|
|
80
|
-
- Any blockers needing resolution
|
|
81
|
-
- Technical debt taken
|
|
82
|
-
- Things to watch
|
|
83
|
-
- Dependencies
|
|
84
|
-
|
|
85
|
-
## Recent Git Activity
|
|
86
|
-
|
|
87
|
-
{GIT_COMMITS}
|
|
88
|
-
|
|
89
|
-
{GIT_CHANGES}
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Guidelines
|
|
94
|
-
|
|
95
|
-
- **Be specific**: Include file paths, line counts, exact accomplishments
|
|
96
|
-
- **Explain decisions**: Don't just say what, say why
|
|
97
|
-
- **Actionable next steps**: Clear enough that anyone can continue
|
|
98
|
-
- **Rich context**: Next AI agent should seamlessly pick up where we left off
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Skill Evolution
|
|
103
|
-
|
|
104
|
-
After creating the checkpoint, review this session for learnings worth capturing:
|
|
105
|
-
|
|
106
|
-
### Gotchas
|
|
107
|
-
If you encountered unexpected behaviors, edge cases, or failures:
|
|
108
|
-
- Append to `.claude/skills/learned/references/gotchas.md` (general)
|
|
109
|
-
- Or to `.claude/skills/<area>/references/gotchas.md` (area-specific: quality, test, deploy, gcloud, etc.)
|
|
110
|
-
|
|
111
|
-
Format:
|
|
112
|
-
```
|
|
113
|
-
## {DATE} - {Category} / {Short Title}
|
|
114
|
-
{Description of the issue}
|
|
115
|
-
**Resolution:** {How it was resolved}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Conventions
|
|
119
|
-
If new team conventions or patterns were established:
|
|
120
|
-
- Append to `.claude/skills/learned/references/conventions.md`
|
|
121
|
-
|
|
122
|
-
Format:
|
|
123
|
-
```
|
|
124
|
-
## {Category} - {Convention Name}
|
|
125
|
-
{Description}
|
|
126
|
-
**Rationale:** {Why this convention was adopted}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### New Skills
|
|
130
|
-
If this session introduced a significant new domain, workflow, or integration that doesn't fit any existing skill, create a new skill:
|
|
131
|
-
|
|
132
|
-
1. Create directory: `.claude/skills/<skill-name>/`
|
|
133
|
-
2. Create `SKILL.md` with proper frontmatter:
|
|
134
|
-
```
|
|
135
|
-
---
|
|
136
|
-
name: <skill-name>
|
|
137
|
-
description: <what it does and when to use it — max 1024 chars>
|
|
138
|
-
---
|
|
139
|
-
|
|
140
|
-
# <Skill Title>
|
|
141
|
-
|
|
142
|
-
<Instructions, commands, patterns, gotchas>
|
|
143
|
-
```
|
|
144
|
-
3. Optionally add `references/gotchas.md` for area-specific gotchas
|
|
145
|
-
|
|
146
|
-
**When to create a new skill vs. updating an existing one:**
|
|
147
|
-
- New skill: the topic is distinct enough that it would clutter an existing skill (e.g., a specific API client, a migration workflow, a caching layer)
|
|
148
|
-
- Update existing: the learning fits naturally into an existing skill's domain (e.g., a new Python lint gotcha → quality skill)
|
|
149
|
-
|
|
150
|
-
**Naming rules** (per Agent Skills spec):
|
|
151
|
-
- Lowercase letters, numbers, and hyphens only
|
|
152
|
-
- No consecutive hyphens, don't start/end with hyphen
|
|
153
|
-
- Directory name must match the `name` field in frontmatter
|
|
154
|
-
|
|
155
|
-
### Deny Rule Recommendations
|
|
156
|
-
If you encountered or nearly executed a dangerous command that should be permanently blocked:
|
|
157
|
-
- Append to `.claude/skills/learned/references/deny-recommendations.md`
|
|
158
|
-
|
|
159
|
-
Format:
|
|
160
|
-
```
|
|
161
|
-
## {DATE} - Rule
|
|
162
|
-
`DenyPattern` — reason this should be blocked
|
|
163
|
-
**Context:** what happened that surfaced this need
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
A developer should periodically review this file and promote entries to `.claude/settings.json` deny list. Claude cannot modify settings.json directly (security boundary).
|
|
167
|
-
|
|
168
|
-
### Guidelines for Skill Evolution
|
|
169
|
-
- Only add genuinely useful learnings (not obvious things)
|
|
170
|
-
- Be specific: include file paths, error messages, exact symptoms
|
|
171
|
-
- Focus on things that would save time if known in advance
|
|
172
|
-
- Append-only for gotchas/conventions — never remove or edit existing entries
|
|
173
|
-
- **NEVER include secret values, tokens, passwords, or API keys in any skill file**
|
|
174
|
-
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
**Action**: Ask me any clarifying questions you need, then create the checkpoint file and update skills.
|
|
178
|
-
|
|
179
|
-
Make it thorough enough that:
|
|
180
|
-
1. Another developer can understand what was built
|
|
181
|
-
2. Next session's AI agent can seamlessly continue
|
|
182
|
-
3. We can remember context weeks/months from now
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Session End Prompt Template
|
|
2
|
-
|
|
3
|
-
Use this prompt to wrap up an AI-assisted development session and create a checkpoint.
|
|
4
|
-
|
|
5
|
-
## Prompt Template
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
We're wrapping up this session. Please create a session checkpoint document:
|
|
9
|
-
|
|
10
|
-
1. Determine the developer name from git config (git config user.name)
|
|
11
|
-
2. Convert to lowercase with hyphens (e.g., "John Doe" → "john-doe")
|
|
12
|
-
3. Get today's date in YYYY-MM-DD format
|
|
13
|
-
4. Check for existing session files in .ai/sessions/{developer-name}/{YYYY-MM-DD}/
|
|
14
|
-
5. Create checkpoint file: .ai/sessions/{developer-name}/{YYYY-MM-DD}/session-{N}.md
|
|
15
|
-
- Create the date folder if it doesn't exist
|
|
16
|
-
- {N} is the session number for today (increment if multiple sessions today)
|
|
17
|
-
|
|
18
|
-
6. Use the template from .ai/templates/session-checkpoint-template.md
|
|
19
|
-
|
|
20
|
-
6. Fill in the template with:
|
|
21
|
-
- Session goal (what we set out to do)
|
|
22
|
-
- What we accomplished (specific, measurable)
|
|
23
|
-
- All files created/modified (with brief description of changes)
|
|
24
|
-
- Key decisions made (with reasoning)
|
|
25
|
-
- Implementation details (how things work)
|
|
26
|
-
- Testing status (what's tested, what's passing)
|
|
27
|
-
- Next steps (clear, actionable items for next session)
|
|
28
|
-
- Context for AI (detailed context for next session's agent)
|
|
29
|
-
- Any blockers or considerations
|
|
30
|
-
|
|
31
|
-
Make the checkpoint detailed enough that someone else (or a fresh AI agent) can understand what was done and continue the work.
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## What Makes a Good Checkpoint?
|
|
35
|
-
|
|
36
|
-
### Essential Elements
|
|
37
|
-
|
|
38
|
-
✅ **Clear Goal**
|
|
39
|
-
- What we wanted to accomplish
|
|
40
|
-
- Why this work matters
|
|
41
|
-
|
|
42
|
-
✅ **Specific Accomplishments**
|
|
43
|
-
- Not "worked on client" but "implemented PolygonClient with quote/bars endpoints, added Pydantic models, wrote 15 unit tests"
|
|
44
|
-
|
|
45
|
-
✅ **File Changes**
|
|
46
|
-
- Every file created or modified
|
|
47
|
-
- What changed in each file
|
|
48
|
-
|
|
49
|
-
✅ **Decision Rationale**
|
|
50
|
-
- Why we chose approach A over B
|
|
51
|
-
- Trade-offs we accepted
|
|
52
|
-
|
|
53
|
-
✅ **Technical Details**
|
|
54
|
-
- How the implementation works
|
|
55
|
-
- Important patterns or techniques used
|
|
56
|
-
- Where to find key logic
|
|
57
|
-
|
|
58
|
-
✅ **Actionable Next Steps**
|
|
59
|
-
- Specific, not vague
|
|
60
|
-
- Ordered by priority
|
|
61
|
-
- With enough context to start
|
|
62
|
-
|
|
63
|
-
✅ **AI Context Block**
|
|
64
|
-
- Detailed prompt for next session's agent
|
|
65
|
-
- Key facts to remember
|
|
66
|
-
- How to continue
|
|
67
|
-
|
|
68
|
-
## Example Good vs Bad Checkpoints
|
|
69
|
-
|
|
70
|
-
### ❌ Bad Checkpoint
|
|
71
|
-
|
|
72
|
-
```markdown
|
|
73
|
-
## Accomplished
|
|
74
|
-
- Worked on the client
|
|
75
|
-
- Made progress on tools
|
|
76
|
-
- Fixed some bugs
|
|
77
|
-
|
|
78
|
-
## Next Steps
|
|
79
|
-
- Continue implementation
|
|
80
|
-
- Add more tests
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Why bad:** Vague, no specifics, can't continue from this
|
|
84
|
-
|
|
85
|
-
### ✅ Good Checkpoint
|
|
86
|
-
|
|
87
|
-
```markdown
|
|
88
|
-
## Accomplished
|
|
89
|
-
- Implemented PolygonClient class in services/langgraph-service/src/clients/polygon/client.py
|
|
90
|
-
- Added async methods: get_quote(), get_bars(), get_options_chain()
|
|
91
|
-
- Implemented retry logic for rate limits (429 errors)
|
|
92
|
-
- Added authentication via Bearer token
|
|
93
|
-
- Created Pydantic models in clients/polygon/models.py (Quote, Bar, OptionContract)
|
|
94
|
-
- Added 15 unit tests in tests/clients/test_polygon.py (100% coverage)
|
|
95
|
-
- All tests passing (make test)
|
|
96
|
-
|
|
97
|
-
## Next Steps
|
|
98
|
-
1. Integrate PolygonClient into market_data tool
|
|
99
|
-
2. Update tool to use client's get_quote() method instead of mock data
|
|
100
|
-
3. Add integration test with mocked PolygonClient
|
|
101
|
-
4. Update tool registry to include new market data capabilities
|
|
102
|
-
|
|
103
|
-
## Context for AI
|
|
104
|
-
We've implemented the Polygon client infrastructure layer. The client handles all HTTP communication, auth, and retries.
|
|
105
|
-
|
|
106
|
-
Next, we need to integrate it into the tool layer. The market_data.py tool currently returns mock data - replace the get_stock_quote() function to use polygon_client.get_quote().
|
|
107
|
-
|
|
108
|
-
Remember to inject PolygonClient as a dependency (don't import directly) to keep tests mockable.
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Why good:** Specific files, concrete accomplishments, clear next steps, AI can continue easily
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Skill Evolution
|
|
116
|
-
|
|
117
|
-
After creating the checkpoint, review the session for learnings:
|
|
118
|
-
|
|
119
|
-
✅ **Gotchas** — Unexpected behaviors, edge cases, or failure modes
|
|
120
|
-
→ Append to `.claude/skills/learned/references/gotchas.md` or `.claude/skills/<area>/references/gotchas.md`
|
|
121
|
-
|
|
122
|
-
✅ **Conventions** — New patterns or team agreements established
|
|
123
|
-
→ Append to `.claude/skills/learned/references/conventions.md`
|
|
124
|
-
|
|
125
|
-
✅ **New Skills** — If a new domain/workflow emerged that deserves its own skill
|
|
126
|
-
→ Create `.claude/skills/<name>/SKILL.md` with frontmatter (`name`, `description`)
|
|
127
|
-
|
|
128
|
-
⚠️ **NEVER include secret values, tokens, or credentials in skill files**
|
|
129
|
-
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
**Remember:** A good checkpoint enables seamless continuation. Treat it like documentation for your future self (or the next AI agent).
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
# Session Start Prompt Template
|
|
2
|
-
|
|
3
|
-
Use this prompt to start a new AI-assisted development session.
|
|
4
|
-
|
|
5
|
-
## Prompt Template
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
I want to {SESSION_GOAL}.
|
|
9
|
-
|
|
10
|
-
{IF CONTINUING FROM PREVIOUS SESSION:}
|
|
11
|
-
I'm continuing from a previous session. Please read the checkpoint:
|
|
12
|
-
.ai/sessions/{DEVELOPER_NAME}/{LAST_CHECKPOINT_FILE}
|
|
13
|
-
|
|
14
|
-
Summarize what was accomplished and what's left to do.
|
|
15
|
-
{END IF}
|
|
16
|
-
|
|
17
|
-
Before we start coding, let's plan this session:
|
|
18
|
-
|
|
19
|
-
1. What files will we need to create/modify?
|
|
20
|
-
2. What are the key components/functions?
|
|
21
|
-
3. What dependencies or external services do we need?
|
|
22
|
-
4. What tests should we write?
|
|
23
|
-
5. Can we complete this in one session (within context window)?
|
|
24
|
-
6. Does this align with our architecture? (Check docs/architecture/system-overview.md and docs/developer-guide/key-principles.md)
|
|
25
|
-
|
|
26
|
-
Once we have a solid plan that fits in one session, I'll ask you to proceed step by step.
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Example Usage
|
|
30
|
-
|
|
31
|
-
### New Feature (No Previous Session)
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
I want to implement the Polygon client for fetching stock quotes and historical bars.
|
|
35
|
-
|
|
36
|
-
Before we start coding, let's plan this session:
|
|
37
|
-
|
|
38
|
-
1. What files will we need to create/modify?
|
|
39
|
-
2. What are the key components/functions?
|
|
40
|
-
3. What dependencies or external services do we need?
|
|
41
|
-
4. What tests should we write?
|
|
42
|
-
5. Can we complete this in one session (within context window)?
|
|
43
|
-
6. Does this align with our architecture?
|
|
44
|
-
|
|
45
|
-
Once we have a solid plan that fits in one session, I'll ask you to proceed step by step.
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Continuing from Previous Session
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
I want to continue implementing the market data integration.
|
|
52
|
-
|
|
53
|
-
I'm continuing from a previous session. Please read the checkpoint:
|
|
54
|
-
.ai/sessions/john-doe/2025-10-05-session-1.md
|
|
55
|
-
|
|
56
|
-
Summarize what was accomplished and what's left to do.
|
|
57
|
-
|
|
58
|
-
Before we start coding, let's plan this session...
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Before Planning
|
|
62
|
-
|
|
63
|
-
Check Claude Code skills for relevant context before starting work:
|
|
64
|
-
- `.claude/skills/codebase/SKILL.md` — Architecture overview (run `/project:explore-codebase` if missing)
|
|
65
|
-
- `.claude/skills/learned/references/gotchas.md` — Known project gotchas (avoid repeating past mistakes)
|
|
66
|
-
- `.claude/skills/learned/references/conventions.md` — Team conventions (follow established patterns)
|
|
67
|
-
- `.claude/skills/<area>/references/gotchas.md` — Area-specific gotchas (quality, test, deploy, etc.)
|
|
68
|
-
|
|
69
|
-
## What Good Planning Looks Like
|
|
70
|
-
|
|
71
|
-
The AI agent should respond with:
|
|
72
|
-
|
|
73
|
-
### File Plan
|
|
74
|
-
- Clear list of files to create/modify
|
|
75
|
-
- Rationale for each file
|
|
76
|
-
- Estimated size/complexity
|
|
77
|
-
|
|
78
|
-
### Component Breakdown
|
|
79
|
-
- Main classes/functions to implement
|
|
80
|
-
- How they fit together
|
|
81
|
-
- Dependencies between components
|
|
82
|
-
|
|
83
|
-
### Testing Plan
|
|
84
|
-
- What needs unit tests
|
|
85
|
-
- What needs integration tests
|
|
86
|
-
- Test coverage strategy
|
|
87
|
-
|
|
88
|
-
### Feasibility Check
|
|
89
|
-
- Honest assessment of scope
|
|
90
|
-
- Recommendation to split if too large
|
|
91
|
-
- Estimated complexity
|
|
92
|
-
|
|
93
|
-
## If the Plan Looks Good
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
Great plan! This looks achievable in one session and aligns with our architecture.
|
|
97
|
-
|
|
98
|
-
Let's proceed step by step. Before implementing each component:
|
|
99
|
-
1. Tell me what you're about to do
|
|
100
|
-
2. Explain WHY we're doing it this way
|
|
101
|
-
3. Explain HOW it fits into the architecture
|
|
102
|
-
4. Then implement it
|
|
103
|
-
|
|
104
|
-
Let's start with {FIRST_COMPONENT}.
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
**Remember:** Good planning saves time. Spend 5-10 minutes planning to save hours of refactoring.
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
# Step-by-Step Development Prompt
|
|
2
|
-
|
|
3
|
-
Use this prompt during development to ensure AI agent explains before implementing.
|
|
4
|
-
|
|
5
|
-
## Prompt Template
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
Great plan! Let's proceed step by step.
|
|
9
|
-
|
|
10
|
-
Before implementing each component:
|
|
11
|
-
1. Tell me what you're about to do
|
|
12
|
-
2. Explain WHY we're doing it this way (business reason, architectural fit)
|
|
13
|
-
3. Explain HOW it will work (technical approach)
|
|
14
|
-
4. Then implement it
|
|
15
|
-
|
|
16
|
-
Let's start with {FIRST_COMPONENT}.
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## During Development - Validation Checkpoints
|
|
20
|
-
|
|
21
|
-
After each major component is implemented, validate:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
Before we continue, let's verify this implementation:
|
|
25
|
-
|
|
26
|
-
1. Does it follow our architecture patterns?
|
|
27
|
-
2. Is error handling consistent with our standards?
|
|
28
|
-
3. Are we using dependency injection properly?
|
|
29
|
-
4. Is logging structured and informative?
|
|
30
|
-
5. Are type hints/types properly used?
|
|
31
|
-
6. Is it testable (dependencies can be mocked)?
|
|
32
|
-
|
|
33
|
-
If everything looks good, let's continue to {NEXT_COMPONENT}.
|
|
34
|
-
If not, let's refine before moving on.
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Course Correction
|
|
38
|
-
|
|
39
|
-
If something doesn't align with our patterns:
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
Wait, this doesn't follow our {PATTERN_NAME} pattern.
|
|
43
|
-
|
|
44
|
-
According to docs/{RELEVANT_DOC}, we should {CORRECT_APPROACH}.
|
|
45
|
-
|
|
46
|
-
Can you revise this to align with our standards?
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Example Flow
|
|
50
|
-
|
|
51
|
-
### Step 1: Client Implementation
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
Let's start with implementing the PolygonClient class.
|
|
55
|
-
|
|
56
|
-
Before coding:
|
|
57
|
-
1. What are you about to do?
|
|
58
|
-
2. Why this approach?
|
|
59
|
-
3. How will it work technically?
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
**Agent explains...**
|
|
63
|
-
|
|
64
|
-
```
|
|
65
|
-
That makes sense. Please proceed with the implementation.
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Step 2: Testing
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
Finally, let's add tests.
|
|
72
|
-
|
|
73
|
-
Before coding:
|
|
74
|
-
1. What test coverage do we need?
|
|
75
|
-
2. How will we mock the external API?
|
|
76
|
-
3. What edge cases should we test?
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## What Good Explanations Look Like
|
|
80
|
-
|
|
81
|
-
### What to Do
|
|
82
|
-
"I'm implementing the PolygonClient class with async methods for fetching quotes and historical bars."
|
|
83
|
-
|
|
84
|
-
### Why This Way
|
|
85
|
-
"We use an async client because we'll make multiple concurrent API calls. This is separated from the tool layer to follow our clean architecture pattern."
|
|
86
|
-
|
|
87
|
-
### How It Works
|
|
88
|
-
"The client will use httpx.AsyncClient for HTTP requests, handle authentication via headers, implement retry logic for rate limits, and parse responses into Pydantic models for type safety."
|
|
89
|
-
|
|
90
|
-
## Red Flags - When to Stop
|
|
91
|
-
|
|
92
|
-
❌ "I'll implement the client" → No explanation given
|
|
93
|
-
❌ "This is the standard way" → Not specific to our architecture
|
|
94
|
-
❌ "Let me write the code" → Skipping the explanation step
|
|
95
|
-
❌ Hardcoded values → Should use config
|
|
96
|
-
❌ No error handling mentioned → Missing critical aspect
|
|
97
|
-
❌ No testability consideration → Will be hard to test
|
|
98
|
-
|
|
99
|
-
## Session Flow Summary
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
1. Plan session ✓
|
|
103
|
-
2. For each component:
|
|
104
|
-
a. Agent explains what/why/how
|
|
105
|
-
b. Developer validates explanation
|
|
106
|
-
c. Agent implements
|
|
107
|
-
d. Developer verifies implementation
|
|
108
|
-
3. Create checkpoint ✓
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
**Key Principle:** Understand before coding. If you don't understand the "what/why/how", the code won't align with architecture.
|
|
File without changes
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Set up automated PR review with Claude Code
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
Set up a GitHub Action that automatically reviews pull requests using Claude Code.
|
|
6
|
-
|
|
7
|
-
## What to Create
|
|
8
|
-
|
|
9
|
-
Create `.github/workflows/pr-review.yml` with this content:
|
|
10
|
-
|
|
11
|
-
```yaml
|
|
12
|
-
name: PR Review
|
|
13
|
-
|
|
14
|
-
on:
|
|
15
|
-
pull_request:
|
|
16
|
-
types: [opened, synchronize, reopened]
|
|
17
|
-
|
|
18
|
-
permissions:
|
|
19
|
-
contents: read
|
|
20
|
-
pull-requests: write
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
review:
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
steps:
|
|
26
|
-
- uses: actions/checkout@v4
|
|
27
|
-
with:
|
|
28
|
-
fetch-depth: 0
|
|
29
|
-
|
|
30
|
-
- name: Install Claude Code
|
|
31
|
-
run: npm install -g @anthropic-ai/claude-code
|
|
32
|
-
|
|
33
|
-
- name: Review PR
|
|
34
|
-
env:
|
|
35
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
36
|
-
run: |
|
|
37
|
-
# Get the diff
|
|
38
|
-
git diff origin/${{ github.base_ref }}...HEAD > /tmp/pr-diff.txt
|
|
39
|
-
|
|
40
|
-
# Run Claude Code in non-interactive mode
|
|
41
|
-
claude -p "Review this pull request diff for bugs, security issues, and code quality problems. Focus on:
|
|
42
|
-
1. Logic errors and edge cases
|
|
43
|
-
2. Security vulnerabilities (hardcoded secrets, injection, auth gaps)
|
|
44
|
-
3. Error handling gaps
|
|
45
|
-
4. Breaking changes
|
|
46
|
-
|
|
47
|
-
Be specific: reference file:line numbers. Rate each issue as critical/warning/suggestion.
|
|
48
|
-
Only flag real issues — not style (linters handle that).
|
|
49
|
-
|
|
50
|
-
The diff:
|
|
51
|
-
$(cat /tmp/pr-diff.txt)" > /tmp/review.md
|
|
52
|
-
|
|
53
|
-
- name: Post Review Comment
|
|
54
|
-
uses: actions/github-script@v7
|
|
55
|
-
with:
|
|
56
|
-
script: |
|
|
57
|
-
const fs = require('fs');
|
|
58
|
-
const review = fs.readFileSync('/tmp/review.md', 'utf8');
|
|
59
|
-
await github.rest.issues.createComment({
|
|
60
|
-
owner: context.repo.owner,
|
|
61
|
-
repo: context.repo.repo,
|
|
62
|
-
issue_number: context.issue.number,
|
|
63
|
-
body: `## 🤖 Claude Code Review\n\n${review}\n\n---\n*Automated review by Claude Code*`
|
|
64
|
-
});
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## After Creating
|
|
68
|
-
|
|
69
|
-
Tell the user:
|
|
70
|
-
1. Add `ANTHROPIC_API_KEY` to the repo's GitHub Secrets (Settings → Secrets → Actions)
|
|
71
|
-
2. The workflow will run automatically on every PR
|
|
72
|
-
3. Reviews appear as PR comments
|