@dailephd/my-dev-kit 1.0.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 +16 -0
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/cli.js +2611 -0
- package/docs/ARCHITECTURE.md +649 -0
- package/docs/CI_CD.md +248 -0
- package/docs/COMMANDS.md +684 -0
- package/docs/DEVELOPMENT.md +360 -0
- package/docs/GRAPH_SCHEMA.md +675 -0
- package/docs/QUICKSTART.md +243 -0
- package/docs/RELEASE.md +249 -0
- package/docs/ROADMAP.md +733 -0
- package/docs/SECURITY.md +92 -0
- package/docs/WORKFLOWS.md +316 -0
- package/examples/README.md +23 -0
- package/examples/basic-python/README.md +14 -0
- package/examples/basic-python/src/main.py +38 -0
- package/examples/basic-python/src/utils.py +24 -0
- package/examples/basic-ts/README.md +14 -0
- package/examples/basic-ts/src/index.ts +6 -0
- package/examples/basic-ts/src/userService.ts +9 -0
- package/examples/basic-ts/src/userTypes.ts +6 -0
- package/package.json +51 -0
package/docs/CI_CD.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# CI/CD
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
my-dev-kit uses GitHub Actions to validate that the repository can be installed, checked, tested, built, packaged, and run as a CLI on supported operating systems.
|
|
6
|
+
|
|
7
|
+
The CI workflow is for validation only. It does not publish npm packages, create GitHub releases, build Docker images, or deploy anything.
|
|
8
|
+
|
|
9
|
+
## Workflow file
|
|
10
|
+
|
|
11
|
+
The GitHub Actions workflow is defined at:
|
|
12
|
+
|
|
13
|
+
.github/workflows/ci.yml
|
|
14
|
+
|
|
15
|
+
The workflow runs on:
|
|
16
|
+
|
|
17
|
+
- pushes to `main`
|
|
18
|
+
- pull requests
|
|
19
|
+
|
|
20
|
+
The workflow uses Node.js 20 LTS.
|
|
21
|
+
|
|
22
|
+
## Platform support
|
|
23
|
+
|
|
24
|
+
CI runs on Linux, macOS, and Windows.
|
|
25
|
+
|
|
26
|
+
| Runner | Purpose |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `ubuntu-latest` | Linux validation |
|
|
29
|
+
| `macos-latest` | macOS validation |
|
|
30
|
+
| `windows-latest` | Windows validation |
|
|
31
|
+
|
|
32
|
+
The matrix uses `fail-fast: false`, so all platforms complete their checks even if one platform fails.
|
|
33
|
+
|
|
34
|
+
## Validation steps
|
|
35
|
+
|
|
36
|
+
CI validates the following:
|
|
37
|
+
|
|
38
|
+
- dependencies install from a clean checkout
|
|
39
|
+
- TypeScript type checking passes
|
|
40
|
+
- the test suite passes
|
|
41
|
+
- the CLI builds successfully
|
|
42
|
+
- the full verification script passes
|
|
43
|
+
- package contents are inspectable with `npm pack --dry-run`
|
|
44
|
+
- the built CLI responds to `--help`
|
|
45
|
+
- the built CLI responds to `--version`
|
|
46
|
+
- the TypeScript example can be indexed with call graph generation
|
|
47
|
+
- search returns results from the indexed TypeScript example
|
|
48
|
+
- graph view can generate DOT output from the indexed TypeScript example
|
|
49
|
+
- the Python example can be indexed when Python is available
|
|
50
|
+
|
|
51
|
+
## CI command sequence
|
|
52
|
+
|
|
53
|
+
The CI workflow runs the equivalent of the following commands from the repository root:
|
|
54
|
+
|
|
55
|
+
npm ci
|
|
56
|
+
npm run typecheck
|
|
57
|
+
npm run test
|
|
58
|
+
npm run build
|
|
59
|
+
npm run verify
|
|
60
|
+
npm pack --dry-run
|
|
61
|
+
node dist/cli.js --help
|
|
62
|
+
node dist/cli.js --version
|
|
63
|
+
node dist/cli.js index --root examples/basic-ts --src src --out .my-dev-kit-ci --call-graph --json
|
|
64
|
+
node dist/cli.js search --index examples/basic-ts/.my-dev-kit-ci --query user --limit 5 --json
|
|
65
|
+
node dist/cli.js view --index examples/basic-ts/.my-dev-kit-ci --format dot --out examples/basic-ts/.my-dev-kit-ci/graph.dot --edge-style semantic --json
|
|
66
|
+
node dist/cli.js index --root examples/basic-python --src src --language python --out .my-dev-kit-ci --json
|
|
67
|
+
|
|
68
|
+
The `index` command resolves `--out` relative to `--root`, so the TypeScript example writes to:
|
|
69
|
+
|
|
70
|
+
examples/basic-ts/.my-dev-kit-ci
|
|
71
|
+
|
|
72
|
+
The Python example writes to:
|
|
73
|
+
|
|
74
|
+
examples/basic-python/.my-dev-kit-ci
|
|
75
|
+
|
|
76
|
+
## Local validation
|
|
77
|
+
|
|
78
|
+
Run the main validation chain before release-related changes:
|
|
79
|
+
|
|
80
|
+
npm ci
|
|
81
|
+
npm run verify
|
|
82
|
+
npm pack --dry-run
|
|
83
|
+
|
|
84
|
+
For a more explicit local CI-style run:
|
|
85
|
+
|
|
86
|
+
npm ci
|
|
87
|
+
npm run typecheck
|
|
88
|
+
npm run test
|
|
89
|
+
npm run build
|
|
90
|
+
npm run verify
|
|
91
|
+
npm pack --dry-run
|
|
92
|
+
|
|
93
|
+
## Local CLI smoke test
|
|
94
|
+
|
|
95
|
+
After building, run the same CLI smoke checks locally:
|
|
96
|
+
|
|
97
|
+
node dist/cli.js --help
|
|
98
|
+
node dist/cli.js --version
|
|
99
|
+
node dist/cli.js index --root examples/basic-ts --src src --out .my-dev-kit-local-ci --call-graph --json
|
|
100
|
+
node dist/cli.js search --index examples/basic-ts/.my-dev-kit-local-ci --query user --limit 5 --json
|
|
101
|
+
node dist/cli.js view --index examples/basic-ts/.my-dev-kit-local-ci --format dot --out examples/basic-ts/.my-dev-kit-local-ci/graph.dot --edge-style semantic --json
|
|
102
|
+
node dist/cli.js index --root examples/basic-python --src src --language python --out .my-dev-kit-local-ci --json
|
|
103
|
+
|
|
104
|
+
The expected TypeScript output directory is:
|
|
105
|
+
|
|
106
|
+
examples/basic-ts/.my-dev-kit-local-ci
|
|
107
|
+
|
|
108
|
+
The expected Python output directory is:
|
|
109
|
+
|
|
110
|
+
examples/basic-python/.my-dev-kit-local-ci
|
|
111
|
+
|
|
112
|
+
Clean up local smoke-test artifacts with:
|
|
113
|
+
|
|
114
|
+
node -e "require('fs').rmSync('examples/basic-ts/.my-dev-kit-local-ci', { recursive: true, force: true })"
|
|
115
|
+
node -e "require('fs').rmSync('examples/basic-python/.my-dev-kit-local-ci', { recursive: true, force: true })"
|
|
116
|
+
|
|
117
|
+
## Smoke-test expectations
|
|
118
|
+
|
|
119
|
+
The TypeScript smoke test should produce:
|
|
120
|
+
|
|
121
|
+
- `manifest.json`
|
|
122
|
+
- `symbol-index.json`
|
|
123
|
+
- `code-graph.json`
|
|
124
|
+
- `call-graph.json`
|
|
125
|
+
|
|
126
|
+
The Python smoke test should produce:
|
|
127
|
+
|
|
128
|
+
- `manifest.json`
|
|
129
|
+
- `symbol-index.json`
|
|
130
|
+
- `code-graph.json`
|
|
131
|
+
|
|
132
|
+
The search smoke test should return ranked results for the query `user`.
|
|
133
|
+
|
|
134
|
+
The graph view smoke test should write a DOT file using semantic edge styling.
|
|
135
|
+
|
|
136
|
+
## Python support in CI
|
|
137
|
+
|
|
138
|
+
Python indexing requires Python 3.8 or later.
|
|
139
|
+
|
|
140
|
+
The Python adapter probes for both:
|
|
141
|
+
|
|
142
|
+
- `python`
|
|
143
|
+
- `python3`
|
|
144
|
+
|
|
145
|
+
Expected GitHub Actions behavior:
|
|
146
|
+
|
|
147
|
+
| Runner | Expected Python command |
|
|
148
|
+
| --- | --- |
|
|
149
|
+
| `ubuntu-latest` | `python3` |
|
|
150
|
+
| `macos-latest` | `python3` |
|
|
151
|
+
| `windows-latest` | `python` |
|
|
152
|
+
|
|
153
|
+
If no compatible Python interpreter is available, Python files are skipped with a warning. The index command should still complete instead of failing the entire run.
|
|
154
|
+
|
|
155
|
+
## Graphviz behavior in CI
|
|
156
|
+
|
|
157
|
+
DOT graph output does not require Graphviz.
|
|
158
|
+
|
|
159
|
+
CI uses:
|
|
160
|
+
|
|
161
|
+
--format dot
|
|
162
|
+
|
|
163
|
+
SVG and PNG rendering are not part of CI because they require the Graphviz `dot` executable to be installed on the runner.
|
|
164
|
+
|
|
165
|
+
Graphviz-based rendering can be tested manually with:
|
|
166
|
+
|
|
167
|
+
node dist/cli.js view --index examples/basic-ts/.my-dev-kit-local-ci --format svg --out examples/basic-ts/.my-dev-kit-local-ci/graph.svg
|
|
168
|
+
node dist/cli.js view --index examples/basic-ts/.my-dev-kit-local-ci --format png --out examples/basic-ts/.my-dev-kit-local-ci/graph.png
|
|
169
|
+
|
|
170
|
+
## Cross-platform notes
|
|
171
|
+
|
|
172
|
+
CI commands should stay compatible with Windows, Linux, and macOS.
|
|
173
|
+
|
|
174
|
+
Guidelines:
|
|
175
|
+
|
|
176
|
+
- use single-command `run:` entries in GitHub Actions
|
|
177
|
+
- avoid shell-specific line continuation syntax
|
|
178
|
+
- avoid Bash-only syntax in commands that must run on Windows
|
|
179
|
+
- prefer Node-based cleanup commands for cross-platform cleanup
|
|
180
|
+
- keep JSON output on stdout clean when `--json` is used
|
|
181
|
+
- write progress or diagnostics to stderr when JSON output is expected
|
|
182
|
+
|
|
183
|
+
## Generated artifacts
|
|
184
|
+
|
|
185
|
+
CI creates temporary index artifacts under the bundled example projects:
|
|
186
|
+
|
|
187
|
+
- `examples/basic-ts/.my-dev-kit-ci/`
|
|
188
|
+
- `examples/basic-python/.my-dev-kit-ci/`
|
|
189
|
+
|
|
190
|
+
Local smoke tests may create:
|
|
191
|
+
|
|
192
|
+
- `examples/basic-ts/.my-dev-kit-local-ci/`
|
|
193
|
+
- `examples/basic-python/.my-dev-kit-local-ci/`
|
|
194
|
+
|
|
195
|
+
These directories should be ignored by Git and should not be included in the npm package.
|
|
196
|
+
|
|
197
|
+
## Package inspection
|
|
198
|
+
|
|
199
|
+
CI runs:
|
|
200
|
+
|
|
201
|
+
npm pack --dry-run
|
|
202
|
+
|
|
203
|
+
This checks which files would be included in the npm package.
|
|
204
|
+
|
|
205
|
+
The package should include:
|
|
206
|
+
|
|
207
|
+
- `dist/`
|
|
208
|
+
- `README.md`
|
|
209
|
+
- `LICENSE`
|
|
210
|
+
- `CHANGELOG.md`
|
|
211
|
+
- public documentation files
|
|
212
|
+
- public examples intended for package users
|
|
213
|
+
- `package.json`
|
|
214
|
+
|
|
215
|
+
The package should not include:
|
|
216
|
+
|
|
217
|
+
- `src/`
|
|
218
|
+
- `tests/`
|
|
219
|
+
- generated index artifact directories
|
|
220
|
+
- local CI output folders
|
|
221
|
+
- `node_modules/`
|
|
222
|
+
- unpublished planning notes
|
|
223
|
+
- temporary migration folders
|
|
224
|
+
- private reference material
|
|
225
|
+
|
|
226
|
+
## Current CI exclusions
|
|
227
|
+
|
|
228
|
+
The CI workflow does not perform:
|
|
229
|
+
|
|
230
|
+
- npm publishing
|
|
231
|
+
- GitHub release creation
|
|
232
|
+
- version bumping
|
|
233
|
+
- changelog generation
|
|
234
|
+
- Docker build or publish
|
|
235
|
+
- deployment
|
|
236
|
+
- SVG rendering validation
|
|
237
|
+
- PNG rendering validation
|
|
238
|
+
- live external-service tests
|
|
239
|
+
|
|
240
|
+
## Release automation
|
|
241
|
+
|
|
242
|
+
Release automation is not implemented.
|
|
243
|
+
|
|
244
|
+
If release automation is added later, it should use a separate workflow file such as:
|
|
245
|
+
|
|
246
|
+
.github/workflows/release.yml
|
|
247
|
+
|
|
248
|
+
The CI validation workflow should remain focused on install, test, build, package inspection, and CLI smoke checks.
|