@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.
Files changed (149) hide show
  1. package/dist/cli.d.ts +2 -0
  2. package/dist/cli.d.ts.map +1 -0
  3. package/dist/cli.js +173 -0
  4. package/dist/cli.js.map +1 -0
  5. package/dist/codebase-scanner.d.ts +33 -0
  6. package/dist/codebase-scanner.d.ts.map +1 -0
  7. package/dist/codebase-scanner.js +497 -0
  8. package/dist/codebase-scanner.js.map +1 -0
  9. package/dist/constants.d.ts +17 -0
  10. package/dist/constants.d.ts.map +1 -0
  11. package/dist/constants.js +80 -0
  12. package/dist/constants.js.map +1 -0
  13. package/dist/detect.d.ts +3 -0
  14. package/dist/detect.d.ts.map +1 -0
  15. package/dist/detect.js +264 -0
  16. package/dist/detect.js.map +1 -0
  17. package/dist/doctor.d.ts +2 -0
  18. package/dist/doctor.d.ts.map +1 -0
  19. package/dist/doctor.js +157 -0
  20. package/dist/doctor.js.map +1 -0
  21. package/dist/files.d.ts +17 -0
  22. package/dist/files.d.ts.map +1 -0
  23. package/dist/files.js +99 -0
  24. package/dist/files.js.map +1 -0
  25. package/dist/generator.d.ts +10 -0
  26. package/dist/generator.d.ts.map +1 -0
  27. package/dist/generator.js +405 -0
  28. package/dist/generator.js.map +1 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +9 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/logger.d.ts +9 -0
  34. package/dist/logger.d.ts.map +1 -0
  35. package/dist/logger.js +51 -0
  36. package/dist/logger.js.map +1 -0
  37. package/dist/prompts.d.ts +10 -0
  38. package/dist/prompts.d.ts.map +1 -0
  39. package/dist/prompts.js +125 -0
  40. package/dist/prompts.js.map +1 -0
  41. package/dist/template-engine.d.ts +22 -0
  42. package/dist/template-engine.d.ts.map +1 -0
  43. package/dist/template-engine.js +63 -0
  44. package/dist/template-engine.js.map +1 -0
  45. package/dist/types.d.ts +68 -0
  46. package/dist/types.d.ts.map +1 -0
  47. package/dist/types.js +3 -0
  48. package/dist/types.js.map +1 -0
  49. package/dist/update.d.ts +2 -0
  50. package/dist/update.d.ts.map +1 -0
  51. package/dist/update.js +97 -0
  52. package/dist/update.js.map +1 -0
  53. package/package.json +43 -0
  54. package/templates/.ai/README.md +117 -0
  55. package/templates/.ai/prompts/execution-prompt.md +9 -0
  56. package/templates/.ai/prompts/planning-prompt.md +18 -0
  57. package/templates/.ai/prompts/session-end-template.md +182 -0
  58. package/templates/.ai/prompts/session-end.md +132 -0
  59. package/templates/.ai/prompts/session-start.md +109 -0
  60. package/templates/.ai/prompts/step-by-step.md +113 -0
  61. package/templates/.ai/sessions/.gitkeep +0 -0
  62. package/templates/.ai/templates/session-checkpoint-template.md +97 -0
  63. package/templates/.claude/agents/knowledge-bot.md +62 -0
  64. package/templates/.claude/agents/onboarding.md +61 -0
  65. package/templates/.claude/agents/quality-reviewer.md +85 -0
  66. package/templates/.claude/agents-available/code-reviewer.md +29 -0
  67. package/templates/.claude/agents-available/codebase-explorer.md +99 -0
  68. package/templates/.claude/agents-available/debugger.md +29 -0
  69. package/templates/.claude/agents-available/knowledge-bot.md +62 -0
  70. package/templates/.claude/agents-available/test-writer.md +34 -0
  71. package/templates/.claude/commands/ask.md +7 -0
  72. package/templates/.claude/commands/check.md.template +55 -0
  73. package/templates/.claude/commands/doctor.md +21 -0
  74. package/templates/.claude/commands/enable-agent.md +12 -0
  75. package/templates/.claude/commands/explore-codebase.md +12 -0
  76. package/templates/.claude/commands/fix-issue.md +12 -0
  77. package/templates/.claude/commands/fix.md.template +32 -0
  78. package/templates/.claude/commands/help.md +36 -0
  79. package/templates/.claude/commands/learn.md +48 -0
  80. package/templates/.claude/commands/onboarding.md +21 -0
  81. package/templates/.claude/commands/quality.md.template +42 -0
  82. package/templates/.claude/commands/session-end.md +40 -0
  83. package/templates/.claude/commands/session-start.md +30 -0
  84. package/templates/.claude/commands/setup-hooks.md +60 -0
  85. package/templates/.claude/commands/test.md.template +49 -0
  86. package/templates/.claude/rules/csharp.md +18 -0
  87. package/templates/.claude/rules/go.md +16 -0
  88. package/templates/.claude/rules/nextjs.md +17 -0
  89. package/templates/.claude/rules/python.md +19 -0
  90. package/templates/.claude/rules/rust.md +14 -0
  91. package/templates/.claude/skills/build/SKILL.md.template +98 -0
  92. package/templates/.claude/skills/deploy/SKILL.md.template +131 -0
  93. package/templates/.claude/skills/deploy/references/gotchas.md +5 -0
  94. package/templates/.claude/skills/doctor/SKILL.md +54 -0
  95. package/templates/.claude/skills/gcloud/SKILL.md +61 -0
  96. package/templates/.claude/skills/gcloud/references/gotchas.md +5 -0
  97. package/templates/.claude/skills/learned/SKILL.md +55 -0
  98. package/templates/.claude/skills/learned/references/conventions.md +11 -0
  99. package/templates/.claude/skills/learned/references/deny-recommendations.md +18 -0
  100. package/templates/.claude/skills/learned/references/gotchas.md +11 -0
  101. package/templates/.claude/skills/pulumi/SKILL.md +67 -0
  102. package/templates/.claude/skills/quality/SKILL.md.template +108 -0
  103. package/templates/.claude/skills/quality/references/gotchas.md +5 -0
  104. package/templates/.claude/skills/review/SKILL.md.template +73 -0
  105. package/templates/.claude/skills/scaffold/SKILL.md.template +123 -0
  106. package/templates/.claude/skills/secrets/SKILL.md +45 -0
  107. package/templates/.claude/skills/session/SKILL.md +43 -0
  108. package/templates/.claude/skills/test/SKILL.md.template +109 -0
  109. package/templates/.claude/skills/test/references/gotchas.md +5 -0
  110. package/templates/.devcontainer/Dockerfile.dev.template +89 -0
  111. package/templates/.devcontainer/devcontainer.json.template +184 -0
  112. package/templates/.devcontainer/docker-compose.yml.template +105 -0
  113. package/templates/.devcontainer/init-scripts/01-init.sql.template +12 -0
  114. package/templates/.devcontainer/post-create.sh.template +298 -0
  115. package/templates/.github/workflows/ci.yml.template +399 -0
  116. package/templates/.github/workflows/quality.yml.template +376 -0
  117. package/templates/.pre-commit-config.yaml.template +106 -0
  118. package/templates/.project/config/edit_config.py +275 -0
  119. package/templates/.project/config/project_config.py +894 -0
  120. package/templates/.project/scripts/codegen/generate-all.sh +20 -0
  121. package/templates/.project/scripts/codegen/validate-all.sh +17 -0
  122. package/templates/.project/scripts/docs/generate-all.sh +30 -0
  123. package/templates/.project/scripts/docs/serve.sh +20 -0
  124. package/templates/.project/scripts/quality/fix-all.sh +138 -0
  125. package/templates/.project/scripts/quality/lint-go.sh +34 -0
  126. package/templates/.project/scripts/quality/lint-python.sh +54 -0
  127. package/templates/.project/scripts/quality/run-all.sh +497 -0
  128. package/templates/.project/scripts/session/commit.sh +70 -0
  129. package/templates/.project/scripts/session/create-pr.sh +165 -0
  130. package/templates/.project/scripts/session/end.sh +207 -0
  131. package/templates/.project/scripts/session/start.sh +233 -0
  132. package/templates/.project/scripts/setup/doctor.sh +404 -0
  133. package/templates/.project/scripts/setup/interactive-setup.sh +581 -0
  134. package/templates/.project/scripts/sync/sync-template.sh +328 -0
  135. package/templates/.project/scripts/test/run-all.sh +179 -0
  136. package/templates/.project/scripts/test/run-quick.sh +25 -0
  137. package/templates/CLAUDE.md.template +228 -0
  138. package/templates/Makefile +514 -0
  139. package/templates/config/versions.yaml +57 -0
  140. package/templates/configs/go/.golangci.yml.template +172 -0
  141. package/templates/configs/go/go.mod.template +15 -0
  142. package/templates/configs/node/package.json.template +67 -0
  143. package/templates/configs/node/tsconfig.json.template +53 -0
  144. package/templates/configs/python/pyproject.toml.template +92 -0
  145. package/templates/configs/python/pytest.ini.template +64 -0
  146. package/templates/configs/python/ruff.toml.template +79 -0
  147. package/templates/configs/rust/Cargo.toml.template +51 -0
  148. package/templates/configs/shared/.editorconfig +67 -0
  149. package/templates/scripts/validate-templates.sh +449 -0
@@ -0,0 +1,42 @@
1
+ ---
2
+ description: Run quality checks (linting, formatting, type checking)
3
+ ---
4
+
5
+ Two-step quality check:
6
+
7
+ ## Step 1: Run Linters
8
+
9
+ Run these checks in order. Stop and report if any step fails.
10
+
11
+ {{#IF_NODE}}
12
+ ### Node / TypeScript
13
+ 1. `npx eslint .` — Lint
14
+ 2. `npx tsc --noEmit` — Type check
15
+ {{/IF_NODE}}
16
+ {{#IF_PYTHON}}
17
+ ### Python
18
+ 1. `ruff check .` — Lint
19
+ 2. `ruff format --check .` — Format check
20
+ 3. `mypy .` — Type check
21
+ {{/IF_PYTHON}}
22
+ {{#IF_GO}}
23
+ ### Go
24
+ 1. `golangci-lint run ./...` — Lint
25
+ 2. `go vet ./...` — Vet
26
+ {{/IF_GO}}
27
+ {{#IF_CSHARP}}
28
+ ### C#
29
+ 1. `dotnet format --verify-no-changes` — Format check
30
+ 2. `dotnet build --no-restore -warnaserror` — Build with warnings as errors
31
+ {{/IF_CSHARP}}
32
+ {{#IF_RUST}}
33
+ ### Rust
34
+ 1. `cargo fmt --check` — Format check
35
+ 2. `cargo clippy -- -D warnings` — Lint
36
+ {{/IF_RUST}}
37
+
38
+ ## Step 2: AI Review
39
+
40
+ After linters pass, delegate to the **quality-reviewer** agent to review changed files for logic issues, security problems, and best practice violations that linters miss.
41
+
42
+ Report combined results from both steps.
@@ -0,0 +1,40 @@
1
+ ---
2
+ description: End session and create checkpoint with skill evolution
3
+ ---
4
+
5
+ Ending the current development session.
6
+
7
+ ## Session Info
8
+
9
+ Determine the developer name from `git config user.name` and today's date. Create the session directory at `.ai/sessions/<developer>/<date>/` if it doesn't exist. Find the next session number by checking existing `session-*.md` files. Also check recent git commits and uncommitted changes.
10
+
11
+ ## Create Checkpoint
12
+
13
+ Create a comprehensive checkpoint at `.ai/sessions/<developer>/<date>/session-<N>.md`. Include:
14
+
15
+ ### Required Sections
16
+ - **Session Goal** — What we set out to do
17
+ - **Accomplished** — Specific items completed (not vague — include file paths, counts)
18
+ - **Files Created/Modified** — Every file with description
19
+ - **Key Decisions** — What we decided, why, alternatives considered
20
+ - **Implementation Details** — How things work, patterns used
21
+ - **Testing Status** — Tests added, coverage, passing status
22
+ - **Next Session** — Clear, actionable steps for next session
23
+ - **Context for AI** — Detailed context for the next session's agent
24
+ - **Blockers / Considerations** — Issues, tech debt, dependencies
25
+
26
+ ## Skill Evolution
27
+
28
+ After creating the checkpoint, review this session for learnings:
29
+
30
+ 1. **Gotchas** — Append to `.claude/skills/learned/references/gotchas.md`
31
+ Format: `## YYYY-MM-DD - Category / Title` + description + resolution
32
+
33
+ 2. **Conventions** — Append to `.claude/skills/learned/references/conventions.md`
34
+ Format: `## Category - Convention Name` + description + rationale
35
+
36
+ 3. **Deny recommendations** — If a dangerous command was nearly executed, append to `.claude/skills/learned/references/deny-recommendations.md`
37
+
38
+ 4. **New skills** — If a distinct new domain emerged, create `.claude/skills/<name>/SKILL.md`
39
+
40
+ **NEVER include secret values, tokens, or credentials in checkpoints or skill files.**
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Start an AI-assisted development session
3
+ ---
4
+
5
+ Starting a new development session.
6
+
7
+ ## Session Info
8
+
9
+ Determine the developer name from `git config user.name` and today's date. Check `.ai/sessions/` for previous checkpoints from this developer.
10
+
11
+ ## Before Planning
12
+
13
+ Check Claude Code skills for relevant context:
14
+ - Read `.claude/skills/codebase/SKILL.md` if it exists (run `/explore-codebase` if missing)
15
+ - Read `.claude/skills/learned/references/gotchas.md` for known project gotchas
16
+ - Read `.claude/skills/learned/references/conventions.md` for team conventions
17
+
18
+ ## Plan This Session
19
+
20
+ Before coding, let's plan:
21
+
22
+ 1. What files will we need to create/modify?
23
+ 2. What are the key components/functions?
24
+ 3. What dependencies or external services do we need?
25
+ 4. What tests should we write?
26
+ 5. Can we complete this in one session?
27
+ 6. Does this align with our architecture?
28
+ 7. Are there relevant gotchas or conventions in `.claude/skills/` to be aware of?
29
+
30
+ Once we have a solid plan, I'll proceed step by step — explaining WHAT, WHY, and HOW before each change.
@@ -0,0 +1,60 @@
1
+ ---
2
+ description: Install git pre-commit and pre-push hooks for quality checks
3
+ ---
4
+
5
+ Set up git hooks for this project based on the detected tech stack.
6
+
7
+ ## Detect Stack
8
+
9
+ Check which languages/tools are present by looking for:
10
+ - `package.json` → Node/TypeScript (eslint, prettier, tsc)
11
+ - `pyproject.toml` or `requirements.txt` → Python (ruff, mypy)
12
+ - `go.mod` → Go (golangci-lint, gofmt)
13
+ - `*.csproj` or `*.sln` → C# (dotnet format)
14
+ - `Cargo.toml` → Rust (cargo clippy, cargo fmt)
15
+
16
+ ## Generate Hooks
17
+
18
+ Create `.git/hooks/pre-commit` with the appropriate checks:
19
+
20
+ **Structure:**
21
+ ```bash
22
+ #!/bin/bash
23
+ set -e
24
+ echo "Running pre-commit checks..."
25
+
26
+ # Only check staged files
27
+ STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
28
+
29
+ # [language-specific checks based on detected stack]
30
+
31
+ echo "All checks passed!"
32
+ ```
33
+
34
+ **Per language (only include detected ones):**
35
+
36
+ - **Node/TS**: `npx eslint --no-warn-ignored $JS_FILES` and `npx prettier --check $JS_FILES`
37
+ - **Python**: `ruff check $PY_FILES` and `ruff format --check $PY_FILES`
38
+ - **Go**: `gofmt -l $GO_FILES` (fail if any output) and `golangci-lint run`
39
+ - **C#**: `dotnet format --verify-no-changes`
40
+ - **Rust**: `cargo fmt --check` and `cargo clippy -- -D warnings`
41
+
42
+ Also create `.git/hooks/pre-push` with test runners:
43
+ - **Node**: `npm test`
44
+ - **Python**: `pytest`
45
+ - **Go**: `go test ./...`
46
+ - **C#**: `dotnet test`
47
+ - **Rust**: `cargo test`
48
+
49
+ Make both hooks executable with `chmod +x`.
50
+
51
+ ## If pre-commit framework exists
52
+
53
+ If `.pre-commit-config.yaml` already exists or `pre-commit` is installed, suggest using that instead:
54
+ ```bash
55
+ pre-commit install
56
+ ```
57
+
58
+ ## After Setup
59
+
60
+ Confirm what hooks were installed and what they check. Mention that hooks can be bypassed with `git commit --no-verify` (but discourage it).
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: Run tests with coverage reporting
3
+ ---
4
+
5
+ Run tests with coverage. Enforce minimum coverage threshold.
6
+
7
+ {{#IF_NODE}}
8
+ ## Node / TypeScript
9
+ Run: `npx jest --coverage` or `npm test -- --coverage`
10
+
11
+ If jest is not configured, try: `npm test`
12
+
13
+ **Coverage threshold: {{COVERAGE_THRESHOLD}}%** — fail if below this.
14
+ Check `jest.config.*` or `package.json` for existing threshold config.
15
+ {{/IF_NODE}}
16
+ {{#IF_PYTHON}}
17
+ ## Python
18
+ Run: `pytest --cov --cov-report=term-missing --cov-fail-under={{COVERAGE_THRESHOLD}}`
19
+
20
+ If pytest-cov is not installed: `pytest`
21
+ {{/IF_PYTHON}}
22
+ {{#IF_GO}}
23
+ ## Go
24
+ Run: `go test -coverprofile=coverage.out -covermode=atomic ./...`
25
+ Then: `go tool cover -func=coverage.out`
26
+
27
+ Check that total coverage is at least **{{COVERAGE_THRESHOLD}}%**.
28
+ {{/IF_GO}}
29
+ {{#IF_CSHARP}}
30
+ ## C#
31
+ Run: `dotnet test --collect:"XPlat Code Coverage"`
32
+
33
+ If coverlet is available, check that coverage meets **{{COVERAGE_THRESHOLD}}%**.
34
+ {{/IF_CSHARP}}
35
+ {{#IF_RUST}}
36
+ ## Rust
37
+ Run: `cargo test`
38
+
39
+ If cargo-tarpaulin is installed: `cargo tarpaulin --fail-under {{COVERAGE_THRESHOLD}}`
40
+ {{/IF_RUST}}
41
+
42
+ ## Report
43
+
44
+ Summarize:
45
+ - Total tests: passed / failed / skipped
46
+ - Coverage: X% (threshold: {{COVERAGE_THRESHOLD}}%)
47
+ - Uncovered critical files (if any)
48
+
49
+ If coverage is below threshold, list the files with lowest coverage that should be prioritized.
@@ -0,0 +1,18 @@
1
+ ---
2
+ paths:
3
+ - "**/*.cs"
4
+ - "services/csharp/**/*"
5
+ ---
6
+
7
+ # C# Rules
8
+
9
+ - Enable nullable reference types (`#nullable enable`) in all files
10
+ - Use async/await for all I/O — never block with `.Result` or `.Wait()`
11
+ - Prefer pattern matching and switch expressions over if-else chains
12
+ - Use record types for immutable data transfer objects
13
+ - Use dependency injection via IServiceCollection — no service locators or manual `new` for services
14
+ - Prefer xUnit for testing with `[Fact]` and `[Theory]` attributes
15
+ - Use `dotnet format` for formatting — check with `dotnet format --verify-no-changes`
16
+ - Write XML doc comments (`///`) on all public APIs
17
+ - Use `using` declarations for IDisposable resources
18
+ - Prefer `string.IsNullOrEmpty()` over null checks + length checks
@@ -0,0 +1,16 @@
1
+ ---
2
+ paths:
3
+ - "**/*.go"
4
+ - "services/go/**/*"
5
+ ---
6
+
7
+ # Go Rules
8
+
9
+ - Always handle errors — never assign to `_`
10
+ - Propagate `context.Context` through call chains
11
+ - Use `defer` for resource cleanup (Close, Unlock, etc.)
12
+ - Table-driven tests with `t.Run()` subtests
13
+ - Use `httptest` for HTTP handler testing
14
+ - Errors should wrap with `fmt.Errorf("context: %w", err)`
15
+ - Prefer standard library over third-party when reasonable
16
+ - Use `golangci-lint` (not `go vet` alone) for comprehensive linting
@@ -0,0 +1,17 @@
1
+ ---
2
+ paths:
3
+ - "frontend/**/*.ts"
4
+ - "frontend/**/*.tsx"
5
+ - "frontend/**/*.js"
6
+ - "frontend/**/*.jsx"
7
+ ---
8
+
9
+ # Next.js Rules
10
+
11
+ - Use App Router (`app/` directory), not Pages Router
12
+ - Prefer Server Components by default; add `"use client"` only when needed
13
+ - Never expose secrets or sensitive data in client components
14
+ - Use TypeScript strict mode — no `any` types
15
+ - Validate API inputs with zod at route handlers
16
+ - Use Tailwind CSS for styling (configured in project)
17
+ - Run `npm run build` in `frontend/` to catch type errors before committing
@@ -0,0 +1,19 @@
1
+ ---
2
+ paths:
3
+ - "src/**/*.py"
4
+ - "services/python/**/*.py"
5
+ - "tests/**/*.py"
6
+ - "**/*.py"
7
+ ---
8
+
9
+ # Python Rules
10
+
11
+ - Use ruff for linting and formatting (not black, not flake8)
12
+ - Type hints required on all public functions
13
+ - Use Pydantic models for data validation at system boundaries
14
+ - Use `from __future__ import annotations` for forward references
15
+ - Prefer `pathlib.Path` over `os.path`
16
+ - No bare `except:` — catch specific exceptions
17
+ - Use app factory pattern for FastAPI/Flask applications
18
+ - Tests use pytest (not unittest) with fixtures for setup
19
+ - Imports: stdlib → third-party → local (ruff isort handles this)
@@ -0,0 +1,14 @@
1
+ ---
2
+ paths:
3
+ - "**/*.rs"
4
+ - "services/rust/**/*"
5
+ ---
6
+
7
+ # Rust Rules
8
+
9
+ - Use `clippy` lints — fix all warnings before committing
10
+ - Prefer `Result<T, E>` over panics for error handling
11
+ - Use `thiserror` for library errors, `anyhow` for application errors
12
+ - Write doc comments (`///`) on all public items
13
+ - Use `cargo fmt` formatting (rustfmt.toml if configured)
14
+ - Prefer `&str` over `String` in function signatures when possible
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: build
3
+ description: Build code, compile binaries, install dependencies, clean artifacts. Use when asked to build, compile, install, or clean the project.
4
+ ---
5
+
6
+ # Build
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
+ {{#IF_PYTHON}}
15
+ ## Python Build
16
+
17
+ Python services use editable installs:
18
+ ```bash
19
+ pip install -e services/python/<service-name>/
20
+ ```
21
+
22
+ Build checks:
23
+ - Syntax: `python3 -m py_compile <file>`
24
+ - Types: `mypy src/`
25
+ - Package: `python3 -m build` (if pyproject.toml has build-system)
26
+ {{/IF_PYTHON}}
27
+
28
+ {{#IF_GO}}
29
+ ## Go Build
30
+
31
+ Go services compile to `bin/`:
32
+ ```bash
33
+ go build -o bin/<service-name> ./services/go/<service-name>/
34
+ ```
35
+
36
+ Build flags:
37
+ - `CGO_ENABLED=0` for static binaries (container-friendly)
38
+ - `-ldflags="-s -w"` to strip debug info (smaller binary)
39
+ - `GOOS=linux GOARCH=amd64` for cross-compilation
40
+ {{/IF_GO}}
41
+
42
+ {{#IF_NODE}}
43
+ ## Node.js Build
44
+
45
+ ```bash
46
+ npm install # install dependencies
47
+ npm run build # compile TypeScript / bundle
48
+ ```
49
+ {{/IF_NODE}}
50
+
51
+ {{#IF_NEXTJS}}
52
+ ## Next.js Build
53
+
54
+ ```bash
55
+ cd frontend
56
+ npm install
57
+ npm run build # production build (checks for errors)
58
+ npm run dev # development server
59
+ ```
60
+
61
+ The build step catches TypeScript errors and missing imports — run it before deploying.
62
+ {{/IF_NEXTJS}}
63
+
64
+ {{#IF_RUST}}
65
+ ## Rust Build
66
+
67
+ ```bash
68
+ cargo build # debug build
69
+ cargo build --release # optimized build
70
+ ```
71
+ {{/IF_RUST}}
72
+
73
+ {{#IF_CSHARP}}
74
+ ## C# Build
75
+
76
+ ```bash
77
+ dotnet restore # restore NuGet packages
78
+ dotnet build # debug build
79
+ dotnet build --configuration Release # release build
80
+ dotnet publish -c Release -o out/ # publish for deployment
81
+ ```
82
+ {{/IF_CSHARP}}
83
+
84
+ {{#IF_DOCKER}}
85
+ ## Docker Build
86
+
87
+ ```bash
88
+ docker-compose build # build all services
89
+ docker-compose build <service> # build specific service
90
+ docker-compose up --build # rebuild and start
91
+ ```
92
+ {{/IF_DOCKER}}
93
+
94
+ ## Security
95
+
96
+ - **Never include secrets in build args or Dockerfiles**
97
+ - Use multi-stage builds to avoid leaking build-time dependencies
98
+ - Don't copy `.env` files into Docker images
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: deploy
3
+ description: Deploy services, release to production, push to cloud. Use when asked about deployment, releases, shipping to production, or CI/CD.
4
+ ---
5
+
6
+ # Deployment
7
+
8
+ ## Commands
9
+ - `make deploy` - Deploy services (configure deployment target first)
10
+ - `make build` - Build before deploying
11
+ - `make check` - Run full validation before deploying
12
+
13
+ ## Pre-Deployment Checklist
14
+ - [ ] `make check` passes (quality + tests + validation)
15
+ - [ ] All changes committed and pushed
16
+ - [ ] PR reviewed and approved
17
+ {{#IF_INFISICAL}}
18
+ - [ ] Secrets pulled: `make secrets-pull`
19
+ {{/IF_INFISICAL}}
20
+ - [ ] No hardcoded secrets in code or config
21
+
22
+ ## Deployment Safety
23
+
24
+ **CRITICAL: Never auto-approve destructive deployment operations.**
25
+
26
+ - Always preview/dry-run before applying changes
27
+ - Require explicit user confirmation for production deployments
28
+ - Never force-push or skip CI checks before deploying
29
+ {{#IF_INFISICAL}}
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}}
41
+
42
+ {{#IF_GCLOUD}}
43
+ ## Google Cloud Deployment
44
+
45
+ ### Cloud Run
46
+ ```bash
47
+ # Build and push container
48
+ gcloud builds submit --tag gcr.io/$PROJECT_ID/<service-name>
49
+
50
+ # Deploy (ALWAYS review before confirming)
51
+ gcloud run deploy <service-name> \
52
+ --image gcr.io/$PROJECT_ID/<service-name> \
53
+ --region <region> \
54
+ --platform managed
55
+ ```
56
+
57
+ ### GKE
58
+ ```bash
59
+ # Build image
60
+ docker build -t gcr.io/$PROJECT_ID/<service-name> .
61
+ docker push gcr.io/$PROJECT_ID/<service-name>
62
+
63
+ # Apply manifests (review first)
64
+ kubectl apply -f k8s/ --dry-run=client # preview
65
+ kubectl apply -f k8s/ # apply
66
+ ```
67
+
68
+ **Security:** Use Workload Identity for GCP auth in production — never embed service account keys.
69
+ {{/IF_GCLOUD}}
70
+
71
+ {{#IF_PULUMI}}
72
+ ## Pulumi Deployment
73
+
74
+ ```bash
75
+ # ALWAYS preview first
76
+ pulumi preview
77
+
78
+ # Review the diff carefully, then apply
79
+ pulumi up
80
+
81
+ # Check outputs
82
+ pulumi stack output
83
+ ```
84
+
85
+ **Security:** Use `pulumi config set --secret` for sensitive config — never plain-text.
86
+
87
+ **Never run `pulumi destroy` without explicit confirmation** — it deletes all resources.
88
+ {{/IF_PULUMI}}
89
+
90
+ {{#IF_DOCKER}}
91
+ ## Docker Deployment
92
+
93
+ ```bash
94
+ # Build images
95
+ docker-compose build
96
+
97
+ # Push to registry
98
+ docker-compose push
99
+
100
+ # Deploy (depends on orchestration platform)
101
+ docker-compose -f docker-compose.prod.yml up -d
102
+ ```
103
+
104
+ **Security:** Never copy `.env` files into Docker images. Use runtime environment variables.
105
+ {{/IF_DOCKER}}
106
+
107
+ {{#IF_CSHARP}}
108
+ ## C# Deployment
109
+
110
+ ```bash
111
+ # Framework-dependent (requires .NET runtime on target)
112
+ dotnet publish -c Release -o out/ --self-contained false
113
+
114
+ # Self-contained (no runtime needed on target)
115
+ dotnet publish -c Release -r linux-x64 --self-contained true
116
+ ```
117
+
118
+ For Docker, use multi-stage builds:
119
+ - Build stage: `mcr.microsoft.com/dotnet/sdk:{{CSHARP_VERSION}}`
120
+ - Runtime stage: `mcr.microsoft.com/dotnet/aspnet:{{CSHARP_VERSION}}`
121
+ {{/IF_CSHARP}}
122
+
123
+ ## CI/CD
124
+
125
+ CI pipeline (`.github/workflows/ci.yml`) runs automatically on PR:
126
+ - Validation, quality checks, tests per enabled language
127
+ - Coverage enforcement at {{COVERAGE_THRESHOLD}}%
128
+
129
+ ## Gotchas
130
+
131
+ See [references/gotchas.md](references/gotchas.md) for known deployment issues.
@@ -0,0 +1,5 @@
1
+ # Deployment Gotchas
2
+
3
+ <!-- This file grows over time. Each entry is added during session-end. -->
4
+ <!-- Format: date, category, description, resolution -->
5
+ <!-- NEVER include secret values, tokens, or credentials here -->
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: doctor
3
+ description: Diagnose and fix development environment issues. Use when setup fails, tools are missing, the environment is broken, or something is misconfigured.
4
+ ---
5
+
6
+ # Doctor & Setup
7
+
8
+ ## Commands
9
+ - `make doctor` - Diagnose common setup issues (checks files, toolchains, config)
10
+ - `make setup` - Interactive setup for new developers
11
+ - `make info` - Show project configuration dashboard
12
+ - `make config` - Interactive configuration editor
13
+
14
+ ## What Doctor Checks
15
+ 1. Core files (`.project.yaml`, `Makefile`, `.project/`)
16
+ 2. YAML syntax validation
17
+ 3. Language toolchain versions (Python, Go, Node, Rust)
18
+ 4. Quality tools installation (linters, formatters)
19
+ 5. Pre-commit hook configuration
20
+ 6. Git configuration
21
+ 7. Docker/Docker Compose availability
22
+ 8. Service health (if infrastructure enabled)
23
+
24
+ ## Common Issues & Fixes
25
+
26
+ ### Missing tools
27
+ ```bash
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
+ ```
50
+
51
+ ## Environment
52
+ - DevContainer-based (see `.devcontainer/`)
53
+ - `post-create.sh` runs automatically on container creation
54
+ - All tools installed via devcontainer features or post-create script
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: gcloud
3
+ description: Google Cloud Platform operations — gcloud CLI, Cloud Run, GKE, BigQuery, IAM, GCS. Use when asked about GCP, Google Cloud, gcloud commands, or cloud infrastructure.
4
+ ---
5
+
6
+ # Google Cloud (gcloud)
7
+
8
+ ## Setup
9
+ - **Auth:** `gcloud auth login` (configured during `make setup`)
10
+ - **Project:** Set in `.env` as `GOOGLE_CLOUD_PROJECT`
11
+ - **SDK:** Installed via devcontainer post-create script
12
+
13
+ ## Common Commands
14
+
15
+ ### Authentication & Project
16
+ ```bash
17
+ gcloud auth list # check auth status
18
+ gcloud config get-value project # current project
19
+ gcloud config set project <PROJECT_ID> # switch project
20
+ gcloud projects list # list accessible projects
21
+ ```
22
+
23
+ ### Services & Resources
24
+ ```bash
25
+ gcloud services list --enabled # enabled APIs
26
+ gcloud run services list # Cloud Run services
27
+ gcloud container clusters list # GKE clusters
28
+ gcloud sql instances list # Cloud SQL instances
29
+ gcloud storage ls # GCS buckets
30
+ ```
31
+
32
+ ### Logs & Monitoring
33
+ ```bash
34
+ gcloud logging read "resource.type=cloud_run_revision" --limit=50
35
+ gcloud logging read "severity>=ERROR" --limit=20 --format=json
36
+ ```
37
+
38
+ ## Integration with Secrets
39
+
40
+ GCP project ID is stored in `.env`:
41
+ ```
42
+ GOOGLE_CLOUD_PROJECT=my-project-id
43
+ ```
44
+
45
+ Use `make secrets-pull` to fetch GCP-related secrets from Infisical.
46
+
47
+ ## Security — CRITICAL
48
+
49
+ 1. **NEVER output `gcloud auth print-access-token`** — it exposes bearer tokens
50
+ 2. **NEVER output or log service account JSON keys**
51
+ 3. **NEVER embed credentials in code** — use Workload Identity or Application Default Credentials
52
+ 4. Use `gcloud auth application-default login` for local development
53
+ 5. In production, use Workload Identity Federation (not service account keys)
54
+
55
+ ## Deployment
56
+
57
+ See the `deploy` skill for GCP deployment patterns (Cloud Run, GKE).
58
+
59
+ ## Gotchas
60
+
61
+ See [references/gotchas.md](references/gotchas.md) for GCP-specific issues.
@@ -0,0 +1,5 @@
1
+ # Google Cloud Gotchas
2
+
3
+ <!-- This file grows over time. Each entry is added during session-end. -->
4
+ <!-- Format: date, category, description, resolution -->
5
+ <!-- NEVER include secret values, tokens, credentials, or project IDs here -->