code-foundry 0.23.1 → 0.24.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/.github/CONTRIBUTING.md +3 -3
- package/.github/scripts/doctor.sh +2 -10
- package/.github/scripts/init-repo.sh +3 -1
- package/.github/scripts/sync-template.sh +36 -13
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +7 -0
- package/docs/INITIALIZATION.md +4 -3
- package/docs/WORKFLOWS.md +3 -4
- package/package.json +1 -1
- package/.github/code-foundry.yml.example +0 -41
package/.github/CONTRIBUTING.md
CHANGED
|
@@ -55,8 +55,8 @@ Use squash merges unless the repository documents another strategy. Re-align `st
|
|
|
55
55
|
### Toolchain
|
|
56
56
|
|
|
57
57
|
1. Install [mise](https://mise.jdx.dev/).
|
|
58
|
-
2. Run `
|
|
59
|
-
3. Use `
|
|
58
|
+
2. Run `npx code-foundry init` to install the pinned toolchain, enable hooks, and validate the checkout.
|
|
59
|
+
3. Use `npx code-foundry doctor` when setup, lockfiles, or hooks appear out of sync.
|
|
60
60
|
4. Use the repository's existing package manager and lockfile. Do not introduce a second package manager.
|
|
61
61
|
5. Copy `.env.example` to the appropriate local environment file when provided. Never commit the copy.
|
|
62
62
|
|
|
@@ -85,7 +85,7 @@ bash .github/scripts/ci.sh unit
|
|
|
85
85
|
bash .github/scripts/ci.sh integration
|
|
86
86
|
bash .github/scripts/ci.sh e2e
|
|
87
87
|
bash .github/scripts/ci.sh smoke
|
|
88
|
-
|
|
88
|
+
Security and dependency audits run through the GitHub Security workflow.
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Run the checks relevant to the change. For a release or security-sensitive change, run the complete set. Record the commands and results in the pull request.
|
|
@@ -66,11 +66,7 @@ if [ -f package.json ]; then
|
|
|
66
66
|
fi
|
|
67
67
|
if [ -f bunfig.toml ] && node -e 'const p=require("./package.json"); process.exit(p.scripts?.["test:coverage"] ? 0 : 1)' 2>/dev/null; then
|
|
68
68
|
if ! grep -q 'coverageThreshold' bunfig.toml; then
|
|
69
|
-
|
|
70
|
-
printf '%s\n' "INFO: shared CI enforces the Bun aggregate coverage threshold"
|
|
71
|
-
else
|
|
72
|
-
error "Bun coverage is enabled by test:coverage but no coverage policy is configured"
|
|
73
|
-
fi
|
|
69
|
+
printf '%s\n' "INFO: shared CI enforces the Bun aggregate coverage threshold"
|
|
74
70
|
fi
|
|
75
71
|
fi
|
|
76
72
|
fi
|
|
@@ -92,11 +88,7 @@ for workflow in ci codeql security test draft-pr release-pr release; do
|
|
|
92
88
|
fi
|
|
93
89
|
done
|
|
94
90
|
|
|
95
|
-
|
|
96
|
-
[ -x ".github/scripts/$script" ] || error "missing executable script: .github/scripts/$script"
|
|
97
|
-
done
|
|
98
|
-
|
|
99
|
-
printf '%s\n' 'Remote CI, Test, Security, and CodeQL runtimes are loaded by reusable workflow wrappers.'
|
|
91
|
+
printf '%s\n' 'Remote CI, Test, Security, CodeQL, and release runtimes are loaded by reusable workflow wrappers.'
|
|
100
92
|
|
|
101
93
|
if [ "$errors" -gt 0 ]; then
|
|
102
94
|
printf '%s\n' "Repository doctor found $errors error(s)." >&2
|
|
@@ -252,7 +252,9 @@ if [ "$bootstrap" = false ]; then
|
|
|
252
252
|
exit 0
|
|
253
253
|
fi
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
bootstrap_script="$script_dir/bootstrap.sh"
|
|
256
|
+
[ -x "$bootstrap_script" ] || { echo "Package is missing bootstrap.sh" >&2; exit 1; }
|
|
257
|
+
bash "$bootstrap_script"
|
|
256
258
|
|
|
257
259
|
if [ "$protection" = true ]; then
|
|
258
260
|
remote="$(git remote get-url origin 2>/dev/null || true)"
|
|
@@ -313,7 +313,6 @@ files=(
|
|
|
313
313
|
ruff.toml
|
|
314
314
|
.prettierrc
|
|
315
315
|
.github/CODEOWNERS
|
|
316
|
-
.github/code-foundry.yml.example
|
|
317
316
|
.github/CODE_OF_CONDUCT.md
|
|
318
317
|
.github/CONTRIBUTING.md
|
|
319
318
|
.github/PULL_REQUEST_TEMPLATE.md
|
|
@@ -322,18 +321,13 @@ files=(
|
|
|
322
321
|
.github/ISSUE_TEMPLATE/bug_report.yml
|
|
323
322
|
.github/ISSUE_TEMPLATE/config.yml
|
|
324
323
|
.github/ISSUE_TEMPLATE/feature_request.yml
|
|
324
|
+
# Keep only the small local hook runner and its language-aware formatter.
|
|
325
|
+
# Full CI, security, CodeQL, and release implementations are loaded from
|
|
326
|
+
# the reusable runtime and are not copied into consumer repositories.
|
|
325
327
|
.github/scripts/profile.sh
|
|
326
|
-
.github/scripts/bootstrap.sh
|
|
327
|
-
# Keep the small local hook runner and its changed-file helper; the full
|
|
328
|
-
# CI/security implementations used by Actions are loaded from the runtime.
|
|
329
328
|
.github/scripts/changed-files.sh
|
|
330
329
|
.github/scripts/ci.sh
|
|
331
|
-
.github/scripts/doctor.sh
|
|
332
330
|
.github/scripts/pre-commit.sh
|
|
333
|
-
.github/scripts/sync-template.sh
|
|
334
|
-
.github/scripts/init-repo.sh
|
|
335
|
-
.github/scripts/sync-codeowners.sh
|
|
336
|
-
.github/scripts/sync-protection.sh
|
|
337
331
|
.github/workflows/ci.yml
|
|
338
332
|
.github/workflows/codeql.yml
|
|
339
333
|
.github/workflows/draft-pr.yml
|
|
@@ -358,6 +352,36 @@ for file in "${files[@]}"; do
|
|
|
358
352
|
esac
|
|
359
353
|
done
|
|
360
354
|
files=("${filtered_files[@]}")
|
|
355
|
+
changed=0
|
|
356
|
+
|
|
357
|
+
# These files belonged to older Code Foundry layouts. They are intentionally
|
|
358
|
+
# removed now that the npm CLI owns initialization and synchronization.
|
|
359
|
+
removed_files=(
|
|
360
|
+
.github/code-foundry.yml.example
|
|
361
|
+
.github/template.yml
|
|
362
|
+
.github/template.yml.example
|
|
363
|
+
.github/scripts/bootstrap.sh
|
|
364
|
+
.github/scripts/codeql-languages.sh
|
|
365
|
+
.github/scripts/doctor.sh
|
|
366
|
+
.github/scripts/init-repo.sh
|
|
367
|
+
.github/scripts/security.sh
|
|
368
|
+
.github/scripts/sync-codeowners.sh
|
|
369
|
+
.github/scripts/sync-protection.sh
|
|
370
|
+
.github/scripts/sync-template.sh
|
|
371
|
+
.github/scripts/sitecustomize.py
|
|
372
|
+
.github/scripts/turbo-cache-probe.sh
|
|
373
|
+
)
|
|
374
|
+
for file in "${removed_files[@]}"; do
|
|
375
|
+
if [ -e "$file" ]; then
|
|
376
|
+
changed=$((changed + 1))
|
|
377
|
+
if [ "$mode" = "check" ]; then
|
|
378
|
+
printf 'Would remove legacy managed file %s\n' "$file"
|
|
379
|
+
else
|
|
380
|
+
rm -f "$file"
|
|
381
|
+
printf 'Removed legacy managed file %s\n' "$file"
|
|
382
|
+
fi
|
|
383
|
+
fi
|
|
384
|
+
done
|
|
361
385
|
|
|
362
386
|
# Workflows outside the standard baseline are repository-owned extensions.
|
|
363
387
|
# The sync operation never deletes or replaces them; surface them explicitly
|
|
@@ -390,7 +414,6 @@ if [ "${#custom_workflows[@]}" -gt 0 ]; then
|
|
|
390
414
|
printf 'Preserving custom workflows: %s\n' "${custom_workflows[*]}"
|
|
391
415
|
fi
|
|
392
416
|
|
|
393
|
-
changed=0
|
|
394
417
|
for file in "${files[@]}"; do
|
|
395
418
|
template_file="$template_root/$file"
|
|
396
419
|
# npm renames .gitignore to .npmignore when installing a package. Treat the
|
|
@@ -629,11 +652,11 @@ initialize_mise_lock() {
|
|
|
629
652
|
|
|
630
653
|
initialize_mise_lock
|
|
631
654
|
|
|
632
|
-
if [ -x
|
|
655
|
+
if [ -x "$template_root/.github/scripts/sync-codeowners.sh" ]; then
|
|
633
656
|
if [ "$mode" = "check" ]; then
|
|
634
|
-
bash
|
|
657
|
+
bash "$template_root/.github/scripts/sync-codeowners.sh" --check
|
|
635
658
|
else
|
|
636
|
-
bash
|
|
659
|
+
bash "$template_root/.github/scripts/sync-codeowners.sh" --apply
|
|
637
660
|
fi
|
|
638
661
|
fi
|
|
639
662
|
|
package/AGENTS.md
CHANGED
|
@@ -62,7 +62,7 @@ Ask for clarification when a missing decision would materially change the implem
|
|
|
62
62
|
2. Inspect before editing; preserve unrelated work.
|
|
63
63
|
3. Plan the smallest coherent change.
|
|
64
64
|
4. Implement with existing project patterns.
|
|
65
|
-
5. Run
|
|
65
|
+
5. Run `npx code-foundry init` for a new checkout, or `npx code-foundry doctor` to diagnose setup drift.
|
|
66
66
|
6. Run focused checks while iterating.
|
|
67
67
|
7. Inspect the final diff for accidental changes, secrets, formatting, and generated files.
|
|
68
68
|
8. Run the broadest applicable validation available.
|
|
@@ -96,7 +96,7 @@ bash .github/scripts/ci.sh unit
|
|
|
96
96
|
bash .github/scripts/ci.sh integration
|
|
97
97
|
bash .github/scripts/ci.sh e2e
|
|
98
98
|
bash .github/scripts/ci.sh smoke
|
|
99
|
-
|
|
99
|
+
Security and dependency audits run through the GitHub Security workflow.
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
Run focused tests first, then the complete applicable set for release, security, workflow, dependency, and configuration changes.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.24.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.23.1...v0.24.0) (2026-07-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* minimize consumer footprint ([2b29d2e](https://github.com/0xPlayerOne/code-foundry/commit/2b29d2e09072492c8ee8fc642d0477f416805cf2))
|
|
9
|
+
|
|
3
10
|
## [0.23.1](https://github.com/0xPlayerOne/code-foundry/compare/v0.23.0...v0.23.1) (2026-07-28)
|
|
4
11
|
|
|
5
12
|
|
package/docs/INITIALIZATION.md
CHANGED
|
@@ -37,6 +37,7 @@ Sync updates standard Code Foundry files only. It preserves application code,
|
|
|
37
37
|
authored documentation, existing `.mise.toml` selections, and custom workflows
|
|
38
38
|
such as deployment, search, Slither, or monitoring workflows.
|
|
39
39
|
|
|
40
|
-
The environment bootstrap installs or reuses mise-managed tools
|
|
41
|
-
repository hooks
|
|
42
|
-
|
|
40
|
+
The environment bootstrap installs or reuses mise-managed tools and enables
|
|
41
|
+
the repository hooks. Use `npx code-foundry doctor` when local setup needs to
|
|
42
|
+
be checked; the CLI supplies the implementation without adding maintenance
|
|
43
|
+
scripts to the consumer repository.
|
package/docs/WORKFLOWS.md
CHANGED
|
@@ -54,12 +54,11 @@ analysis.
|
|
|
54
54
|
|
|
55
55
|
## Branch protection
|
|
56
56
|
|
|
57
|
-
Use the
|
|
58
|
-
enabled features:
|
|
57
|
+
Use the repository's GitHub settings or the maintainer's branch-protection
|
|
58
|
+
automation after reviewing the repository's enabled features:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
|
|
62
|
-
automation to apply required checks after initialization.
|
|
61
|
+
Apply only checks for enabled workflows.
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
Keep strict status checks, linear history, and conversation resolution enabled.
|
package/package.json
CHANGED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# `npx code-foundry init` creates this file automatically. Edit it and run
|
|
2
|
-
# `npx code-foundry sync` whenever you want to change the baseline.
|
|
3
|
-
# Omitted keys use automatic detection and the standard defaults. See
|
|
4
|
-
# docs/CONFIGURATION.md for the complete visual reference.
|
|
5
|
-
|
|
6
|
-
version: 1
|
|
7
|
-
|
|
8
|
-
# Repository shape and supported languages.
|
|
9
|
-
profile: auto # auto, application, monorepo, minimal
|
|
10
|
-
languages: auto # auto or typescript,rust,python,solidity
|
|
11
|
-
package_manager: auto # auto, bun, pnpm, yarn, npm
|
|
12
|
-
|
|
13
|
-
# Standard callers to install. Use `all` or a comma-separated selection.
|
|
14
|
-
features: all # ci, codeql, security, test, draft-pr, release-pr, release, dependabot
|
|
15
|
-
|
|
16
|
-
# Runtime source. Leave blank to infer it from the template source.
|
|
17
|
-
runtime_repository: # OWNER/REPO, or leave blank to infer
|
|
18
|
-
runtime_ref: # tag or branch, or leave blank for default
|
|
19
|
-
|
|
20
|
-
# Release and licensing behavior.
|
|
21
|
-
release_type: auto # auto, node, python, rust, simple, none
|
|
22
|
-
npm_publish: false
|
|
23
|
-
license: preserve # agpl-3.0-or-later, mit, preserve, none
|
|
24
|
-
# license_file: ./legal/LICENSE.txt
|
|
25
|
-
|
|
26
|
-
# Runner policy. Each workflow caller receives its selected runner.
|
|
27
|
-
runner: ubuntu-latest
|
|
28
|
-
unit_runner: ubuntu-slim
|
|
29
|
-
ci_runner: ubuntu-latest
|
|
30
|
-
test_runner: ubuntu-latest
|
|
31
|
-
security_runner: ubuntu-slim
|
|
32
|
-
codeql_runner: ubuntu-latest
|
|
33
|
-
pr_runner: ubuntu-slim
|
|
34
|
-
release_runner: ubuntu-slim
|
|
35
|
-
prune_standard: false # remove disabled standard workflows during sync
|
|
36
|
-
|
|
37
|
-
# Cache and quality policy.
|
|
38
|
-
cache_packages: auto # auto, true, false
|
|
39
|
-
cache_build: auto # auto, true, false
|
|
40
|
-
coverage_minimum: 80
|
|
41
|
-
turbo_remote: auto # auto, true, false
|