@vyuhlabs/dxkit 0.1.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/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +173 -0
- package/dist/cli.js.map +1 -0
- package/dist/codebase-scanner.d.ts +33 -0
- package/dist/codebase-scanner.d.ts.map +1 -0
- package/dist/codebase-scanner.js +497 -0
- package/dist/codebase-scanner.js.map +1 -0
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +80 -0
- package/dist/constants.js.map +1 -0
- package/dist/detect.d.ts +3 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/detect.js +264 -0
- package/dist/detect.js.map +1 -0
- package/dist/doctor.d.ts +2 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +157 -0
- package/dist/doctor.js.map +1 -0
- package/dist/files.d.ts +17 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +99 -0
- package/dist/files.js.map +1 -0
- package/dist/generator.d.ts +10 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/generator.js +405 -0
- package/dist/generator.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +9 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +51 -0
- package/dist/logger.js.map +1 -0
- package/dist/prompts.d.ts +10 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +125 -0
- package/dist/prompts.js.map +1 -0
- package/dist/template-engine.d.ts +22 -0
- package/dist/template-engine.d.ts.map +1 -0
- package/dist/template-engine.js +63 -0
- package/dist/template-engine.js.map +1 -0
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/update.d.ts +2 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +97 -0
- package/dist/update.js.map +1 -0
- package/package.json +43 -0
- package/templates/.ai/README.md +117 -0
- package/templates/.ai/prompts/execution-prompt.md +9 -0
- package/templates/.ai/prompts/planning-prompt.md +18 -0
- package/templates/.ai/prompts/session-end-template.md +182 -0
- package/templates/.ai/prompts/session-end.md +132 -0
- package/templates/.ai/prompts/session-start.md +109 -0
- package/templates/.ai/prompts/step-by-step.md +113 -0
- package/templates/.ai/sessions/.gitkeep +0 -0
- package/templates/.ai/templates/session-checkpoint-template.md +97 -0
- package/templates/.claude/agents/knowledge-bot.md +62 -0
- package/templates/.claude/agents/onboarding.md +61 -0
- package/templates/.claude/agents/quality-reviewer.md +85 -0
- package/templates/.claude/agents-available/code-reviewer.md +29 -0
- package/templates/.claude/agents-available/codebase-explorer.md +99 -0
- package/templates/.claude/agents-available/debugger.md +29 -0
- package/templates/.claude/agents-available/knowledge-bot.md +62 -0
- package/templates/.claude/agents-available/test-writer.md +34 -0
- package/templates/.claude/commands/ask.md +7 -0
- package/templates/.claude/commands/check.md.template +55 -0
- package/templates/.claude/commands/doctor.md +21 -0
- package/templates/.claude/commands/enable-agent.md +12 -0
- package/templates/.claude/commands/explore-codebase.md +12 -0
- package/templates/.claude/commands/fix-issue.md +12 -0
- package/templates/.claude/commands/fix.md.template +32 -0
- package/templates/.claude/commands/help.md +36 -0
- package/templates/.claude/commands/learn.md +48 -0
- package/templates/.claude/commands/onboarding.md +21 -0
- package/templates/.claude/commands/quality.md.template +42 -0
- package/templates/.claude/commands/session-end.md +40 -0
- package/templates/.claude/commands/session-start.md +30 -0
- package/templates/.claude/commands/setup-hooks.md +60 -0
- package/templates/.claude/commands/test.md.template +49 -0
- package/templates/.claude/rules/csharp.md +18 -0
- package/templates/.claude/rules/go.md +16 -0
- package/templates/.claude/rules/nextjs.md +17 -0
- package/templates/.claude/rules/python.md +19 -0
- package/templates/.claude/rules/rust.md +14 -0
- package/templates/.claude/skills/build/SKILL.md.template +98 -0
- package/templates/.claude/skills/deploy/SKILL.md.template +131 -0
- package/templates/.claude/skills/deploy/references/gotchas.md +5 -0
- package/templates/.claude/skills/doctor/SKILL.md +54 -0
- package/templates/.claude/skills/gcloud/SKILL.md +61 -0
- package/templates/.claude/skills/gcloud/references/gotchas.md +5 -0
- package/templates/.claude/skills/learned/SKILL.md +55 -0
- package/templates/.claude/skills/learned/references/conventions.md +11 -0
- package/templates/.claude/skills/learned/references/deny-recommendations.md +18 -0
- package/templates/.claude/skills/learned/references/gotchas.md +11 -0
- package/templates/.claude/skills/pulumi/SKILL.md +67 -0
- package/templates/.claude/skills/quality/SKILL.md.template +108 -0
- package/templates/.claude/skills/quality/references/gotchas.md +5 -0
- package/templates/.claude/skills/review/SKILL.md.template +73 -0
- package/templates/.claude/skills/scaffold/SKILL.md.template +123 -0
- package/templates/.claude/skills/secrets/SKILL.md +45 -0
- package/templates/.claude/skills/session/SKILL.md +43 -0
- package/templates/.claude/skills/test/SKILL.md.template +109 -0
- package/templates/.claude/skills/test/references/gotchas.md +5 -0
- package/templates/.devcontainer/Dockerfile.dev.template +89 -0
- package/templates/.devcontainer/devcontainer.json.template +184 -0
- package/templates/.devcontainer/docker-compose.yml.template +105 -0
- package/templates/.devcontainer/init-scripts/01-init.sql.template +12 -0
- package/templates/.devcontainer/post-create.sh.template +298 -0
- package/templates/.github/workflows/ci.yml.template +399 -0
- package/templates/.github/workflows/quality.yml.template +376 -0
- package/templates/.pre-commit-config.yaml.template +106 -0
- package/templates/.project/config/edit_config.py +275 -0
- package/templates/.project/config/project_config.py +894 -0
- package/templates/.project/scripts/codegen/generate-all.sh +20 -0
- package/templates/.project/scripts/codegen/validate-all.sh +17 -0
- package/templates/.project/scripts/docs/generate-all.sh +30 -0
- package/templates/.project/scripts/docs/serve.sh +20 -0
- package/templates/.project/scripts/quality/fix-all.sh +138 -0
- package/templates/.project/scripts/quality/lint-go.sh +34 -0
- package/templates/.project/scripts/quality/lint-python.sh +54 -0
- package/templates/.project/scripts/quality/run-all.sh +497 -0
- package/templates/.project/scripts/session/commit.sh +70 -0
- package/templates/.project/scripts/session/create-pr.sh +165 -0
- package/templates/.project/scripts/session/end.sh +207 -0
- package/templates/.project/scripts/session/start.sh +233 -0
- package/templates/.project/scripts/setup/doctor.sh +404 -0
- package/templates/.project/scripts/setup/interactive-setup.sh +581 -0
- package/templates/.project/scripts/sync/sync-template.sh +328 -0
- package/templates/.project/scripts/test/run-all.sh +179 -0
- package/templates/.project/scripts/test/run-quick.sh +25 -0
- package/templates/CLAUDE.md.template +228 -0
- package/templates/Makefile +514 -0
- package/templates/config/versions.yaml +57 -0
- package/templates/configs/go/.golangci.yml.template +172 -0
- package/templates/configs/go/go.mod.template +15 -0
- package/templates/configs/node/package.json.template +67 -0
- package/templates/configs/node/tsconfig.json.template +53 -0
- package/templates/configs/python/pyproject.toml.template +92 -0
- package/templates/configs/python/pytest.ini.template +64 -0
- package/templates/configs/python/ruff.toml.template +79 -0
- package/templates/configs/rust/Cargo.toml.template +51 -0
- package/templates/configs/shared/.editorconfig +67 -0
- package/templates/scripts/validate-templates.sh +449 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
{{PROJECT_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
- Monorepo with make-based task runner
|
|
8
|
+
- Configuration driven by `.project.yaml` (single source of truth)
|
|
9
|
+
- Quality checks, testing, and formatting enforced via `make check`
|
|
10
|
+
|
|
11
|
+
## Quick Reference
|
|
12
|
+
|
|
13
|
+
### Setup & Diagnostics
|
|
14
|
+
- `make setup` - Interactive setup for new developers
|
|
15
|
+
- `make doctor` - Diagnose common setup issues
|
|
16
|
+
- `make info` - Show project configuration dashboard
|
|
17
|
+
- `make config` - Interactive configuration editor
|
|
18
|
+
|
|
19
|
+
### Code Quality
|
|
20
|
+
- `make quality` - Run all quality checks (report: tmp/reports/quality-report.md)
|
|
21
|
+
- `make quality-fix` - Auto-fix issues
|
|
22
|
+
- `make lint` - Lint all code
|
|
23
|
+
- `make format` - Format all code
|
|
24
|
+
- `make fix` - Fix all auto-fixable issues (quality-fix + format)
|
|
25
|
+
- `make check` - Full pre-commit check (validate + quality + test)
|
|
26
|
+
|
|
27
|
+
### Testing
|
|
28
|
+
- `make test` - Run all tests (report: tmp/reports/test-report.md)
|
|
29
|
+
- `make test-unit` - Fast unit tests only
|
|
30
|
+
- `make test-coverage` - Detailed coverage report
|
|
31
|
+
- Coverage threshold: {{COVERAGE_THRESHOLD}}%
|
|
32
|
+
|
|
33
|
+
### Build & Development
|
|
34
|
+
- `make build` - Build all services
|
|
35
|
+
- `make clean` - Remove build artifacts
|
|
36
|
+
- `make dev` - Start all services (docker-compose up)
|
|
37
|
+
- `make stop` - Stop all services
|
|
38
|
+
|
|
39
|
+
### Session Workflow
|
|
40
|
+
- `make session-start` - Start AI-assisted development session
|
|
41
|
+
- `make session-end` - End session and create checkpoint
|
|
42
|
+
- `make session-commit` - Commit with quality checks
|
|
43
|
+
- `make session-push` - Push to remote
|
|
44
|
+
- `make session-pr` - Create PR with auto-generated content
|
|
45
|
+
|
|
46
|
+
{{#IF_INFISICAL}}
|
|
47
|
+
### Secrets Management
|
|
48
|
+
- `make secrets-pull` - Pull secrets from Infisical to .env
|
|
49
|
+
- `make secrets-show` - Show Infisical configuration (no secrets displayed)
|
|
50
|
+
{{/IF_INFISICAL}}
|
|
51
|
+
|
|
52
|
+
### Configuration
|
|
53
|
+
- `make lang-list` - Show enabled languages
|
|
54
|
+
- `make lang-add LANG=<name>` - Enable a language
|
|
55
|
+
- `make lang-remove LANG=<name>` - Disable a language
|
|
56
|
+
- `make sync` - Sync .project.yaml to language config files
|
|
57
|
+
|
|
58
|
+
### Code Generation
|
|
59
|
+
- `make generate` - Generate all code
|
|
60
|
+
- `make validate` - Validate generated code is up-to-date
|
|
61
|
+
|
|
62
|
+
{{#IF_PYTHON}}
|
|
63
|
+
## Python {{PYTHON_VERSION}}
|
|
64
|
+
|
|
65
|
+
- **Source:** `src/` or `services/python/`
|
|
66
|
+
- **Linter/Formatter:** ruff (config: `ruff.toml`, `pyproject.toml`)
|
|
67
|
+
- **Type checker:** mypy
|
|
68
|
+
- **Tests:** pytest (config: `pytest.ini`)
|
|
69
|
+
- **Package config:** `pyproject.toml`
|
|
70
|
+
- Run quality: `.project/scripts/quality/lint-python.sh`
|
|
71
|
+
{{/IF_PYTHON}}
|
|
72
|
+
|
|
73
|
+
{{#IF_GO}}
|
|
74
|
+
## Go {{GO_VERSION}}
|
|
75
|
+
|
|
76
|
+
- **Source:** `services/go/`
|
|
77
|
+
- **Linter:** golangci-lint (config: `.golangci.yml`)
|
|
78
|
+
- **Formatter:** gofmt + goimports
|
|
79
|
+
- **Tests:** `go test ./...`
|
|
80
|
+
- **Module:** `go.mod`
|
|
81
|
+
- Run quality: `.project/scripts/quality/lint-go.sh`
|
|
82
|
+
{{/IF_GO}}
|
|
83
|
+
|
|
84
|
+
{{#IF_NODE}}
|
|
85
|
+
## Node.js {{NODE_VERSION}}
|
|
86
|
+
|
|
87
|
+
- **Package:** `package.json`, `tsconfig.json`
|
|
88
|
+
- **Linter:** ESLint
|
|
89
|
+
- **Formatter:** Prettier
|
|
90
|
+
- **Tests:** npm test
|
|
91
|
+
{{/IF_NODE}}
|
|
92
|
+
|
|
93
|
+
{{#IF_NEXTJS}}
|
|
94
|
+
## Next.js
|
|
95
|
+
|
|
96
|
+
- **Directory:** `frontend/`
|
|
97
|
+
- **Stack:** App Router + TypeScript + Tailwind CSS
|
|
98
|
+
- **Build:** `cd frontend && npm run build`
|
|
99
|
+
- **Lint:** `cd frontend && npm run lint`
|
|
100
|
+
{{/IF_NEXTJS}}
|
|
101
|
+
|
|
102
|
+
{{#IF_RUST}}
|
|
103
|
+
## Rust {{RUST_VERSION}}
|
|
104
|
+
|
|
105
|
+
- **Package:** `Cargo.toml`
|
|
106
|
+
- **Linter:** clippy
|
|
107
|
+
- **Formatter:** rustfmt
|
|
108
|
+
- **Tests:** `cargo test`
|
|
109
|
+
{{/IF_RUST}}
|
|
110
|
+
|
|
111
|
+
{{#IF_CSHARP}}
|
|
112
|
+
## C# {{CSHARP_VERSION}}
|
|
113
|
+
|
|
114
|
+
- **Source:** `src/` or `services/csharp/`
|
|
115
|
+
- **Solution:** `*.sln`
|
|
116
|
+
- **Project:** `*.csproj`
|
|
117
|
+
- **Linter/Analyzer:** Roslyn Analyzers, StyleCop Analyzers
|
|
118
|
+
- **Formatter:** `dotnet format`
|
|
119
|
+
- **Tests:** `dotnet test` (xUnit)
|
|
120
|
+
{{/IF_CSHARP}}
|
|
121
|
+
|
|
122
|
+
{{#IF_GCLOUD}}
|
|
123
|
+
## Google Cloud
|
|
124
|
+
|
|
125
|
+
- **Auth:** `gcloud auth login` (interactive setup via `make setup`)
|
|
126
|
+
- **Project:** Set in `.env` as `GOOGLE_CLOUD_PROJECT`
|
|
127
|
+
- **SDK:** Installed via devcontainer post-create script
|
|
128
|
+
{{/IF_GCLOUD}}
|
|
129
|
+
|
|
130
|
+
{{#IF_PULUMI}}
|
|
131
|
+
## Pulumi
|
|
132
|
+
|
|
133
|
+
- **Auth:** `pulumi login`
|
|
134
|
+
- **Workflow:** Always `pulumi preview` before `pulumi up`
|
|
135
|
+
- **Secrets:** Use `pulumi config set --secret` for sensitive values
|
|
136
|
+
{{/IF_PULUMI}}
|
|
137
|
+
|
|
138
|
+
## Claude Code Integration
|
|
139
|
+
|
|
140
|
+
### Skills (`.claude/skills/`)
|
|
141
|
+
Domain-specific context loaded on demand. Check skill descriptions before starting work.
|
|
142
|
+
- `.claude/skills/learned/references/gotchas.md` - Known project gotchas
|
|
143
|
+
- `.claude/skills/learned/references/conventions.md` - Team conventions
|
|
144
|
+
|
|
145
|
+
### Commands (`.claude/commands/`)
|
|
146
|
+
Slash commands for common workflows. Run `/help` to list all with descriptions.
|
|
147
|
+
- `/session-start` - Start dev session
|
|
148
|
+
- `/session-end` - End session with checkpoint
|
|
149
|
+
- `/ask <question>` - Ask about the codebase
|
|
150
|
+
- `/explore-codebase` - Deep architecture exploration
|
|
151
|
+
- `/onboarding` - Generate first-day developer guide
|
|
152
|
+
- `/enable-agent <name>` - Activate a dormant agent
|
|
153
|
+
- `/help` - List all commands and agents
|
|
154
|
+
- `/quality` - Run quality checks (language-aware)
|
|
155
|
+
- `/setup-hooks` - Install git pre-commit/pre-push hooks
|
|
156
|
+
- `/learn` - Capture a gotcha, convention, or thing to avoid
|
|
157
|
+
- `/test` - Run tests
|
|
158
|
+
- `/fix-issue <number>` - Investigate and fix a GitHub issue
|
|
159
|
+
|
|
160
|
+
### Rules (`.claude/rules/`)
|
|
161
|
+
Language-specific conventions that activate automatically when editing matching files.
|
|
162
|
+
|
|
163
|
+
### Agents
|
|
164
|
+
**Active** (`.claude/agents/`) — auto-triggered when your question matches:
|
|
165
|
+
- `knowledge-bot` — Answers codebase questions with file:line references (sonnet, read-only)
|
|
166
|
+
- `onboarding` — Interactive onboarding buddy for new developers (sonnet, read-only)
|
|
167
|
+
- `quality-reviewer` — Reviews changed code for issues before committing (sonnet)
|
|
168
|
+
|
|
169
|
+
**Dormant** (`.claude/agents-available/`) — activate with `/enable-agent <name>`:
|
|
170
|
+
- `codebase-explorer` — Deep architecture analysis, generates codebase skill (sonnet, read-only)
|
|
171
|
+
- `code-reviewer` — Read-only PR review and security audit (sonnet, no write access)
|
|
172
|
+
- `test-writer` — Writes tests for existing code (sonnet)
|
|
173
|
+
- `debugger` — Traces root causes systematically (sonnet, no file edits)
|
|
174
|
+
|
|
175
|
+
## AI-Assisted Development Workflow
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
# 1. Start a session
|
|
179
|
+
/session-start
|
|
180
|
+
|
|
181
|
+
# 2. Create a feature branch
|
|
182
|
+
git checkout -b feature/your-feature
|
|
183
|
+
|
|
184
|
+
# 3. Ask questions as you go
|
|
185
|
+
/ask How does the auth middleware work?
|
|
186
|
+
|
|
187
|
+
# 4. Develop — Claude has full project context via skills
|
|
188
|
+
|
|
189
|
+
# 5. Run checks before committing
|
|
190
|
+
/quality
|
|
191
|
+
/test
|
|
192
|
+
|
|
193
|
+
# 6. Commit and push
|
|
194
|
+
git add -A && git commit -m "feat: your feature"
|
|
195
|
+
git push -u origin feature/your-feature
|
|
196
|
+
|
|
197
|
+
# 7. End session (creates checkpoint + evolves skills)
|
|
198
|
+
/session-end
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Security
|
|
202
|
+
|
|
203
|
+
**Critical rules — never violate these:**
|
|
204
|
+
|
|
205
|
+
1. **Never output, log, or commit secrets** — no API keys, tokens, passwords, or credentials in code, commits, checkpoints, or skill files
|
|
206
|
+
2. **Never read `.env` directly** — use `make secrets-show` (which masks values) to check configuration
|
|
207
|
+
3. **Never pass secrets as CLI arguments** — they appear in process lists and shell history
|
|
208
|
+
4. **Never include secrets in build args or Dockerfiles**
|
|
209
|
+
5. **Sensitive files are gitignored:** `.env`, `.env.*`, `.env.secrets`, `.claude/settings.local.json`
|
|
210
|
+
6. **Before committing:** verify no secrets in staged files (`git diff --cached`)
|
|
211
|
+
{{#IF_INFISICAL}}
|
|
212
|
+
7. **Infisical tokens:** never output `INFISICAL_TOKEN` values; use `make secrets-show` to verify config
|
|
213
|
+
{{/IF_INFISICAL}}
|
|
214
|
+
{{#IF_GCLOUD}}
|
|
215
|
+
8. **GCP credentials:** never output `gcloud auth print-access-token` or service account JSON keys
|
|
216
|
+
{{/IF_GCLOUD}}
|
|
217
|
+
|
|
218
|
+
## Conventions
|
|
219
|
+
|
|
220
|
+
- Run quality checks before committing (`/quality` or `make quality`)
|
|
221
|
+
- Use `/session-start` to begin work, `/session-end` to checkpoint
|
|
222
|
+
- All code changes should pass quality + test checks
|
|
223
|
+
{{#IF_PRECOMMIT}}
|
|
224
|
+
- Pre-commit hooks run automatically on `git commit`
|
|
225
|
+
{{/IF_PRECOMMIT}}
|
|
226
|
+
- Keep session checkpoints in `.ai/sessions/<developer>/<date>/`
|
|
227
|
+
- Skills evolve over time — gotchas and conventions are captured during `/session-end`
|
|
228
|
+
- Check `/help` for all available commands and agents
|