@event4u/agent-config 9.11.0 → 9.12.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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +52 -0
- package/README.md +8 -1
- package/dist/agent-src/commands/fix/ci.md +29 -0
- package/dist/agent-src/commands/pr/create.md +60 -0
- package/dist/agent-src/contexts/authority/kernel-rule-edits.md +18 -2
- package/dist/agent-src/rules/design-fidelity.md +1 -1
- package/dist/agent-src/skills/ai-code-blindspots/SKILL.md +1 -0
- package/dist/agent-src/skills/design-intelligence/SKILL.md +27 -1
- package/dist/agent-src/skills/design-intelligence/data/font-pairings-reference.csv +74 -74
- package/dist/agent-src/skills/design-intelligence/data/manifest.json +2 -0
- package/dist/agent-src/skills/design-tokens/scripts/tokens.ts +0 -7
- package/dist/agent-src/skills/typography-system/SKILL.md +55 -11
- package/dist/agent-src/skills/ui-apply-generic/SKILL.md +180 -0
- package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +9 -5
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +9 -6
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/review.ts +9 -5
- package/dist/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +182 -29
- package/dist/agent-src/templates/scripts/work_engine/stack/detect.ts +311 -24
- package/dist/cli-delegate/chunk-523HCFYO.js +90 -0
- package/dist/cli-delegate/{chunk-IR7P7JWA.js → chunk-A3HJ6NTI.js} +271 -59
- package/dist/cli-delegate/chunk-EJYIGZ3T.js +125 -0
- package/dist/cli-delegate/{chunk-RDGRHAAB.js → chunk-HYWSRNUX.js} +6 -86
- package/dist/cli-delegate/{chunk-YMFO6FDN.js → chunk-QFKQLQ7X.js} +313 -81
- package/dist/cli-delegate/{chunk-4SV3XGFA.js → chunk-TEGJU2JX.js} +7 -9
- package/dist/cli-delegate/chunk-TJIAM5FW.js +133 -0
- package/dist/cli-delegate/cmd_conformance.js +4 -7
- package/dist/cli-delegate/cmd_doctor.js +3 -5
- package/dist/cli-delegate/cmd_explain.js +153 -85
- package/dist/cli-delegate/cmd_export.js +5 -3
- package/dist/cli-delegate/cmd_fleet.js +2 -1
- package/dist/cli-delegate/cmd_preflight.js +6 -123
- package/dist/cli-delegate/cmd_prune.js +5 -3
- package/dist/cli-delegate/cmd_settings_migrate.js +5 -3
- package/dist/cli-delegate/cmd_sync.js +5 -3
- package/dist/cli-delegate/cmd_uninstall.js +6 -5
- package/dist/cli-delegate/cmd_validate.js +5 -3
- package/dist/discovery/deprecation-report.md +1 -1
- package/dist/discovery/discovery-manifest.json +36 -14
- package/dist/discovery/discovery-manifest.json.sha256 +1 -1
- package/dist/discovery/discovery-manifest.summary.md +3 -3
- package/dist/discovery/orphan-report.md +1 -1
- package/dist/discovery/packs.json +6 -5
- package/dist/discovery/trust-report.md +2 -2
- package/dist/discovery/workspaces.json +5 -4
- package/dist/install/install.mjs +605 -412
- package/dist/install/ruleInScope.js +123 -0
- package/dist/install/ruleInScope.js.map +1 -0
- package/dist/install/rule_scope.js +2 -2
- package/dist/install/rule_scope.js.map +1 -1
- package/dist/install/wizard-plan.js +10 -1
- package/dist/install/wizard-plan.js.map +1 -1
- package/dist/mcp/registry-manifest.json +3 -3
- package/dist/mcp/server.json +2 -2
- package/dist/mcp/server.mjs +405 -2429
- package/dist/scripts/condense.js +6 -22
- package/dist/scripts/condense.js.map +1 -1
- package/docs/guidelines/design-fidelity-mechanics.md +14 -0
- package/package.json +1 -1
- package/src/agent-src/templates/scripts/work_engine/directives/ui/apply.ts +9 -5
- package/src/agent-src/templates/scripts/work_engine/directives/ui/polish.ts +9 -6
- package/src/agent-src/templates/scripts/work_engine/directives/ui/review.ts +9 -5
- package/src/agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.ts +182 -29
- package/src/agent-src/templates/scripts/work_engine/stack/detect.ts +311 -24
- package/src/install/ruleInScope.ts +133 -0
- package/src/install/rule_scope.ts +2 -2
- package/src/install/wizard-plan.ts +11 -1
- package/src/scripts/_lib/global_deploy_inventory.ts +38 -2
- package/src/scripts/check_installer_import_purity.ts +295 -0
- package/src/scripts/condense.ts +7 -28
- package/src/scripts/install-hooks.sh +36 -4
- package/src/scripts/install.ts +210 -5
- package/src/scripts/lint_ui_stack_bundles.ts +31 -0
- package/dist/cli-delegate/chunk-7DSAMZFU.js +0 -356
- package/dist/cli-delegate/chunk-BJGXZNPM.js +0 -266
- package/dist/cli-delegate/chunk-TFG57JJM.js +0 -1969
package/src/scripts/install.ts
CHANGED
|
@@ -82,6 +82,13 @@ import * as user_global_paths from './_lib/user_global_paths.js';
|
|
|
82
82
|
import * as claude_desktop_bundler from './_lib/claude_desktop_bundler.js';
|
|
83
83
|
import * as claude_settings_hooks from './_lib/claude_settings_hooks.js';
|
|
84
84
|
import { find_project_root_with_anchor, load_agent_settings } from './_lib/agent_settings.js';
|
|
85
|
+
import {
|
|
86
|
+
LEGACY_ALL,
|
|
87
|
+
ruleFileArrives,
|
|
88
|
+
ruleScopeFromSettings,
|
|
89
|
+
type RuleScope,
|
|
90
|
+
} from '../install/rule_scope.js';
|
|
91
|
+
import { RULE_SOURCE_REL } from '../install/wizard-plan.js';
|
|
85
92
|
import { flattenSurface, computeSurfaceDelta, type SettingsSurface } from '../shared/settingsSurface.js';
|
|
86
93
|
import { settingsSchema } from '../server/schemas/settings.js';
|
|
87
94
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
@@ -2730,17 +2737,71 @@ function _inject_package_tag(
|
|
|
2730
2737
|
}
|
|
2731
2738
|
}
|
|
2732
2739
|
|
|
2740
|
+
/**
|
|
2741
|
+
* Would dereferencing `entry` escape the package root?
|
|
2742
|
+
*
|
|
2743
|
+
* `_copy_dir_dereferencing_symlinks` copies the REALPATH of every entry, so a
|
|
2744
|
+
* symlink in the shipped tree pointing outside the package would copy an
|
|
2745
|
+
* arbitrary readable file into the deploy destination — and those destinations
|
|
2746
|
+
* are agent-readable instruction dirs (`~/.claude/rules/`, `~/.codeium/…`). A
|
|
2747
|
+
* tampered tarball carrying `rules/x.md -> ~/.ssh/id_rsa` would land that file
|
|
2748
|
+
* where an agent reads rules.
|
|
2749
|
+
*
|
|
2750
|
+
* Defence-in-depth for `docs/threat-model.md` row b (supply-chain compromise):
|
|
2751
|
+
* the package is the install-time trust anchor, so this is not the primary
|
|
2752
|
+
* control — but the check is one comparison and `package_root` was already
|
|
2753
|
+
* threaded through, so there is no reason to ship without it.
|
|
2754
|
+
*
|
|
2755
|
+
* Both sides are realpath'd before comparing, so a macOS `/var` → `/private/var`
|
|
2756
|
+
* root does not read as an escape. A `null` package_root means the caller did
|
|
2757
|
+
* not scope the copy (several do) — unchanged, permissive behaviour there.
|
|
2758
|
+
*/
|
|
2759
|
+
function _escapes_package_root(resolved: string, package_root: string | null): boolean {
|
|
2760
|
+
if (package_root === null) return false;
|
|
2761
|
+
let root: string;
|
|
2762
|
+
try {
|
|
2763
|
+
root = fs.realpathSync(package_root);
|
|
2764
|
+
} catch {
|
|
2765
|
+
// Unresolvable root — cannot judge containment, so do not block the copy.
|
|
2766
|
+
return false;
|
|
2767
|
+
}
|
|
2768
|
+
return !global_deploy_inventory.is_ancestor(root, resolved);
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2771
|
+
/**
|
|
2772
|
+
* Copy `src` → `dest`, dereferencing symlinks, returning
|
|
2773
|
+
* `[written, skipped, written_paths]`.
|
|
2774
|
+
*
|
|
2775
|
+
* `file_filter` is an optional predicate over the SOURCE path; `false` means the
|
|
2776
|
+
* file is not part of this install and is neither copied nor counted. It MUST be
|
|
2777
|
+
* the same predicate handed to `global_deploy_inventory.expected_deploy_files`
|
|
2778
|
+
* for the same source — that function computes what the reaper considers
|
|
2779
|
+
* "should exist", so filtering one side only either leaves excluded files behind
|
|
2780
|
+
* forever or deletes files the copy just wrote.
|
|
2781
|
+
*/
|
|
2733
2782
|
function _copy_dir_dereferencing_symlinks(
|
|
2734
2783
|
src: string,
|
|
2735
2784
|
dest: string,
|
|
2736
2785
|
force: boolean,
|
|
2737
2786
|
package_root: string | null = null,
|
|
2787
|
+
file_filter: global_deploy_inventory.FileFilter | null = null,
|
|
2738
2788
|
): [number, number, string[]] {
|
|
2739
2789
|
let written = 0;
|
|
2740
2790
|
let skipped = 0;
|
|
2741
2791
|
const written_paths: string[] = [];
|
|
2742
2792
|
if (!pathExists(src)) return [0, 0, written_paths];
|
|
2743
2793
|
if (!isDir(src)) {
|
|
2794
|
+
if (file_filter !== null && !file_filter(src)) return [0, 0, written_paths];
|
|
2795
|
+
let resolved_src = src;
|
|
2796
|
+
try {
|
|
2797
|
+
resolved_src = fs.realpathSync(src);
|
|
2798
|
+
} catch {
|
|
2799
|
+
resolved_src = src;
|
|
2800
|
+
}
|
|
2801
|
+
if (_escapes_package_root(resolved_src, package_root)) {
|
|
2802
|
+
warn(`refused: ${src} dereferences outside the package root — not copied`);
|
|
2803
|
+
return [0, 0, written_paths];
|
|
2804
|
+
}
|
|
2744
2805
|
mkdirp(path.dirname(dest));
|
|
2745
2806
|
const decision = _resolve_file_conflict(dest, force);
|
|
2746
2807
|
if (decision === 'skip') return [0, 1, written_paths];
|
|
@@ -2784,6 +2845,13 @@ function _copy_dir_dereferencing_symlinks(
|
|
|
2784
2845
|
} catch {
|
|
2785
2846
|
resolvedIsDir = false;
|
|
2786
2847
|
}
|
|
2848
|
+
// Containment is checked on the RESOLVED path, before either the
|
|
2849
|
+
// recursion or the copy — a symlinked directory escaping the root would
|
|
2850
|
+
// otherwise pull its whole subtree in.
|
|
2851
|
+
if (_escapes_package_root(resolved, package_root)) {
|
|
2852
|
+
warn(`refused: ${entry} dereferences outside the package root — not copied`);
|
|
2853
|
+
continue;
|
|
2854
|
+
}
|
|
2787
2855
|
if (resolvedIsDir) {
|
|
2788
2856
|
mkdirp(target);
|
|
2789
2857
|
const [sub_w, sub_s, sub_p] = _copy_dir_dereferencing_symlinks(
|
|
@@ -2791,12 +2859,20 @@ function _copy_dir_dereferencing_symlinks(
|
|
|
2791
2859
|
target,
|
|
2792
2860
|
force,
|
|
2793
2861
|
package_root,
|
|
2862
|
+
file_filter,
|
|
2794
2863
|
);
|
|
2795
2864
|
written += sub_w;
|
|
2796
2865
|
skipped += sub_s;
|
|
2797
2866
|
written_paths.push(...sub_p);
|
|
2798
2867
|
continue;
|
|
2799
2868
|
}
|
|
2869
|
+
// The predicate sees the SOURCE path (the rule-scope predicate reads the
|
|
2870
|
+
// file's own frontmatter tags). Skipped files are counted as neither
|
|
2871
|
+
// written nor skipped-as-identical: they are not part of this install,
|
|
2872
|
+
// so the inventory twin must omit them too or the reaper drifts.
|
|
2873
|
+
if (file_filter !== null && !file_filter(entry)) {
|
|
2874
|
+
continue;
|
|
2875
|
+
}
|
|
2800
2876
|
const decision = _resolve_file_conflict(target, force);
|
|
2801
2877
|
if (decision === 'skip') {
|
|
2802
2878
|
skipped += 1;
|
|
@@ -2949,6 +3025,10 @@ function _deploy_global_content(
|
|
|
2949
3025
|
lockfile_path: string,
|
|
2950
3026
|
): Record<string, DeployResult> {
|
|
2951
3027
|
const results: Record<string, DeployResult> = {};
|
|
3028
|
+
// Resolved ONCE per deploy, not per tool: every tool installs the same rule
|
|
3029
|
+
// tree, and re-reading settings per tool could yield different answers
|
|
3030
|
+
// mid-run if the file changed underneath.
|
|
3031
|
+
const rule_scope = _resolve_global_rule_scope(package_root);
|
|
2952
3032
|
for (const tool_id of [...tools].sort()) {
|
|
2953
3033
|
if (tool_id === 'claude-desktop') {
|
|
2954
3034
|
results[tool_id] = _deploy_claude_desktop(force, package_root, lockfile_path);
|
|
@@ -2975,13 +3055,30 @@ function _deploy_global_content(
|
|
|
2975
3055
|
for (const [src_rel, dest_sub] of plan) {
|
|
2976
3056
|
const src = path.join(package_root, src_rel);
|
|
2977
3057
|
const dest = dest_sub ? path.join(anchor, dest_sub) : anchor;
|
|
2978
|
-
|
|
3058
|
+
// ONE filter instance, handed to BOTH the copy and the inventory.
|
|
3059
|
+
// `expected_deploy_files` is what the reaper treats as "should
|
|
3060
|
+
// exist": filtering only the copy would leave previously-installed
|
|
3061
|
+
// maintainer rules on disk forever, and filtering only the
|
|
3062
|
+
// inventory would delete rules the copy just wrote. Both, or
|
|
3063
|
+
// neither — never one.
|
|
3064
|
+
const rule_filter = _rule_filter_for_source(src_rel, rule_scope);
|
|
3065
|
+
const [w, s, paths] = _copy_dir_dereferencing_symlinks(
|
|
3066
|
+
src,
|
|
3067
|
+
dest,
|
|
3068
|
+
force,
|
|
3069
|
+
package_root,
|
|
3070
|
+
rule_filter,
|
|
3071
|
+
);
|
|
2979
3072
|
written_total += w;
|
|
2980
3073
|
skipped_total += s;
|
|
2981
3074
|
written_paths.push(...paths);
|
|
2982
3075
|
current_files = setUnion(
|
|
2983
3076
|
current_files,
|
|
2984
|
-
global_deploy_inventory.expected_deploy_files(
|
|
3077
|
+
global_deploy_inventory.expected_deploy_files(
|
|
3078
|
+
src,
|
|
3079
|
+
dest_sub ? dest_sub : '',
|
|
3080
|
+
rule_filter,
|
|
3081
|
+
),
|
|
2985
3082
|
);
|
|
2986
3083
|
}
|
|
2987
3084
|
// Flat-command → skill-wrapper re-projection for Claude Code
|
|
@@ -3091,6 +3188,9 @@ function _preview_global_reap(
|
|
|
3091
3188
|
): Record<string, string[]> {
|
|
3092
3189
|
const inventory = global_deploy_inventory.load_inventory();
|
|
3093
3190
|
const preview: Record<string, string[]> = {};
|
|
3191
|
+
// The preview must compute the SAME expected set the real deploy will, or
|
|
3192
|
+
// `--dry-run` under-reports the rules a scoped upgrade is about to reap.
|
|
3193
|
+
const rule_scope = _resolve_global_rule_scope(package_root);
|
|
3094
3194
|
for (const tool_id of [...tools].sort()) {
|
|
3095
3195
|
const plan = GLOBAL_DEPLOY_SOURCES[tool_id];
|
|
3096
3196
|
if (plan === undefined) continue;
|
|
@@ -3102,7 +3202,11 @@ function _preview_global_reap(
|
|
|
3102
3202
|
const src = path.join(package_root, src_rel);
|
|
3103
3203
|
current_files = setUnion(
|
|
3104
3204
|
current_files,
|
|
3105
|
-
global_deploy_inventory.expected_deploy_files(
|
|
3205
|
+
global_deploy_inventory.expected_deploy_files(
|
|
3206
|
+
src,
|
|
3207
|
+
dest_sub ? dest_sub : '',
|
|
3208
|
+
_rule_filter_for_source(src_rel, rule_scope),
|
|
3209
|
+
),
|
|
3106
3210
|
);
|
|
3107
3211
|
}
|
|
3108
3212
|
let would_reap: string[] = [];
|
|
@@ -3334,11 +3438,25 @@ function _compute_active_pack_ids(
|
|
|
3334
3438
|
* artefact of any kind.
|
|
3335
3439
|
*/
|
|
3336
3440
|
function _resolve_global_settings_doc(): Record<string, unknown> | null {
|
|
3441
|
+
const p = _resolve_global_settings_path();
|
|
3442
|
+
return p === null ? null : _load_yaml_doc(p);
|
|
3443
|
+
}
|
|
3444
|
+
|
|
3445
|
+
/**
|
|
3446
|
+
* The path `_resolve_global_settings_doc` would read, or `null` when no global
|
|
3447
|
+
* settings artefact exists at all.
|
|
3448
|
+
*
|
|
3449
|
+
* Split out because "absent" and "present but unparseable" are different facts
|
|
3450
|
+
* and one caller must tell them apart: `_load_yaml_doc` maps BOTH to `{}`, which
|
|
3451
|
+
* silently turns a YAML typo into legacy-all rule scoping — defeating a scoping
|
|
3452
|
+
* decision the user made, with no signal. See `_resolve_global_rule_scope`.
|
|
3453
|
+
*/
|
|
3454
|
+
function _resolve_global_settings_path(): string | null {
|
|
3337
3455
|
const root = user_global_paths.event4u_root();
|
|
3338
3456
|
const canonical = path.join(root, 'settings', SETTINGS_FILE);
|
|
3339
|
-
if (pathExists(canonical)) return
|
|
3457
|
+
if (pathExists(canonical)) return canonical;
|
|
3340
3458
|
const legacy = path.join(root, SETTINGS_FILE);
|
|
3341
|
-
if (pathExists(legacy)) return
|
|
3459
|
+
if (pathExists(legacy)) return legacy;
|
|
3342
3460
|
return null;
|
|
3343
3461
|
}
|
|
3344
3462
|
|
|
@@ -3369,6 +3487,84 @@ function _resolve_scoped_projection(
|
|
|
3369
3487
|
return { mode, active_packs };
|
|
3370
3488
|
}
|
|
3371
3489
|
|
|
3490
|
+
/**
|
|
3491
|
+
* Resolve the rule scope governing THIS global deploy — the same way the wizard
|
|
3492
|
+
* does (`src/server/routes/install.ts::_resolveRuleScope`), so the two global
|
|
3493
|
+
* paths cannot ship different rule sets for the same settings.
|
|
3494
|
+
*
|
|
3495
|
+
* Settings resolution mirrors `_resolve_scoped_projection` above: an existing
|
|
3496
|
+
* global settings doc is authoritative, and only a genuinely fresh machine falls
|
|
3497
|
+
* through to the packaged template. Any read or parse failure resolves to
|
|
3498
|
+
* `LEGACY_ALL` — over-shipping is the safe direction, and the compat exclusion
|
|
3499
|
+
* (`source-of-truth.md`) still applies even then.
|
|
3500
|
+
*/
|
|
3501
|
+
function _resolve_global_rule_scope(package_root: string): RuleScope {
|
|
3502
|
+
const settings_path = _resolve_global_settings_path();
|
|
3503
|
+
|
|
3504
|
+
// No global settings artefact at all — a genuinely fresh machine. Fall
|
|
3505
|
+
// through to the packaged template silently: there is no user decision to
|
|
3506
|
+
// contradict, and this is the documented upgrade-compat path.
|
|
3507
|
+
if (settings_path === null) {
|
|
3508
|
+
try {
|
|
3509
|
+
return ruleScopeFromSettings(_load_default_settings(package_root));
|
|
3510
|
+
} catch {
|
|
3511
|
+
return LEGACY_ALL;
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
|
|
3515
|
+
// A doc EXISTS, so the user has expressed a configuration. Failing to read
|
|
3516
|
+
// it is not the same as not having one: falling back to legacy-all here
|
|
3517
|
+
// ships the maintainer-only rules the user may have deliberately scoped out,
|
|
3518
|
+
// and `_load_yaml_doc` would report that as an indistinguishable `{}`. So
|
|
3519
|
+
// parse it explicitly and be LOUD when it does not parse — over-shipping
|
|
3520
|
+
// stays the safe direction, but it must not be a silent one.
|
|
3521
|
+
let text: string;
|
|
3522
|
+
try {
|
|
3523
|
+
text = readText(settings_path);
|
|
3524
|
+
} catch (e) {
|
|
3525
|
+
warn(
|
|
3526
|
+
`could not read ${settings_path} (${String(e)}) — rule scoping falls back ` +
|
|
3527
|
+
'to legacy-all, so ALL rules including maintainer-only ones will be ' +
|
|
3528
|
+
'installed. Fix the file to restore scoping.',
|
|
3529
|
+
);
|
|
3530
|
+
return LEGACY_ALL;
|
|
3531
|
+
}
|
|
3532
|
+
const parsed = yamlSafeLoad(text);
|
|
3533
|
+
if (!_isPlainObject(parsed)) {
|
|
3534
|
+
warn(
|
|
3535
|
+
`${settings_path} is not a YAML mapping — rule scoping falls back to ` +
|
|
3536
|
+
'legacy-all, so ALL rules including maintainer-only ones will be ' +
|
|
3537
|
+
'installed. Fix the file to restore scoping.',
|
|
3538
|
+
);
|
|
3539
|
+
return LEGACY_ALL;
|
|
3540
|
+
}
|
|
3541
|
+
try {
|
|
3542
|
+
return ruleScopeFromSettings(parsed as Record<string, unknown>);
|
|
3543
|
+
} catch (e) {
|
|
3544
|
+
warn(
|
|
3545
|
+
`could not derive rule scope from ${settings_path} (${String(e)}) — ` +
|
|
3546
|
+
'falling back to legacy-all; ALL rules will be installed.',
|
|
3547
|
+
);
|
|
3548
|
+
return LEGACY_ALL;
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3551
|
+
|
|
3552
|
+
/**
|
|
3553
|
+
* The rule-scope filter for one `GLOBAL_DEPLOY_SOURCES` row, or `null` when the
|
|
3554
|
+
* row is not the rules tree.
|
|
3555
|
+
*
|
|
3556
|
+
* Keyed on `src_rel === RULE_SOURCE_REL` exactly as `expandWizardSources` keys
|
|
3557
|
+
* it — the two must agree on WHICH source gets filtered, not only on the
|
|
3558
|
+
* predicate.
|
|
3559
|
+
*/
|
|
3560
|
+
function _rule_filter_for_source(
|
|
3561
|
+
src_rel: string,
|
|
3562
|
+
scope: RuleScope,
|
|
3563
|
+
): global_deploy_inventory.FileFilter | null {
|
|
3564
|
+
if (src_rel !== RULE_SOURCE_REL) return null;
|
|
3565
|
+
return (srcFile: string): boolean => ruleFileArrives(srcFile, scope);
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3372
3568
|
/**
|
|
3373
3569
|
* Prune every skill/command artefact whose `packs:` frontmatter is
|
|
3374
3570
|
* non-empty AND has no intersection with `active_ids`. Untagged artefacts
|
|
@@ -5035,5 +5231,14 @@ export {
|
|
|
5035
5231
|
_compute_active_pack_ids,
|
|
5036
5232
|
_resolve_global_settings_doc,
|
|
5037
5233
|
_resolve_scoped_projection,
|
|
5234
|
+
// road-to-consistent-rule-scoping Phase 2: the CLI global deploy path had
|
|
5235
|
+
// no direct test — the existing rule-scoping suite covers the PLAN path
|
|
5236
|
+
// (`expandWizardSources`) only, which is why the two diverged unnoticed.
|
|
5237
|
+
_deploy_global_content,
|
|
5238
|
+
// road-to-local-ci-trust: exported for the symlink-confinement tests
|
|
5239
|
+
// (PR #1076 review-gate finding).
|
|
5240
|
+
_copy_dir_dereferencing_symlinks,
|
|
5241
|
+
_preview_global_reap,
|
|
5242
|
+
_resolve_global_rule_scope,
|
|
5038
5243
|
};
|
|
5039
5244
|
export type { Options, PackRecord, DeployResult };
|
|
@@ -31,6 +31,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
31
31
|
import {
|
|
32
32
|
STACK_BUNDLES,
|
|
33
33
|
type StackBundle,
|
|
34
|
+
compose_bundle,
|
|
34
35
|
} from '../agent-src/templates/scripts/work_engine/directives/ui/stack_bundles.js';
|
|
35
36
|
|
|
36
37
|
const QUIET = process.argv.includes('--quiet');
|
|
@@ -47,6 +48,29 @@ const STACK_NEUTRAL_PACKS: ReadonlySet<string> = new Set(['engineering-base', 'c
|
|
|
47
48
|
|
|
48
49
|
const findings: string[] = [];
|
|
49
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Axis combinations the composition must satisfy.
|
|
53
|
+
*
|
|
54
|
+
* Not exhaustive over the cross-product — that would be thousands of
|
|
55
|
+
* meaningless tuples. These are the shapes a real project produces, including
|
|
56
|
+
* the ones no hand-written lane ever covered (Nuxt over Vue, Astro, Angular,
|
|
57
|
+
* Livewire without Flux).
|
|
58
|
+
*/
|
|
59
|
+
const _AXIS_COMBOS: ReadonlyArray<Record<string, string>> = [
|
|
60
|
+
{ view: 'blade', reactivity: 'livewire', component_lib: 'flux', css: 'tailwind', meta: 'none' },
|
|
61
|
+
{ view: 'blade', reactivity: 'livewire', component_lib: 'none', css: 'tailwind', meta: 'none' },
|
|
62
|
+
{ view: 'blade', reactivity: 'alpine', component_lib: 'none', css: 'tailwind', meta: 'none' },
|
|
63
|
+
{ view: 'blade', reactivity: 'unknown', component_lib: 'none', css: 'none', meta: 'filament' },
|
|
64
|
+
{ view: 'jsx', reactivity: 'react', component_lib: 'radix', css: 'tailwind', meta: 'none' },
|
|
65
|
+
{ view: 'jsx', reactivity: 'react', component_lib: 'none', css: 'tailwind', meta: 'nextjs' },
|
|
66
|
+
{ view: 'vue-sfc', reactivity: 'vue', component_lib: 'none', css: 'none', meta: 'nuxt' },
|
|
67
|
+
{ view: 'svelte-sfc', reactivity: 'svelte', component_lib: 'none', css: 'none', meta: 'none' },
|
|
68
|
+
{ view: 'astro', reactivity: 'unknown', component_lib: 'none', css: 'none', meta: 'astro' },
|
|
69
|
+
{ view: 'angular-html', reactivity: 'angular', component_lib: 'none', css: 'none', meta: 'none' },
|
|
70
|
+
{ view: 'unknown', reactivity: 'htmx', component_lib: 'none', css: 'none', meta: 'none' },
|
|
71
|
+
{ view: 'none', reactivity: 'none', component_lib: 'none', css: 'tailwind', meta: 'none' },
|
|
72
|
+
];
|
|
73
|
+
|
|
50
74
|
function skill_path(name: string): string {
|
|
51
75
|
return path.join(SKILLS_DIR, name, 'SKILL.md');
|
|
52
76
|
}
|
|
@@ -137,6 +161,13 @@ function main(): number {
|
|
|
137
161
|
check_lane(lane, STACK_BUNDLES[lane] as StackBundle);
|
|
138
162
|
}
|
|
139
163
|
|
|
164
|
+
// The composed shape, not just the hand-written lanes. Dispatch derives a
|
|
165
|
+
// bundle from axes now, so a combination nobody wrote down by hand can
|
|
166
|
+
// still be produced — and it has to satisfy the same two properties.
|
|
167
|
+
for (const combo of _AXIS_COMBOS) {
|
|
168
|
+
check_lane(`composed(${JSON.stringify(combo)})`, compose_bundle(combo));
|
|
169
|
+
}
|
|
170
|
+
|
|
140
171
|
// A lane usable as a fallback must be pack-agnostic, else the fallback
|
|
141
172
|
// itself is the thing that fails for an unpredictable consumer.
|
|
142
173
|
const plain = STACK_BUNDLES['plain'];
|