@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
|
@@ -22,7 +22,7 @@ Read these first for context (skip any that don't exist):
|
|
|
22
22
|
- `.claude/skills/learned/references/gotchas.md` — Known gotchas
|
|
23
23
|
- `.claude/skills/learned/references/conventions.md` — Team conventions
|
|
24
24
|
- `README.md` — Project readme
|
|
25
|
-
- `package.json`, `go.mod`, `pyproject.toml`, `*.csproj` — Dependencies
|
|
25
|
+
- `package.json`, `go.mod`, `pyproject.toml`, `*.csproj`, `Cargo.toml`, `Gemfile` — Dependencies
|
|
26
26
|
|
|
27
27
|
## How to Help
|
|
28
28
|
|
|
@@ -48,9 +48,10 @@ Prioritize by learning order:
|
|
|
48
48
|
5. Tests — how things are verified
|
|
49
49
|
|
|
50
50
|
### If asked about setup/environment:
|
|
51
|
-
1. Check for
|
|
52
|
-
2. Walk through the setup process step by step
|
|
53
|
-
3.
|
|
51
|
+
1. Check for the standard entry points: `package.json` scripts, `docker-compose.yml`, `.devcontainer/`, language-specific build files
|
|
52
|
+
2. Walk through the setup process step by step (clone → install deps → run the dev/test command shown in README)
|
|
53
|
+
3. If the repo has dxkit installed, point them at `/doctor` for environment validation
|
|
54
|
+
4. Warn about common setup issues from gotchas.md
|
|
54
55
|
|
|
55
56
|
## Rules
|
|
56
57
|
|
|
@@ -21,7 +21,7 @@ Explore this repository and generate a thorough understanding of:
|
|
|
21
21
|
|
|
22
22
|
### Phase 1: Orientation (broad scan)
|
|
23
23
|
1. `Glob("**/*")` to see the directory tree
|
|
24
|
-
2. Read top-level config files: `package.json`, `go.mod`, `pyproject.toml`, `*.csproj`, `Cargo.toml`, `
|
|
24
|
+
2. Read top-level config files: `package.json`, `go.mod`, `pyproject.toml`, `*.csproj`, `Cargo.toml`, `Gemfile`, `pom.xml`, `build.gradle`, `docker-compose.yml`, `.devcontainer/`
|
|
25
25
|
3. Read `README.md` if it exists
|
|
26
26
|
4. Identify what languages, frameworks, and tools are in use
|
|
27
27
|
|
|
@@ -17,7 +17,7 @@ You are a debugging specialist. You trace root causes systematically, never gues
|
|
|
17
17
|
|
|
18
18
|
## Tools
|
|
19
19
|
|
|
20
|
-
- Use `Bash` to run tests and reproduce failures
|
|
20
|
+
- Use `Bash` to run tests and reproduce failures with the project's native test runner (`npm test`, `pytest -x`, `go test -run TestName -v`, `dotnet test`, `cargo test`, etc.)
|
|
21
21
|
- Use `Grep` to trace function calls, error messages, and variable usage
|
|
22
22
|
- Use `Read` to examine the code around the failure point
|
|
23
23
|
|
|
@@ -26,4 +26,4 @@ You are a debugging specialist. You trace root causes systematically, never gues
|
|
|
26
26
|
- Do not modify source code — diagnose and report only
|
|
27
27
|
- Do not guess — if you're unsure, gather more evidence
|
|
28
28
|
- Do not run destructive commands (no `rm`, `drop`, `reset`)
|
|
29
|
-
- **NEVER read `.env` files** — if you suspect a config issue,
|
|
29
|
+
- **NEVER read `.env` files** — if you suspect a config issue, grep for the variable name only
|
|
@@ -47,10 +47,10 @@ You are a codebase health auditor. Your job is to give an honest, comprehensive
|
|
|
47
47
|
- **Score: 0-10**
|
|
48
48
|
|
|
49
49
|
### 6. Developer Experience
|
|
50
|
-
- Check for
|
|
50
|
+
- Check for `package.json` scripts, project-specific run/test scripts (easy to run?)
|
|
51
51
|
- Check for Docker/devcontainer setup
|
|
52
52
|
- Check for CI/CD configuration
|
|
53
|
-
- Check for pre-commit hooks
|
|
53
|
+
- Check for pre-commit/pre-push hooks (`.githooks/` or equivalent)
|
|
54
54
|
- **Score: 0-10**
|
|
55
55
|
|
|
56
56
|
## Output Format
|
|
@@ -2,20 +2,28 @@
|
|
|
2
2
|
description: Diagnose development environment issues
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Diagnose this development environment.
|
|
5
|
+
Diagnose this development environment.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Step 1: dxkit doctor
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
2. **Node** (if package.json): `node --version`, `npm --version`, check if `node_modules/` exists
|
|
11
|
-
3. **Python** (if pyproject.toml): `python3 --version`, check virtual env, check if deps installed
|
|
12
|
-
4. **Go** (if go.mod): `go version`, check if modules downloaded
|
|
13
|
-
5. **C#** (if .csproj): `dotnet --version`
|
|
14
|
-
6. **Rust** (if Cargo.toml): `rustc --version`, `cargo --version`
|
|
15
|
-
7. **Docker** (if docker-compose.yml): `docker --version`, check if running
|
|
16
|
-
8. **Make** (if Makefile): `make --version`
|
|
17
|
-
9. **Claude Code DX**: check `.claude/` directory, `CLAUDE.md`, `.vyuh-dxkit.json`
|
|
9
|
+
Run dxkit's own health check first — it covers tool availability (gitleaks, semgrep, cloc, etc.), `.claude/` install state, and hook configuration:
|
|
18
10
|
|
|
19
|
-
|
|
11
|
+
```bash
|
|
12
|
+
npx vyuh-dxkit doctor 2>/dev/null
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If the command isn't available, fall back to Step 2.
|
|
16
|
+
|
|
17
|
+
## Step 2: Environment checks
|
|
18
|
+
|
|
19
|
+
1. **Git**: `git --version` and `git status`
|
|
20
|
+
2. **Node** (if `package.json`): `node --version` / `npm --version`; is `node_modules/` populated?
|
|
21
|
+
3. **Python** (if `pyproject.toml`): `python3 --version`; virtual env activated? deps installed?
|
|
22
|
+
4. **Go** (if `go.mod`): `go version`; modules downloaded?
|
|
23
|
+
5. **.NET** (if `*.csproj`): `dotnet --version`
|
|
24
|
+
6. **Rust** (if `Cargo.toml`): `rustc --version` / `cargo --version`
|
|
25
|
+
7. **Docker** (if `docker-compose.yml`): `docker --version`; daemon running?
|
|
26
|
+
8. **Hooks active**: `git config core.hooksPath` should report `.githooks` if dxkit hooks are installed
|
|
27
|
+
9. **dxkit install**: `.claude/`, `CLAUDE.md`, `.vyuh-dxkit.json` present?
|
|
20
28
|
|
|
21
29
|
Report any issues found and provide remediation steps.
|
|
@@ -5,84 +5,76 @@ description: Build code, compile binaries, install dependencies, clean artifacts
|
|
|
5
5
|
|
|
6
6
|
# Build
|
|
7
7
|
|
|
8
|
-
## Commands
|
|
9
|
-
- `make build` - Build all services
|
|
10
|
-
- `make clean` - Remove build artifacts (bin/, pyc, coverage, tmp/)
|
|
11
|
-
- `make dev` - Start all services (docker-compose up)
|
|
12
|
-
- `make stop` - Stop all services (docker-compose down)
|
|
13
|
-
|
|
14
8
|
{{#IF_PYTHON}}
|
|
15
|
-
## Python
|
|
9
|
+
## Python
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
Editable installs for development:
|
|
18
12
|
```bash
|
|
19
|
-
pip install -e
|
|
13
|
+
pip install -e <package-dir>/
|
|
20
14
|
```
|
|
21
15
|
|
|
22
16
|
Build checks:
|
|
23
17
|
- Syntax: `python3 -m py_compile <file>`
|
|
24
18
|
- Types: `mypy src/`
|
|
25
|
-
- Package: `python3 -m build` (if pyproject.toml has build-system)
|
|
19
|
+
- Package: `python3 -m build` (if `pyproject.toml` has `build-system`)
|
|
26
20
|
{{/IF_PYTHON}}
|
|
27
21
|
|
|
28
22
|
{{#IF_GO}}
|
|
29
|
-
## Go
|
|
23
|
+
## Go
|
|
30
24
|
|
|
31
|
-
Go services compile to `bin/`:
|
|
32
25
|
```bash
|
|
33
|
-
go build
|
|
26
|
+
go build ./... # build everything
|
|
27
|
+
go build -o bin/<name> # build a specific binary to bin/
|
|
34
28
|
```
|
|
35
29
|
|
|
36
30
|
Build flags:
|
|
37
31
|
- `CGO_ENABLED=0` for static binaries (container-friendly)
|
|
38
|
-
- `-ldflags="-s -w"` to strip debug info
|
|
32
|
+
- `-ldflags="-s -w"` to strip debug info
|
|
39
33
|
- `GOOS=linux GOARCH=amd64` for cross-compilation
|
|
40
34
|
{{/IF_GO}}
|
|
41
35
|
|
|
42
36
|
{{#IF_NODE}}
|
|
43
|
-
## Node.js
|
|
37
|
+
## Node.js
|
|
44
38
|
|
|
45
39
|
```bash
|
|
46
|
-
npm install
|
|
47
|
-
npm run build
|
|
40
|
+
npm install # install dependencies
|
|
41
|
+
npm run build # compile TypeScript / bundle
|
|
48
42
|
```
|
|
49
43
|
{{/IF_NODE}}
|
|
50
44
|
|
|
51
45
|
{{#IF_NEXTJS}}
|
|
52
|
-
## Next.js
|
|
46
|
+
## Next.js
|
|
53
47
|
|
|
54
48
|
```bash
|
|
55
49
|
cd frontend
|
|
56
50
|
npm install
|
|
57
|
-
npm run build
|
|
58
|
-
npm run dev
|
|
51
|
+
npm run build # production build (catches TS + import errors)
|
|
52
|
+
npm run dev # development server
|
|
59
53
|
```
|
|
60
|
-
|
|
61
|
-
The build step catches TypeScript errors and missing imports — run it before deploying.
|
|
62
54
|
{{/IF_NEXTJS}}
|
|
63
55
|
|
|
64
56
|
{{#IF_RUST}}
|
|
65
|
-
## Rust
|
|
57
|
+
## Rust
|
|
66
58
|
|
|
67
59
|
```bash
|
|
68
|
-
cargo build # debug
|
|
69
|
-
cargo build --release # optimized
|
|
60
|
+
cargo build # debug
|
|
61
|
+
cargo build --release # optimized
|
|
70
62
|
```
|
|
71
63
|
{{/IF_RUST}}
|
|
72
64
|
|
|
73
65
|
{{#IF_CSHARP}}
|
|
74
|
-
## C#
|
|
66
|
+
## C#
|
|
75
67
|
|
|
76
68
|
```bash
|
|
77
|
-
dotnet restore #
|
|
78
|
-
dotnet build # debug
|
|
79
|
-
dotnet build --configuration Release # release
|
|
69
|
+
dotnet restore # NuGet packages
|
|
70
|
+
dotnet build # debug
|
|
71
|
+
dotnet build --configuration Release # release
|
|
80
72
|
dotnet publish -c Release -o out/ # publish for deployment
|
|
81
73
|
```
|
|
82
74
|
{{/IF_CSHARP}}
|
|
83
75
|
|
|
84
76
|
{{#IF_DOCKER}}
|
|
85
|
-
## Docker
|
|
77
|
+
## Docker
|
|
86
78
|
|
|
87
79
|
```bash
|
|
88
80
|
docker-compose build # build all services
|
|
@@ -5,39 +5,21 @@ description: Deploy services, release to production, push to cloud. Use when ask
|
|
|
5
5
|
|
|
6
6
|
# Deployment
|
|
7
7
|
|
|
8
|
-
##
|
|
9
|
-
- `make deploy` - Deploy services (configure deployment target first)
|
|
10
|
-
- `make build` - Build before deploying
|
|
11
|
-
- `make check` - Run full validation before deploying
|
|
8
|
+
## Pre-deployment checklist
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
- [ ] `make check` passes (quality + tests + validation)
|
|
10
|
+
- [ ] `/quality` and `/test` pass
|
|
15
11
|
- [ ] All changes committed and pushed
|
|
16
12
|
- [ ] PR reviewed and approved
|
|
17
|
-
{{#IF_INFISICAL}}
|
|
18
|
-
- [ ] Secrets pulled: `make secrets-pull`
|
|
19
|
-
{{/IF_INFISICAL}}
|
|
20
13
|
- [ ] No hardcoded secrets in code or config
|
|
21
14
|
|
|
22
|
-
## Deployment
|
|
15
|
+
## Deployment safety
|
|
23
16
|
|
|
24
17
|
**CRITICAL: Never auto-approve destructive deployment operations.**
|
|
25
18
|
|
|
26
19
|
- Always preview/dry-run before applying changes
|
|
27
20
|
- Require explicit user confirmation for production deployments
|
|
28
21
|
- Never force-push or skip CI checks before deploying
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Secrets for Deployment
|
|
32
|
-
|
|
33
|
-
Pull secrets before deploying:
|
|
34
|
-
```bash
|
|
35
|
-
make secrets-pull # fetch from Infisical to .env
|
|
36
|
-
make secrets-show # verify configuration (masked values)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Never pass secrets as CLI arguments** — use environment variables or secret managers.
|
|
40
|
-
{{/IF_INFISICAL}}
|
|
22
|
+
- Never pass secrets as CLI arguments — use environment variables or secret managers
|
|
41
23
|
|
|
42
24
|
{{#IF_GCLOUD}}
|
|
43
25
|
## Google Cloud Deployment
|
|
@@ -122,9 +104,7 @@ For Docker, use multi-stage builds:
|
|
|
122
104
|
|
|
123
105
|
## CI/CD
|
|
124
106
|
|
|
125
|
-
CI pipeline
|
|
126
|
-
- Validation, quality checks, tests per enabled language
|
|
127
|
-
- Coverage enforcement at {{COVERAGE_THRESHOLD}}%
|
|
107
|
+
Set up the project's CI pipeline so it runs the same checks as `/quality` and `/test` on every PR.
|
|
128
108
|
|
|
129
109
|
## Gotchas
|
|
130
110
|
|
|
@@ -3,52 +3,29 @@ name: doctor
|
|
|
3
3
|
description: Diagnose and fix development environment issues. Use when setup fails, tools are missing, the environment is broken, or something is misconfigured.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Doctor
|
|
7
|
-
|
|
8
|
-
##
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
make doctor # identify what's missing
|
|
29
|
-
make setup # re-run interactive setup
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Config out of sync
|
|
33
|
-
```bash
|
|
34
|
-
make sync # re-sync .project.yaml to language files
|
|
35
|
-
make sync-preview # preview changes first (dry run)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Pre-commit failures
|
|
39
|
-
```bash
|
|
40
|
-
make fix # auto-fix all issues
|
|
41
|
-
make check # verify everything passes
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Build failures after config change
|
|
45
|
-
```bash
|
|
46
|
-
make sync # sync config
|
|
47
|
-
make clean # clean artifacts
|
|
48
|
-
make build # rebuild
|
|
49
|
-
```
|
|
6
|
+
# Doctor
|
|
7
|
+
|
|
8
|
+
## Diagnose
|
|
9
|
+
|
|
10
|
+
Walk through this checklist when something feels off:
|
|
11
|
+
|
|
12
|
+
1. **Git**: `git --version`, working tree clean?
|
|
13
|
+
2. **Language toolchains** (only for languages present in this repo):
|
|
14
|
+
- Node: `node --version` / `npm --version`; `node_modules/` populated?
|
|
15
|
+
- Python: `python3 --version`; virtual env activated? deps installed?
|
|
16
|
+
- Go: `go version`; modules downloaded?
|
|
17
|
+
- .NET: `dotnet --version`
|
|
18
|
+
- Rust: `rustc --version` / `cargo --version`
|
|
19
|
+
3. **Docker** (if `docker-compose.yml` present): `docker --version`; daemon running?
|
|
20
|
+
4. **dxkit health**: `npx vyuh-dxkit doctor` — verifies dxkit-managed tools (gitleaks, semgrep, cloc, etc.) and the `.claude/` install
|
|
21
|
+
5. **Hooks active**: `git config core.hooksPath` should report `.githooks` if hooks are installed
|
|
22
|
+
|
|
23
|
+
## Fix
|
|
24
|
+
|
|
25
|
+
- Missing dxkit tools: `npx vyuh-dxkit tools install`
|
|
26
|
+
- Stale `node_modules/`: `rm -rf node_modules && npm install`
|
|
27
|
+
- Hooks not firing: `git config core.hooksPath .githooks`
|
|
50
28
|
|
|
51
29
|
## Environment
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- All tools installed via devcontainer features or post-create script
|
|
30
|
+
|
|
31
|
+
If the repo has `.devcontainer/`, the canonical environment is the container — open in a devcontainer-aware editor (VS Code "Reopen in Container", Codespaces) instead of fighting host-machine setup.
|
|
@@ -11,9 +11,9 @@ paths:
|
|
|
11
11
|
# Google Cloud (gcloud)
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
|
-
- **Auth:** `gcloud auth login`
|
|
15
|
-
- **Project:**
|
|
16
|
-
- **SDK:**
|
|
14
|
+
- **Auth:** `gcloud auth login`
|
|
15
|
+
- **Project:** set via `gcloud config set project <id>` or the `GOOGLE_CLOUD_PROJECT` env var
|
|
16
|
+
- **SDK:** install from https://cloud.google.com/sdk (devcontainer users get it via the post-create script)
|
|
17
17
|
|
|
18
18
|
## Common Commands
|
|
19
19
|
|
|
@@ -42,12 +42,12 @@ gcloud logging read "severity>=ERROR" --limit=20 --format=json
|
|
|
42
42
|
|
|
43
43
|
## Integration with Secrets
|
|
44
44
|
|
|
45
|
-
GCP project ID is
|
|
45
|
+
GCP project ID is typically set as an environment variable:
|
|
46
46
|
```
|
|
47
47
|
GOOGLE_CLOUD_PROJECT=my-project-id
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Source it from a secret store (Infisical, Doppler, GitHub Secrets) rather than committing to `.env`.
|
|
51
51
|
|
|
52
52
|
## Security — CRITICAL
|
|
53
53
|
|
|
@@ -10,7 +10,7 @@ It is updated during session-end checkpoints.
|
|
|
10
10
|
|
|
11
11
|
## How This Works
|
|
12
12
|
|
|
13
|
-
1. During
|
|
13
|
+
1. During `/session-end` (or anytime via `/learn`), the conversation is reviewed for learnings
|
|
14
14
|
2. Any new gotchas, patterns, or conventions are appended to the reference files
|
|
15
15
|
3. Over time, this becomes the most valuable skill — real failure points and patterns
|
|
16
16
|
|
|
@@ -12,8 +12,8 @@ paths:
|
|
|
12
12
|
# Pulumi (Infrastructure as Code)
|
|
13
13
|
|
|
14
14
|
## Setup
|
|
15
|
-
- **Auth:** `pulumi login`
|
|
16
|
-
- **SDK:**
|
|
15
|
+
- **Auth:** `pulumi login`
|
|
16
|
+
- **SDK:** install from https://www.pulumi.com/docs/install/ (devcontainer users get it via the post-create script)
|
|
17
17
|
- **Path:** `~/.pulumi/bin/pulumi`
|
|
18
18
|
|
|
19
19
|
## Core Workflow
|
|
@@ -5,28 +5,12 @@ description: Run code quality checks, linting, formatting, and auto-fixing. Use
|
|
|
5
5
|
|
|
6
6
|
# Code Quality
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- `make quality` - Run all quality checks (report: `tmp/reports/quality-report.md`)
|
|
10
|
-
- `make quality-fix` - Auto-fix all fixable issues
|
|
11
|
-
- `make lint` - Lint only
|
|
12
|
-
- `make format` - Format all code
|
|
13
|
-
- `make fix` - Fix + format (shorthand)
|
|
14
|
-
- `make check` - Full pre-commit check (validate + quality + test)
|
|
15
|
-
- `make format-check` - Check formatting without modifying
|
|
16
|
-
|
|
17
|
-
## Quality Presets
|
|
18
|
-
- `make quality-strict` - 90% coverage, all checks
|
|
19
|
-
- `make quality-standard` - 80% coverage (default)
|
|
20
|
-
- `make quality-relaxed` - 50% coverage
|
|
21
|
-
- `make quality-off` - Disable checks
|
|
22
|
-
- `make quality-config` - Show current settings
|
|
8
|
+
Run `/quality` for the full deterministic report (lint + format + slop + duplication metrics).
|
|
23
9
|
|
|
24
10
|
{{#IF_PYTHON}}
|
|
25
11
|
## Python
|
|
26
12
|
|
|
27
|
-
**Tools
|
|
28
|
-
**Config:** `ruff.toml`, `pyproject.toml`
|
|
29
|
-
**Script:** `.project/scripts/quality/lint-python.sh`
|
|
13
|
+
**Tools**: ruff (lint + format), mypy (types)
|
|
30
14
|
|
|
31
15
|
Common fixes:
|
|
32
16
|
```bash
|
|
@@ -35,16 +19,13 @@ ruff format .
|
|
|
35
19
|
mypy src/
|
|
36
20
|
```
|
|
37
21
|
|
|
38
|
-
Key ruff
|
|
39
|
-
Per-file ignores configured in `ruff.toml` for tests (assertions, fixtures).
|
|
22
|
+
Key ruff rule groups: pycodestyle (E), pyflakes (F), isort (I), mccabe (C90), bugbear (B).
|
|
40
23
|
{{/IF_PYTHON}}
|
|
41
24
|
|
|
42
25
|
{{#IF_GO}}
|
|
43
26
|
## Go
|
|
44
27
|
|
|
45
|
-
**Tools
|
|
46
|
-
**Config:** `.golangci.yml`
|
|
47
|
-
**Script:** `.project/scripts/quality/lint-go.sh`
|
|
28
|
+
**Tools**: golangci-lint, gofmt, goimports
|
|
48
29
|
|
|
49
30
|
Common fixes:
|
|
50
31
|
```bash
|
|
@@ -5,13 +5,14 @@ description: Review code for quality, security, and patterns. Use when asked to
|
|
|
5
5
|
|
|
6
6
|
# Code Review
|
|
7
7
|
|
|
8
|
-
## Quick
|
|
9
|
-
|
|
8
|
+
## Quick check
|
|
9
|
+
|
|
10
|
+
Run `/quality` and `/test` first — they cover lint, format, slop, duplication, and test results.
|
|
10
11
|
|
|
11
12
|
## Review Checklist
|
|
12
13
|
|
|
13
14
|
### 1. Quality
|
|
14
|
-
- [ ]
|
|
15
|
+
- [ ] `/quality` passes
|
|
15
16
|
- [ ] Coverage meets threshold ({{COVERAGE_THRESHOLD}}%)
|
|
16
17
|
- [ ] No suppressed lint rules without justification
|
|
17
18
|
|
|
@@ -5,17 +5,7 @@ description: Scaffold new code — services, packages, modules, components. Use
|
|
|
5
5
|
|
|
6
6
|
# Code Scaffolding
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
- `.project.yaml` - Central config (edit via `make config`, view via `make info`)
|
|
10
|
-
- `.project/` - Framework tooling and scripts
|
|
11
|
-
- `.ai/` - AI session management and checkpoints
|
|
12
|
-
|
|
13
|
-
## Language Management
|
|
14
|
-
- `make lang-list` - Show enabled languages
|
|
15
|
-
- `make lang-add LANG=<name>` - Enable a language
|
|
16
|
-
- `make lang-remove LANG=<name>` - Disable a language
|
|
17
|
-
- `make sync` - Sync `.project.yaml` to language config files
|
|
18
|
-
- `make sync-preview` - Preview sync changes (dry run)
|
|
8
|
+
Match existing layout and patterns when adding new code. Read a few neighboring files in the same area before creating new ones — naming, error handling, and test placement should look like the rest of the codebase.
|
|
19
9
|
|
|
20
10
|
{{#IF_PYTHON}}
|
|
21
11
|
## Python Structure
|
|
@@ -117,7 +107,7 @@ tests/<ProjectName>.Tests/
|
|
|
117
107
|
- xUnit + Moq for testing
|
|
118
108
|
{{/IF_CSHARP}}
|
|
119
109
|
|
|
120
|
-
## After
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
110
|
+
## After scaffolding
|
|
111
|
+
|
|
112
|
+
1. Add tests next to the new code (mirroring how the rest of the codebase locates them)
|
|
113
|
+
2. Run `/test` and `/quality` to confirm nothing regressed
|
|
@@ -12,28 +12,27 @@ paths:
|
|
|
12
12
|
|
|
13
13
|
# Secrets Management (Infisical)
|
|
14
14
|
|
|
15
|
-
##
|
|
16
|
-
- `make secrets-pull` - Pull secrets from Infisical to `.env`
|
|
17
|
-
- `make secrets-show` - Show Infisical configuration (**no secrets displayed**)
|
|
18
|
-
- `make setup` - Configure Infisical during initial setup
|
|
15
|
+
## How it works
|
|
19
16
|
|
|
20
|
-
## How It Works
|
|
21
17
|
1. Infisical stores secrets centrally (encrypted, access-controlled)
|
|
22
|
-
2. `
|
|
18
|
+
2. `infisical run -- <command>` or `infisical export --format=dotenv > .env` pulls them into the local environment
|
|
23
19
|
3. `.env` is gitignored — **never commit secrets**
|
|
24
20
|
|
|
25
21
|
## Configuration
|
|
26
|
-
Required in `.env` (set during `make setup`):
|
|
27
|
-
- `INFISICAL_TOKEN` - Authentication token
|
|
28
|
-
- `INFISICAL_PROJECT_ID` - Project identifier
|
|
29
|
-
- `INFISICAL_ENV` - Environment (default: `dev`)
|
|
30
22
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
23
|
+
Authenticate via `infisical login`. Per-project config typically lives in `.infisical.json` (project ID + environment).
|
|
24
|
+
|
|
25
|
+
Required environment variables (set during initial project bootstrap):
|
|
26
|
+
- `INFISICAL_TOKEN` — auth token (for headless/CI usage)
|
|
27
|
+
- `INFISICAL_PROJECT_ID` — project identifier
|
|
28
|
+
- `INFISICAL_ENV` — environment (default: `dev`)
|
|
29
|
+
|
|
30
|
+
## Checking configuration
|
|
31
|
+
|
|
32
|
+
Look at the variable names without their values:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
infisical secrets --plain | cut -d= -f1
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
## Security — CRITICAL
|
|
@@ -43,10 +42,10 @@ INFISICAL_TOKEN=***configured***
|
|
|
43
42
|
3. **NEVER include secrets** in session checkpoints or skill files
|
|
44
43
|
4. **NEVER pass secrets as CLI arguments** — they appear in process lists
|
|
45
44
|
5. **NEVER commit** `.env`, `.env.*`, or `.env.secrets`
|
|
46
|
-
6.
|
|
47
|
-
7. If a secret is accidentally exposed, rotate it immediately
|
|
45
|
+
6. If a secret is accidentally exposed, rotate it immediately
|
|
48
46
|
|
|
49
47
|
## Troubleshooting
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
48
|
+
|
|
49
|
+
- Token expired → re-run `infisical login`
|
|
50
|
+
- Pull fails → check the project ID and environment, verify token permissions
|
|
51
|
+
- Missing variable → confirm it exists in the right Infisical environment
|
|
@@ -6,38 +6,27 @@ description: Manage AI development sessions — start, checkpoint, commit, push,
|
|
|
6
6
|
# Session Management
|
|
7
7
|
|
|
8
8
|
## Workflow
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
6. `make session-pr` - Create PR with auto-generated content
|
|
15
|
-
|
|
16
|
-
## Key Files
|
|
17
|
-
- `.ai/prompts/session-start.md` - Planning prompt template
|
|
18
|
-
- `.ai/prompts/session-end.md` - Checkpoint creation guide
|
|
19
|
-
- `.ai/prompts/step-by-step.md` - Step-by-step development guide
|
|
20
|
-
- `.ai/templates/session-checkpoint-template.md` - Checkpoint structure
|
|
9
|
+
|
|
10
|
+
1. `/session-start` — review prior checkpoints + plan the session
|
|
11
|
+
2. Work on the task
|
|
12
|
+
3. `/session-end` — capture a checkpoint
|
|
13
|
+
4. Commit + push via git directly
|
|
21
14
|
|
|
22
15
|
## Checkpoints
|
|
23
|
-
- Stored in: `.ai/sessions/<developer>/<date>/session-<N>.md`
|
|
24
|
-
- Auto-numbered per day
|
|
25
|
-
- Include: accomplishments, files, decisions, next steps, AI context
|
|
26
|
-
|
|
27
|
-
## Checkpoint Quality
|
|
28
|
-
A good checkpoint is specific, not vague:
|
|
29
|
-
- **Bad:** "worked on the client"
|
|
30
|
-
- **Good:** "Implemented PolygonClient with 3 endpoints, added 15 unit tests, all passing"
|
|
31
|
-
|
|
32
|
-
## Skill Evolution (during session-end)
|
|
33
|
-
After creating the checkpoint, review the session for learnings:
|
|
34
|
-
- Append gotchas to `.claude/skills/learned/references/gotchas.md`
|
|
35
|
-
- Append conventions to `.claude/skills/learned/references/conventions.md`
|
|
36
|
-
- Update area-specific gotchas in `.claude/skills/<area>/references/gotchas.md`
|
|
37
|
-
- **Create new skills** if a distinct domain/workflow emerged (new `.claude/skills/<name>/SKILL.md`)
|
|
38
16
|
|
|
39
|
-
|
|
17
|
+
- Stored in `.ai/sessions/<developer>/<date>/session-<N>.md` (auto-numbered per day)
|
|
18
|
+
- Include: accomplishments (specific, not vague), files changed, decisions, next steps, AI context
|
|
19
|
+
|
|
20
|
+
A good checkpoint is specific:
|
|
21
|
+
- **Bad**: "worked on the client"
|
|
22
|
+
- **Good**: "Implemented PolygonClient with 3 endpoints, added 15 unit tests, all passing"
|
|
23
|
+
|
|
24
|
+
## Skill evolution (during `/session-end`)
|
|
40
25
|
|
|
41
|
-
|
|
42
|
-
- `
|
|
43
|
-
- `
|
|
26
|
+
Review the session for learnings and append to:
|
|
27
|
+
- `.claude/skills/learned/references/gotchas.md` — surprising behaviors, edge cases
|
|
28
|
+
- `.claude/skills/learned/references/conventions.md` — patterns the team converged on
|
|
29
|
+
|
|
30
|
+
Create new skills (`.claude/skills/<name>/SKILL.md`) when a distinct domain/workflow emerges.
|
|
31
|
+
|
|
32
|
+
**NEVER include secret values in checkpoints or skill files.**
|
|
@@ -18,13 +18,7 @@ paths:
|
|
|
18
18
|
|
|
19
19
|
# Testing
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
- `make test` - Run all tests (report: `tmp/reports/test-report.md`)
|
|
23
|
-
- `make test-unit` - Fast unit tests only (no coverage)
|
|
24
|
-
- `make test-quick` - Alias for test-unit
|
|
25
|
-
- `make test-integration` - Integration tests only
|
|
26
|
-
- `make test-coverage` - Detailed coverage report
|
|
27
|
-
- Coverage threshold: **{{COVERAGE_THRESHOLD}}%**
|
|
21
|
+
**Coverage threshold**: {{COVERAGE_THRESHOLD}}%
|
|
28
22
|
|
|
29
23
|
{{#IF_PYTHON}}
|
|
30
24
|
## Python
|