@thebassclef/lite 0.1.3 → 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/dist/cli.cjs +216 -137
- package/dist/cli.js +218 -139
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.bassclef-source.json +10 -0
- package/dist/lite/.claude/settings.json +212 -0
- package/dist/lite/CLAUDE.md +41 -0
- package/dist/lite/gitignore +58 -0
- package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
- package/dist/lite/whereami.md +24 -0
- package/package.json +8 -2
- package/substrate/.bassclef/lite-manifest.json +0 -2701
- package/substrate/.claude/agents/architect.md +0 -70
- package/substrate/.claude/agents/builder.md +0 -114
- package/substrate/.claude/agents/designer.md +0 -156
- package/substrate/.claude/agents/reviewer.md +0 -88
- package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
- package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
- package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
- package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
- package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
- package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
- package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
- package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
- package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
- package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
- package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
- package/substrate/.claude/hooks/session-end.sh +0 -433
- package/substrate/.claude/hooks/session-reflection.sh +0 -303
- package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
- package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
- package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
- package/substrate/.claude/hooks/state-validate.sh +0 -271
- package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
- package/substrate/.claude/hooks/temperance-gate.sh +0 -147
- package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
- package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
- package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
- package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
- package/substrate/.claude/luminaries/alan-cooper.md +0 -170
- package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
- package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
- package/substrate/.claude/luminaries/ash-maurya.md +0 -121
- package/substrate/.claude/luminaries/bill-buxton.md +0 -210
- package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
- package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
- package/substrate/.claude/luminaries/don-norman.md +0 -173
- package/substrate/.claude/luminaries/edward-tufte.md +0 -179
- package/substrate/.claude/luminaries/eric-evans.md +0 -160
- package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
- package/substrate/.claude/luminaries/gang-of-four.md +0 -157
- package/substrate/.claude/luminaries/glenford-myers.md +0 -230
- package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
- package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
- package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
- package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
- package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
- package/substrate/.claude/luminaries/karl-popper.md +0 -132
- package/substrate/.claude/luminaries/kent-beck.md +0 -168
- package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
- package/substrate/.claude/luminaries/martin-fowler.md +0 -164
- package/substrate/.claude/luminaries/michael-feathers.md +0 -125
- package/substrate/.claude/luminaries/michael-nygard.md +0 -118
- package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
- package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
- package/substrate/.claude/luminaries/sophia-prater.md +0 -193
- package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
- package/substrate/.claude/luminaries/tony-hoare.md +0 -170
- package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
- package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
- package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
- package/substrate/.claude/rules/adr-discipline.md +0 -120
- package/substrate/.claude/rules/api-conventions.md +0 -125
- package/substrate/.claude/rules/artifact-ingestion.md +0 -179
- package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
- package/substrate/.claude/rules/blocked-items.md +0 -146
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
- package/substrate/.claude/rules/branching.md +0 -28
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
- package/substrate/.claude/rules/commit-conventions.md +0 -22
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/context-engineering.md +0 -202
- package/substrate/.claude/rules/context-management.md +0 -85
- package/substrate/.claude/rules/defensive-bash.md +0 -68
- package/substrate/.claude/rules/deferred-actions.md +0 -233
- package/substrate/.claude/rules/destructive-operations.md +0 -69
- package/substrate/.claude/rules/diagnosis.md +0 -38
- package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
- package/substrate/.claude/rules/guardrails.md +0 -73
- package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
- package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
- package/substrate/.claude/rules/loop-discipline.md +0 -81
- package/substrate/.claude/rules/manual-prod-approval.md +0 -100
- package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
- package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
- package/substrate/.claude/rules/new-dependency-check.md +0 -51
- package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
- package/substrate/.claude/rules/operator-facing-prose.md +0 -196
- package/substrate/.claude/rules/option-label-discipline.md +0 -108
- package/substrate/.claude/rules/pattern-annotation.md +0 -100
- package/substrate/.claude/rules/plain-english-discipline.md +0 -156
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
- package/substrate/.claude/rules/pr-body-shape.md +0 -317
- package/substrate/.claude/rules/pr-strategy.md +0 -167
- package/substrate/.claude/rules/pr-title-shape.md +0 -161
- package/substrate/.claude/rules/prototype-workflow.md +0 -65
- package/substrate/.claude/rules/reserved-skill-names.md +0 -123
- package/substrate/.claude/rules/schema-management.md +0 -49
- package/substrate/.claude/rules/sdlc-gates.md +0 -149
- package/substrate/.claude/rules/security.md +0 -37
- package/substrate/.claude/rules/session-artifacts.md +0 -236
- package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
- package/substrate/.claude/rules/skill-description-clarity.md +0 -247
- package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
- package/substrate/.claude/rules/state-schema-validation.md +0 -162
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
- package/substrate/.claude/rules/substrate-config-schema.md +0 -98
- package/substrate/.claude/rules/test-list-discipline.md +0 -175
- package/substrate/.claude/rules/test-sufficiency.md +0 -210
- package/substrate/.claude/rules/testing-tier-config.md +0 -145
- package/substrate/.claude/rules/testing.md +0 -38
- package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
- package/substrate/.claude/rules/visual-hierarchy.md +0 -437
- package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
- package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
- package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
- package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
- package/substrate/.claude/skills/build/SKILL.md +0 -640
- package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
- package/substrate/.claude/skills/decompose/SKILL.md +0 -280
- package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
- package/substrate/.claude/skills/feynman/SKILL.md +0 -90
- package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
- package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
- package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
- package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
- package/substrate/.claude/skills/journal/SKILL.md +0 -209
- package/substrate/.claude/skills/kiss/SKILL.md +0 -449
- package/substrate/.claude/skills/launch/SKILL.md +0 -915
- package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
- package/substrate/.claude/skills/longrun/SKILL.md +0 -463
- package/substrate/.claude/skills/luminary/SKILL.md +0 -481
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
- package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
- package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
- package/substrate/.claude/skills/personas/SKILL.md +0 -207
- package/substrate/.claude/skills/promote/SKILL.md +0 -283
- package/substrate/.claude/skills/requirement/SKILL.md +0 -98
- package/substrate/.claude/skills/retro/SKILL.md +0 -117
- package/substrate/.claude/skills/riff/SKILL.md +0 -114
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
- package/substrate/.claude/skills/session-end/SKILL.md +0 -309
- package/substrate/.claude/skills/session-log/SKILL.md +0 -299
- package/substrate/.claude/skills/skills/SKILL.md +0 -228
- package/substrate/.claude/skills/spec/SKILL.md +0 -105
- package/substrate/.claude/skills/sprint/SKILL.md +0 -392
- package/substrate/.claude/skills/stage/SKILL.md +0 -384
- package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
- package/substrate/.claude/skills/temperance/SKILL.md +0 -108
- package/substrate/.claude/skills/use-case/SKILL.md +0 -417
- package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
- package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
- package/substrate/.claude/skills/verify/SKILL.md +0 -160
- package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
- package/substrate/.claude/skills/whereami/SKILL.md +0 -307
- package/substrate/AGENTS.md +0 -79
- package/substrate/CLAUDE-lite.md +0 -85
- package/substrate/CODE_OF_CONDUCT.md +0 -28
- package/substrate/CONTRIBUTING.md +0 -177
- package/substrate/README.md +0 -173
- package/substrate/SECURITY.md +0 -19
- package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
- package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
- package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
- package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
- package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
- package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
- package/substrate/lib/clean-artifacts-sweep.sh +0 -112
- package/substrate/lib/code-comment-discipline.sh +0 -144
- package/substrate/lib/composer-preflight.sh +0 -459
- package/substrate/lib/hook-inject.sh +0 -255
- package/substrate/lib/luminary-pick.sh +0 -96
- package/substrate/lib/output-discipline.sh +0 -143
- package/substrate/lib/prose-scan-boundary.sh +0 -171
- package/substrate/lib/rewrite-check.sh +0 -214
- package/substrate/lib/state.sh +0 -1372
- package/substrate/lib/telemetry.sh +0 -205
- package/substrate/lib/tier-check.sh +0 -187
- package/substrate/lib/tier-dependency-audit.sh +0 -1088
- package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
- package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
- package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
- package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
- package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
- package/substrate/scripts/aggregate-telemetry.sh +0 -217
- package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
- package/substrate/scripts/generate-lite-manifest.sh +0 -505
- package/substrate/scripts/generate-tier-manifest.sh +0 -28
- package/substrate/scripts/intent-drift-check.sh +0 -456
- package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
- package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
- package/substrate/standards/adr-template.md +0 -86
- package/substrate/standards/api-conventions/nextjs.md +0 -84
- package/substrate/standards/artifact-composition.md +0 -209
- package/substrate/standards/bash-hook-safety.md +0 -246
- package/substrate/standards/bassclef-configs-schema.md +0 -232
- package/substrate/standards/bassclef-evolution.md +0 -143
- package/substrate/standards/bassclef-internal-jargon.md +0 -244
- package/substrate/standards/bassclef-managed-sentinel.md +0 -96
- package/substrate/standards/bassclef-source-config.md +0 -228
- package/substrate/standards/branch-stacking.md +0 -408
- package/substrate/standards/code-safety-principles.md +0 -176
- package/substrate/standards/composer-prerequisites.md +0 -155
- package/substrate/standards/deferred-actions-schema.md +0 -204
- package/substrate/standards/dependency-discipline/cargo.md +0 -39
- package/substrate/standards/dependency-discipline/gem.md +0 -43
- package/substrate/standards/dependency-discipline/go-mod.md +0 -41
- package/substrate/standards/dependency-discipline/npm.md +0 -42
- package/substrate/standards/dependency-discipline/pip.md +0 -42
- package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
- package/substrate/standards/deployment-topology.md +0 -69
- package/substrate/standards/docs-sync-allowlist.md +0 -76
- package/substrate/standards/domain-and-dns.md +0 -145
- package/substrate/standards/frontend-stack.md +0 -67
- package/substrate/standards/frontmatter-schema.md +0 -154
- package/substrate/standards/graceful-exit.md +0 -227
- package/substrate/standards/hook-idempotency.md +0 -102
- package/substrate/standards/hook-injection-discipline.md +0 -202
- package/substrate/standards/hook-install-class.md +0 -215
- package/substrate/standards/input-handler-interface.md +0 -152
- package/substrate/standards/lite-manifest-schema-changes.md +0 -135
- package/substrate/standards/luminary-matching.md +0 -105
- package/substrate/standards/luminary-problem-patterns.md +0 -481
- package/substrate/standards/migration-discipline/active-record.md +0 -50
- package/substrate/standards/migration-discipline/alembic.md +0 -43
- package/substrate/standards/migration-discipline/gorm.md +0 -50
- package/substrate/standards/migration-discipline/prisma.md +0 -53
- package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
- package/substrate/standards/mobile-ephemeral-session.md +0 -167
- package/substrate/standards/model-routing-discipline.md +0 -160
- package/substrate/standards/ogilvy-writing-rules.md +0 -225
- package/substrate/standards/opener-discipline.md +0 -96
- package/substrate/standards/operator-facing-prose-discipline.md +0 -201
- package/substrate/standards/persona-schema.md +0 -229
- package/substrate/standards/pluggable-luminaries.md +0 -323
- package/substrate/standards/pr-body-discipline.md +0 -115
- package/substrate/standards/preview-state-schema.md +0 -189
- package/substrate/standards/project-directory-layout.md +0 -276
- package/substrate/standards/release-tagging.md +0 -137
- package/substrate/standards/reserved-skill-names.md +0 -120
- package/substrate/standards/scannable-multi-option-output.md +0 -261
- package/substrate/standards/sdlc-compliance.md +0 -286
- package/substrate/standards/sdlc-gates/typescript.md +0 -57
- package/substrate/standards/secrets-lifecycle.md +0 -210
- package/substrate/standards/security-scanner-adapter.md +0 -145
- package/substrate/standards/session-board.md +0 -256
- package/substrate/standards/skill-output-discipline.md +0 -90
- package/substrate/standards/state-spine-contract.md +0 -255
- package/substrate/standards/state-spine.md +0 -511
- package/substrate/standards/steering-hints/kiss-words.md +0 -11
- package/substrate/standards/substrate-config-schema.md +0 -267
- package/substrate/standards/tech-stack-config.md +0 -109
- package/substrate/standards/tier-dependency-analysis.md +0 -167
- package/substrate/standards/tier-runtime-deps/lite.md +0 -57
- package/substrate/standards/tier-tag-schema.md +0 -155
- package/substrate/standards/two-layer-config.md +0 -99
- package/substrate/standards/use-case-format.md +0 -292
- package/substrate/standards/user-story-invest.md +0 -268
- package/substrate/standards/velocity-and-appetite.md +0 -229
- package/substrate/standards/voice-input-pattern.md +0 -119
- package/substrate/standards/whereami-schema.md +0 -301
- package/substrate/standards/worktree-management.md +0 -211
- package/substrate/standards/writing-guide.md +0 -213
- package/substrate/templates/chronicle-template.md +0 -75
- package/substrate/templates/deferred-action-template.md +0 -45
- package/substrate/templates/memory-proposal-template.md +0 -77
- package/substrate/templates/persona-template.md +0 -200
- package/substrate/templates/pr-faq.md +0 -45
- package/substrate/templates/secret-rotation-template.md +0 -162
- package/substrate/templates/spec-template.md +0 -131
- package/substrate/templates/use-case-template.md +0 -194
- package/substrate/templates/user-story-template.md +0 -107
- package/substrate/templates/whereami-template.md +0 -101
package/dist/cli.cjs
CHANGED
|
@@ -27,7 +27,6 @@ const node_path = require("node:path");
|
|
|
27
27
|
const node_os = require("node:os");
|
|
28
28
|
const node_crypto = require("node:crypto");
|
|
29
29
|
const node_url = require("node:url");
|
|
30
|
-
const node_module = require("node:module");
|
|
31
30
|
const promises = require("node:readline/promises");
|
|
32
31
|
const node_process = require("node:process");
|
|
33
32
|
var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
|
|
@@ -243,22 +242,6 @@ function hashContent(content) {
|
|
|
243
242
|
normalized = normalized.replace(/\r\n/g, "\n");
|
|
244
243
|
return node_crypto.createHash("sha256").update(normalized, "utf8").digest("hex");
|
|
245
244
|
}
|
|
246
|
-
const SETTINGS_TEMPLATE_VERSION = "0.0.1";
|
|
247
|
-
function settingsJsonTemplate(pkgVersion) {
|
|
248
|
-
const value = {
|
|
249
|
-
$bassclef: {
|
|
250
|
-
template: "settings.json",
|
|
251
|
-
template_version: SETTINGS_TEMPLATE_VERSION,
|
|
252
|
-
generated_by: "@thebassclef/core",
|
|
253
|
-
generated_by_version: pkgVersion
|
|
254
|
-
},
|
|
255
|
-
permissions: {
|
|
256
|
-
additionalDirectories: []
|
|
257
|
-
},
|
|
258
|
-
hooks: {}
|
|
259
|
-
};
|
|
260
|
-
return JSON.stringify(value, null, 2) + "\n";
|
|
261
|
-
}
|
|
262
245
|
const SUBSTRATE_CONFIG_TEMPLATE_VERSION = "0.0.1";
|
|
263
246
|
function substrateConfigMdTemplate(pkgVersion) {
|
|
264
247
|
return [
|
|
@@ -409,129 +392,215 @@ async function computeConfigHashes(targetDir, paths) {
|
|
|
409
392
|
}
|
|
410
393
|
return out;
|
|
411
394
|
}
|
|
412
|
-
const
|
|
413
|
-
const
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
395
|
+
const EXPECTED_WIRING_SCHEMA_MAJOR = 2;
|
|
396
|
+
const WIRING_MANIFEST_RELATIVE = "standards/bassclef-wiring-manifest.json";
|
|
397
|
+
class CopyFailure extends Error {
|
|
398
|
+
constructor(kind, message) {
|
|
399
|
+
super(message);
|
|
400
|
+
this.kind = kind;
|
|
401
|
+
this.name = "CopyFailure";
|
|
402
|
+
}
|
|
403
|
+
}
|
|
419
404
|
function copySubstrate(targetDir, options = {}) {
|
|
420
405
|
const bundleRoot = resolveBundleRoot(options.bundleRoot);
|
|
421
|
-
const manifest =
|
|
406
|
+
const manifest = readWiringManifest(bundleRoot);
|
|
422
407
|
const result = {
|
|
423
408
|
copied: [],
|
|
424
409
|
refused: [],
|
|
425
410
|
errored: [],
|
|
426
|
-
erroredMessages: []
|
|
411
|
+
erroredMessages: [],
|
|
412
|
+
hookCount: 0,
|
|
413
|
+
wiringVersion: manifest.version
|
|
427
414
|
};
|
|
428
415
|
if (options.dryRun) result.wouldCopy = [];
|
|
429
|
-
const
|
|
430
|
-
|
|
416
|
+
const files = walkDistTree(bundleRoot);
|
|
417
|
+
const groups = groupByTopDirectory(files);
|
|
418
|
+
for (const [directory, groupFiles] of groups) {
|
|
431
419
|
let completedInGroup = 0;
|
|
432
|
-
for (const
|
|
433
|
-
const outcome = copyOne(
|
|
420
|
+
for (const relPath of groupFiles) {
|
|
421
|
+
const outcome = copyOne(relPath, bundleRoot, targetDir, options, result);
|
|
434
422
|
if (outcome !== "skipped") completedInGroup += 1;
|
|
435
423
|
}
|
|
436
424
|
if (options.onProgress) options.onProgress(directory, completedInGroup);
|
|
437
425
|
}
|
|
426
|
+
result.hookCount = readHookCount(
|
|
427
|
+
options.dryRun ? node_path.join(bundleRoot, ".claude/settings.json") : node_path.join(targetDir, ".claude/settings.json")
|
|
428
|
+
);
|
|
438
429
|
return result;
|
|
439
430
|
}
|
|
440
|
-
function
|
|
441
|
-
const
|
|
442
|
-
|
|
431
|
+
function readWiringManifest(bundleRoot) {
|
|
432
|
+
const manifestPath = node_path.join(bundleRoot, WIRING_MANIFEST_RELATIVE);
|
|
433
|
+
if (!fileExists(manifestPath)) {
|
|
434
|
+
throw new CopyFailure(
|
|
435
|
+
"ManifestMissing",
|
|
436
|
+
`Wiring manifest missing at ${manifestPath}. Cli built for schema_version ${EXPECTED_WIRING_SCHEMA_MAJOR}.x. Run \`npm install @thebassclef/lite@latest\` to fix.`
|
|
437
|
+
);
|
|
438
|
+
}
|
|
439
|
+
let manifest;
|
|
440
|
+
let raw;
|
|
441
|
+
try {
|
|
442
|
+
raw = node_fs.readFileSync(manifestPath, "utf8");
|
|
443
|
+
} catch (e) {
|
|
444
|
+
const err = e;
|
|
445
|
+
throw new CopyFailure(
|
|
446
|
+
"ManifestMissing",
|
|
447
|
+
`Wiring manifest at ${manifestPath} unreadable (${err.code ?? "unknown"}). Reinstall @thebassclef/lite to restore the bundle.`
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
try {
|
|
451
|
+
manifest = JSON.parse(raw);
|
|
452
|
+
} catch (e) {
|
|
453
|
+
const err = e;
|
|
454
|
+
throw new CopyFailure(
|
|
455
|
+
"SchemaIncompatible",
|
|
456
|
+
`Wiring manifest at ${manifestPath} is not valid JSON: ${err.message}. Reinstall @thebassclef/lite to restore the bundle.`
|
|
457
|
+
);
|
|
458
|
+
}
|
|
459
|
+
if (typeof manifest.version !== "string" || manifest.version.length === 0) {
|
|
460
|
+
throw new CopyFailure(
|
|
461
|
+
"SchemaIncompatible",
|
|
462
|
+
`Wiring manifest at ${manifestPath} missing 'version' field. Cli requires schema_version ${EXPECTED_WIRING_SCHEMA_MAJOR}.x. Reinstall @thebassclef/lite to fix.`
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
const major = parseInt(manifest.version.split(".")[0] ?? "0", 10);
|
|
466
|
+
if (major !== EXPECTED_WIRING_SCHEMA_MAJOR) {
|
|
467
|
+
throw new CopyFailure(
|
|
468
|
+
"SchemaIncompatible",
|
|
469
|
+
`Wiring manifest at ${manifestPath} has version ${manifest.version}. Cli built for schema_version ${EXPECTED_WIRING_SCHEMA_MAJOR}.x. Upgrade cli OR downgrade @thebassclef/lite to a compatible version.`
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
return { version: manifest.version };
|
|
473
|
+
}
|
|
474
|
+
function walkDistTree(bundleRoot) {
|
|
475
|
+
if (!dirExists(bundleRoot)) {
|
|
476
|
+
throw new CopyFailure(
|
|
477
|
+
"BundleMissing",
|
|
478
|
+
`Bundled substrate missing at ${bundleRoot}. Reinstall @thebassclef/lite to restore the bundle.`
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
const results = [];
|
|
482
|
+
function walk(dir) {
|
|
483
|
+
for (const name of node_fs.readdirSync(dir)) {
|
|
484
|
+
const full = node_path.join(dir, name);
|
|
485
|
+
const st = node_fs.statSync(full);
|
|
486
|
+
if (st.isDirectory()) walk(full);
|
|
487
|
+
else results.push(node_path.relative(bundleRoot, full));
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
walk(bundleRoot);
|
|
491
|
+
results.sort();
|
|
492
|
+
return results;
|
|
493
|
+
}
|
|
494
|
+
const GITIGNORE_BUNDLE_NAME = "gitignore";
|
|
495
|
+
const GITIGNORE_ADOPTER_NAME = ".gitignore";
|
|
496
|
+
function mapAdopterPath(relPath) {
|
|
497
|
+
if (relPath === GITIGNORE_BUNDLE_NAME) return GITIGNORE_ADOPTER_NAME;
|
|
498
|
+
return relPath;
|
|
499
|
+
}
|
|
500
|
+
function copyOne(relPath, bundleRoot, targetDir, options, result) {
|
|
501
|
+
const sourcePath = node_path.join(bundleRoot, relPath);
|
|
502
|
+
const adopterRelPath = mapAdopterPath(relPath);
|
|
503
|
+
const targetPath = node_path.join(targetDir, adopterRelPath);
|
|
443
504
|
let content;
|
|
444
505
|
try {
|
|
445
506
|
content = node_fs.readFileSync(sourcePath, "utf8");
|
|
446
507
|
} catch (e) {
|
|
447
508
|
const err = e;
|
|
448
|
-
const message = `${
|
|
449
|
-
result.errored.push(
|
|
450
|
-
result.erroredMessages?.push(message);
|
|
451
|
-
return "errored";
|
|
452
|
-
}
|
|
453
|
-
const declaredHash = stripHashPrefix(entry.content_hash);
|
|
454
|
-
const actualHash = sha256Hex(content);
|
|
455
|
-
if (declaredHash !== actualHash) {
|
|
456
|
-
const message = `${entry.path} — bundled content hash does not match the manifest. Reinstall @thebassclef/core to repair the bundle, then rerun bassclef init --force.`;
|
|
457
|
-
result.errored.push(entry.path);
|
|
509
|
+
const message = `${relPath} — cannot read bundled source (${err.code ?? "unknown"}). Reinstall @thebassclef/lite to restore the bundle.`;
|
|
510
|
+
result.errored.push(adopterRelPath);
|
|
458
511
|
result.erroredMessages?.push(message);
|
|
459
512
|
return "errored";
|
|
460
513
|
}
|
|
514
|
+
const outputContent = options.transform ? options.transform(adopterRelPath, content) : content;
|
|
461
515
|
if (options.dryRun) {
|
|
462
|
-
result.wouldCopy?.push(
|
|
516
|
+
result.wouldCopy?.push(adopterRelPath);
|
|
463
517
|
return "wouldCopy";
|
|
464
518
|
}
|
|
465
519
|
try {
|
|
466
520
|
mkdirSafely(node_path.dirname(targetPath));
|
|
467
|
-
writeSafely(targetPath,
|
|
468
|
-
result.copied.push(
|
|
521
|
+
writeSafely(targetPath, outputContent, { force: options.force ?? false });
|
|
522
|
+
result.copied.push(adopterRelPath);
|
|
469
523
|
return "copied";
|
|
470
524
|
} catch (e) {
|
|
471
525
|
if (e instanceof WriteError) {
|
|
472
526
|
if (e.kind === "AlreadyExists") {
|
|
473
|
-
result.refused.push(
|
|
527
|
+
result.refused.push(adopterRelPath);
|
|
474
528
|
return "refused";
|
|
475
529
|
}
|
|
476
530
|
if (e.kind === "SymlinkRefused") {
|
|
477
|
-
result.refused.push(
|
|
531
|
+
result.refused.push(adopterRelPath);
|
|
478
532
|
return "refused";
|
|
479
533
|
}
|
|
480
|
-
const message = `${
|
|
481
|
-
result.errored.push(
|
|
534
|
+
const message = `${adopterRelPath} — write failed (${e.kind}): ${e.message}. Check the target directory exists and is writable, then rerun.`;
|
|
535
|
+
result.errored.push(adopterRelPath);
|
|
482
536
|
result.erroredMessages?.push(message);
|
|
483
537
|
return "errored";
|
|
484
538
|
}
|
|
485
539
|
throw e;
|
|
486
540
|
}
|
|
487
541
|
}
|
|
488
|
-
function loadBundledManifest(bundleRoot) {
|
|
489
|
-
const manifestPath = node_path.join(bundleRoot, ".bassclef", "lite-manifest.json");
|
|
490
|
-
const raw = node_fs.readFileSync(manifestPath, "utf8");
|
|
491
|
-
const parsed = JSON.parse(raw);
|
|
492
|
-
if (!Array.isArray(parsed.entries)) {
|
|
493
|
-
throw new Error(
|
|
494
|
-
`bundled manifest at ${manifestPath} has no entries[] array. Reinstall @thebassclef/core to restore the bundle.`
|
|
495
|
-
);
|
|
496
|
-
}
|
|
497
|
-
return parsed;
|
|
498
|
-
}
|
|
499
542
|
function resolveBundleRoot(explicit) {
|
|
500
543
|
if (explicit && explicit.length > 0) return node_path.resolve(explicit);
|
|
501
544
|
const thisFile = node_url.fileURLToPath(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("cli.cjs", document.baseURI).href);
|
|
502
545
|
let dir = node_path.dirname(thisFile);
|
|
503
546
|
for (let i = 0; i < 5; i += 1) {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
return node_path.join(dir, SUBSTRATE_ROOT);
|
|
507
|
-
} catch {
|
|
508
|
-
const parent = node_path.dirname(dir);
|
|
509
|
-
if (parent === dir) break;
|
|
510
|
-
dir = parent;
|
|
547
|
+
if (fileExists(node_path.join(dir, "package.json"))) {
|
|
548
|
+
return node_path.join(dir, "dist", "lite");
|
|
511
549
|
}
|
|
550
|
+
const parent = node_path.dirname(dir);
|
|
551
|
+
if (parent === dir) break;
|
|
552
|
+
dir = parent;
|
|
512
553
|
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
554
|
+
throw new CopyFailure(
|
|
555
|
+
"BundleMissing",
|
|
556
|
+
`Cannot resolve bundled substrate root — package.json unreachable from ${thisFile}. Reinstall @thebassclef/lite.`
|
|
557
|
+
);
|
|
517
558
|
}
|
|
518
|
-
function groupByTopDirectory(
|
|
559
|
+
function groupByTopDirectory(files) {
|
|
519
560
|
const groups = /* @__PURE__ */ new Map();
|
|
520
|
-
for (const
|
|
521
|
-
const parts =
|
|
561
|
+
for (const p of files) {
|
|
562
|
+
const parts = p.split("/");
|
|
522
563
|
const top = parts.length >= 2 ? parts.slice(0, 2).join("/") : parts[0] ?? "";
|
|
523
564
|
if (!groups.has(top)) groups.set(top, []);
|
|
524
|
-
groups.get(top).push(
|
|
565
|
+
groups.get(top).push(p);
|
|
525
566
|
}
|
|
526
567
|
return groups;
|
|
527
568
|
}
|
|
528
|
-
function
|
|
529
|
-
|
|
530
|
-
|
|
569
|
+
function readHookCount(settingsPath) {
|
|
570
|
+
try {
|
|
571
|
+
const parsed = JSON.parse(node_fs.readFileSync(settingsPath, "utf8"));
|
|
572
|
+
let count = 0;
|
|
573
|
+
for (const matcherBlocks of Object.values(parsed.hooks ?? {})) {
|
|
574
|
+
for (const block of matcherBlocks) {
|
|
575
|
+
count += (block.hooks ?? []).length;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
return count;
|
|
579
|
+
} catch {
|
|
580
|
+
return 0;
|
|
581
|
+
}
|
|
531
582
|
}
|
|
532
|
-
function
|
|
533
|
-
|
|
583
|
+
function fileExists(p) {
|
|
584
|
+
try {
|
|
585
|
+
return node_fs.statSync(p).isFile();
|
|
586
|
+
} catch {
|
|
587
|
+
return false;
|
|
588
|
+
}
|
|
534
589
|
}
|
|
590
|
+
function dirExists(p) {
|
|
591
|
+
try {
|
|
592
|
+
return node_fs.statSync(p).isDirectory();
|
|
593
|
+
} catch {
|
|
594
|
+
return false;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
const RESOLVED_TIER = "lite";
|
|
598
|
+
const PLACEHOLDER_FILES = /* @__PURE__ */ new Set([
|
|
599
|
+
"CLAUDE.md",
|
|
600
|
+
"docs/whereami.md",
|
|
601
|
+
"whereami.md",
|
|
602
|
+
".bassclef-source.json"
|
|
603
|
+
]);
|
|
535
604
|
function runInit(argv) {
|
|
536
605
|
let args;
|
|
537
606
|
try {
|
|
@@ -577,14 +646,6 @@ function runInit(argv) {
|
|
|
577
646
|
}
|
|
578
647
|
}
|
|
579
648
|
const plans = [
|
|
580
|
-
{
|
|
581
|
-
label: "settings.json",
|
|
582
|
-
relativePath: ".claude/settings.json",
|
|
583
|
-
fullPath: node_path.join(targetDir, ".claude", "settings.json"),
|
|
584
|
-
content: settingsJsonTemplate(index.version),
|
|
585
|
-
templateName: "settings.json",
|
|
586
|
-
templateVersion: SETTINGS_TEMPLATE_VERSION
|
|
587
|
-
},
|
|
588
649
|
{
|
|
589
650
|
label: "substrate.config.md",
|
|
590
651
|
relativePath: "substrate.config.md",
|
|
@@ -596,30 +657,28 @@ function runInit(argv) {
|
|
|
596
657
|
];
|
|
597
658
|
if (args.dryRun) {
|
|
598
659
|
runDryRun$1(plans);
|
|
599
|
-
dispatchSubstrateCopy(targetDir, args.force, args.verbose, true);
|
|
600
|
-
return 0;
|
|
601
|
-
}
|
|
602
|
-
const exitCode = runReal$1(plans, args.force, args.verbose, targetDir);
|
|
603
|
-
if (exitCode === 0) {
|
|
604
|
-
dispatchSubstrateCopy(targetDir, args.force, args.verbose, false);
|
|
660
|
+
return dispatchSubstrateCopy(targetDir, args.force, args.verbose, true);
|
|
605
661
|
}
|
|
606
|
-
return
|
|
662
|
+
return runReal$1(plans, args.force, args.verbose, targetDir);
|
|
607
663
|
}
|
|
608
664
|
function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
665
|
+
const substitute = makePlaceholderTransform(targetDir);
|
|
609
666
|
let result;
|
|
610
667
|
try {
|
|
611
|
-
result = copySubstrate(targetDir, {
|
|
668
|
+
result = copySubstrate(targetDir, {
|
|
669
|
+
force,
|
|
670
|
+
dryRun,
|
|
671
|
+
transform: substitute
|
|
672
|
+
});
|
|
612
673
|
} catch (e) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
);
|
|
622
|
-
process.exit(2);
|
|
674
|
+
if (e instanceof CopyFailure) {
|
|
675
|
+
process.stderr.write(`bassclef init: ${e.message}
|
|
676
|
+
`);
|
|
677
|
+
if (e.kind === "ManifestMissing") return 4;
|
|
678
|
+
if (e.kind === "SchemaIncompatible") return 5;
|
|
679
|
+
return 2;
|
|
680
|
+
}
|
|
681
|
+
throw e;
|
|
623
682
|
}
|
|
624
683
|
if (dryRun) {
|
|
625
684
|
const wouldCopy = result.wouldCopy ?? [];
|
|
@@ -634,10 +693,14 @@ function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
|
634
693
|
`
|
|
635
694
|
);
|
|
636
695
|
}
|
|
637
|
-
|
|
696
|
+
process.stdout.write(
|
|
697
|
+
`bassclef init: ${result.hookCount} hooks armed (${RESOLVED_TIER} tier).
|
|
698
|
+
`
|
|
699
|
+
);
|
|
700
|
+
return 0;
|
|
638
701
|
}
|
|
639
702
|
if (result.copied.length === 0 && result.refused.length === 0 && result.errored.length === 0) {
|
|
640
|
-
return;
|
|
703
|
+
return 0;
|
|
641
704
|
}
|
|
642
705
|
const groupCounts = /* @__PURE__ */ new Map();
|
|
643
706
|
for (const path of result.copied) {
|
|
@@ -655,9 +718,13 @@ function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
|
655
718
|
if (result.errored.length > 0) parts.push(`${result.errored.length} error(s)`);
|
|
656
719
|
process.stdout.write(`bassclef init: ${parts.join(", ")}.
|
|
657
720
|
`);
|
|
658
|
-
const grandTotal =
|
|
721
|
+
const grandTotal = 1 + result.copied.length;
|
|
722
|
+
process.stdout.write(
|
|
723
|
+
`bassclef init: ${grandTotal} files total (1 config + ${result.copied.length} substrate).
|
|
724
|
+
`
|
|
725
|
+
);
|
|
659
726
|
process.stdout.write(
|
|
660
|
-
`bassclef init: ${
|
|
727
|
+
`bassclef init: ${result.hookCount} hooks armed (${RESOLVED_TIER} tier).
|
|
661
728
|
`
|
|
662
729
|
);
|
|
663
730
|
if (verbose && result.erroredMessages) {
|
|
@@ -666,6 +733,15 @@ function dispatchSubstrateCopy(targetDir, force, verbose, dryRun) {
|
|
|
666
733
|
`);
|
|
667
734
|
}
|
|
668
735
|
}
|
|
736
|
+
return result.errored.length > 0 ? 2 : 0;
|
|
737
|
+
}
|
|
738
|
+
function makePlaceholderTransform(targetDir) {
|
|
739
|
+
const repoName = node_path.basename(targetDir);
|
|
740
|
+
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
741
|
+
return (relPath, content) => {
|
|
742
|
+
if (!PLACEHOLDER_FILES.has(relPath)) return content;
|
|
743
|
+
return content.replace(/\[REPO_NAME\]/g, repoName).replace(/\[ISO_TIMESTAMP\]/g, timestamp).replace(/\[TIER\]/g, RESOLVED_TIER).replace(/\[Repo name\]/g, repoName).replace(/<tier>/g, RESOLVED_TIER);
|
|
744
|
+
};
|
|
669
745
|
}
|
|
670
746
|
function runDryRun$1(plans) {
|
|
671
747
|
for (const p of plans) {
|
|
@@ -749,8 +825,8 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
749
825
|
process.stderr.write(`bassclef init: ${tag}: ${r.message ?? "write failed"}: ${r.plan.fullPath}
|
|
750
826
|
`);
|
|
751
827
|
}
|
|
752
|
-
writeManifest(targetDir, results);
|
|
753
828
|
if (anyError) {
|
|
829
|
+
writeManifest(targetDir, results);
|
|
754
830
|
const parts = [];
|
|
755
831
|
if (created > 0) parts.push(`${created} created`);
|
|
756
832
|
if (unchanged > 0) parts.push(`${unchanged} unchanged`);
|
|
@@ -761,28 +837,26 @@ function runReal$1(plans, force, verbose, targetDir) {
|
|
|
761
837
|
`);
|
|
762
838
|
return 2;
|
|
763
839
|
}
|
|
764
|
-
if (created === 0 && unchanged === plans.length) {
|
|
765
|
-
process.stdout.write("bassclef init: already initialized. No changes.\n");
|
|
766
|
-
return 0;
|
|
767
|
-
}
|
|
768
840
|
if (anyRefused && created > 0) {
|
|
769
841
|
process.stdout.write(
|
|
770
842
|
`bassclef init: ${created} config files created, ${unchanged} unchanged. Pass --force to overwrite.
|
|
771
843
|
`
|
|
772
844
|
);
|
|
845
|
+
} else if (created === 0 && unchanged === plans.length) {
|
|
846
|
+
process.stdout.write("bassclef init: already initialized. No changes.\n");
|
|
847
|
+
} else {
|
|
848
|
+
process.stdout.write(`bassclef init: ${created} config files created, ${unchanged} unchanged.
|
|
849
|
+
`);
|
|
850
|
+
}
|
|
851
|
+
const walkerExit = dispatchSubstrateCopy(targetDir, force, verbose, false);
|
|
852
|
+
writeManifest(targetDir, results);
|
|
853
|
+
if (walkerExit === 0) {
|
|
773
854
|
process.stdout.write(
|
|
774
855
|
`bassclef init: your substrate lives under .claude/. Add .claude/ to .gitignore if you have not.
|
|
775
856
|
`
|
|
776
857
|
);
|
|
777
|
-
return 0;
|
|
778
858
|
}
|
|
779
|
-
|
|
780
|
-
`);
|
|
781
|
-
process.stdout.write(
|
|
782
|
-
`bassclef init: your substrate lives under .claude/. Add .claude/ to .gitignore if you have not.
|
|
783
|
-
`
|
|
784
|
-
);
|
|
785
|
-
return 0;
|
|
859
|
+
return walkerExit;
|
|
786
860
|
}
|
|
787
861
|
function shouldRefuseRoot(currentUid, allowRoot) {
|
|
788
862
|
if (currentUid === void 0) return false;
|
|
@@ -830,17 +904,22 @@ function usage$2() {
|
|
|
830
904
|
" --allow-any-dir Allow --dir outside your home directory. Default: refuse.",
|
|
831
905
|
" --verbose Print per-file result.",
|
|
832
906
|
"",
|
|
907
|
+
"Exit codes:",
|
|
908
|
+
" 0 — success",
|
|
909
|
+
" 1 — refused by policy (existing file; running as root; outside HOME)",
|
|
910
|
+
" 2 — safety check failed at write (symlink; parent not writable)",
|
|
911
|
+
" 3 — invalid args",
|
|
912
|
+
" 4 — wiring manifest missing from bundled substrate (reinstall @thebassclef/lite)",
|
|
913
|
+
" 5 — wiring manifest schema major version incompatible with this cli",
|
|
914
|
+
"",
|
|
833
915
|
"Files written under <target>:",
|
|
834
|
-
" .claude/settings.json Claude Code settings (minimal, opt-in blocks)",
|
|
835
916
|
" substrate.config.md Bassclef project manifest",
|
|
836
917
|
" .bassclef/init.manifest.json Record of what init wrote (used by sync)",
|
|
837
918
|
"",
|
|
838
|
-
" Plus the bundled substrate tree
|
|
839
|
-
" .claude/
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
" AGENTS.md, CLAUDE-lite.md, README.md, CONTRIBUTING.md,",
|
|
843
|
-
" SECURITY.md, CODE_OF_CONDUCT.md",
|
|
919
|
+
" Plus the bundled substrate tree from dist/lite/:",
|
|
920
|
+
" .claude/settings.json Claude Code settings (verbatim from bundle)",
|
|
921
|
+
" CLAUDE.md, whereami.md, .bassclef-source.json, .gitignore",
|
|
922
|
+
" Templates with placeholders substituted",
|
|
844
923
|
"",
|
|
845
924
|
" Run with --dry-run first to preview the full file list before",
|
|
846
925
|
" writing anything to disk.",
|
|
@@ -922,12 +1001,6 @@ function parseSyncArgs(argv) {
|
|
|
922
1001
|
return out;
|
|
923
1002
|
}
|
|
924
1003
|
const TEMPLATES = [
|
|
925
|
-
{
|
|
926
|
-
templateName: "settings.json",
|
|
927
|
-
currentVersion: SETTINGS_TEMPLATE_VERSION,
|
|
928
|
-
render: settingsJsonTemplate,
|
|
929
|
-
hasMarker: (c) => c.includes('"$bassclef"')
|
|
930
|
-
},
|
|
931
1004
|
{
|
|
932
1005
|
templateName: "substrate.config.md",
|
|
933
1006
|
currentVersion: SUBSTRATE_CONFIG_TEMPLATE_VERSION,
|
|
@@ -1379,6 +1452,12 @@ async function confirm(question, opts = {}) {
|
|
|
1379
1452
|
rl.close();
|
|
1380
1453
|
}
|
|
1381
1454
|
}
|
|
1455
|
+
const CONFIG_FILES = [
|
|
1456
|
+
".claude/settings.json",
|
|
1457
|
+
"substrate.config.md",
|
|
1458
|
+
"substrate.secrets.md"
|
|
1459
|
+
];
|
|
1460
|
+
const CURRENT_ENTRY_COUNT = 149;
|
|
1382
1461
|
async function detectAdopterState(targetDir) {
|
|
1383
1462
|
let manifest;
|
|
1384
1463
|
try {
|