simt-dev 0.2.1 → 0.2.2
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 +202 -0
- package/docs/decisions/ADR-064-the-context-meter-counts-what-the-tool-wrote.md +107 -0
- package/docs/decisions/ADR-065-a-pack-is-one-shared-rule-set-pinned-by-digest.md +97 -0
- package/docs/decisions/ADR-066-a-monorepo-projects-once-per-package.md +115 -0
- package/docs/decisions/ADR-067-which-harnesses-read-agents-md-is-a-column.md +110 -0
- package/docs/decisions/ADR-068-the-mcp-revision-list-cites-what-was-read.md +111 -0
- package/docs/decisions/ADR-069-the-conformance-lint-checks-the-published-specification.md +90 -0
- package/docs/decisions/ADR-070-the-json-payload-carries-its-own-version.md +91 -0
- package/docs/decisions/ADR-071-a-rule-that-can-be-narrowed-is-written-narrow.md +106 -0
- package/docs/decisions/ADR-072-the-budget-is-a-declaration-beside-the-gates.md +104 -0
- package/docs/decisions/ADR-073-a-kernel-is-a-smaller-projection-the-repository-asks-for.md +92 -0
- package/package.json +1 -1
- package/rules/core.md +1 -0
- package/rules/stacks/android.md +2 -0
- package/rules/stacks/cloudflare-workers.md +2 -0
- package/rules/stacks/connectiq.md +1 -0
- package/rules/stacks/container.md +2 -0
- package/rules/stacks/dart.md +2 -0
- package/rules/stacks/deno.md +2 -0
- package/rules/stacks/dotnet.md +2 -0
- package/rules/stacks/elixir.md +2 -0
- package/rules/stacks/go.md +2 -0
- package/rules/stacks/jvm.md +2 -0
- package/rules/stacks/node.md +2 -0
- package/rules/stacks/python.md +2 -0
- package/rules/stacks/react-native.md +2 -0
- package/rules/stacks/react-web.md +2 -0
- package/rules/stacks/ruby.md +2 -0
- package/rules/stacks/rust.md +2 -0
- package/rules/stacks/swift.md +2 -0
- package/rules/stacks/typescript.md +2 -0
- package/rules/stacks/uv.md +2 -0
- package/src/argv.mjs +19 -0
- package/src/commands/compare.mjs +15 -0
- package/src/commands/graph.mjs +45 -21
- package/src/commands/harness.mjs +150 -0
- package/src/commands/help.mjs +15 -1
- package/src/commands/index.mjs +43 -25
- package/src/commands/init.mjs +12 -8
- package/src/commands/mcp.mjs +20 -5
- package/src/commands/rules.mjs +42 -57
- package/src/commands/skills.mjs +67 -92
- package/src/commands/skillsinstall.mjs +17 -2
- package/src/commands/sync.mjs +62 -6
- package/src/commands/tokens.mjs +138 -0
- package/src/compare/row.mjs +73 -2
- package/src/graph/spec.mjs +227 -0
- package/src/graph/speccheck.mjs +68 -0
- package/src/hooks/dispatcher.mjs +35 -3
- package/src/mcp/schema.mjs +139 -0
- package/src/mcp/server.mjs +197 -20
- package/src/mcp/tools.mjs +288 -1
- package/src/measure/context.mjs +371 -0
- package/src/monorepo.mjs +339 -0
- package/src/output/index.mjs +78 -2
- package/src/packs.mjs +182 -0
- package/src/projection/manifest.mjs +88 -0
- package/src/projection/project.mjs +140 -9
- package/src/projection/rules.mjs +288 -20
- package/src/projection/surfaces.mjs +133 -15
- package/src/projection/targets.mjs +37 -0
|
@@ -136,6 +136,43 @@ export async function ruleTargets(root, rule, body, sha, resolved, notes) {
|
|
|
136
136
|
return { targets };
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Per-rule files for the profiles that left the region, for the surfaces that can
|
|
141
|
+
* narrow them.
|
|
142
|
+
*
|
|
143
|
+
* A scoped profile is an ordinary rule with a `scope` on it, and that is the whole
|
|
144
|
+
* reason this is a thin wrapper over {@link ruleTargets} rather than a second
|
|
145
|
+
* construction: the byte-level concerns — frontmatter re-derived per surface, the
|
|
146
|
+
* region injected between the markers, the retired-prose note — are already decided
|
|
147
|
+
* there and must not be decided twice. A second implementation would drift from the
|
|
148
|
+
* first and the gate would report drift on a clean tree, which is the failure this
|
|
149
|
+
* module exists to prevent.
|
|
150
|
+
*
|
|
151
|
+
* The one thing it adds is the skip: a surface that folds the region carries the whole
|
|
152
|
+
* region already, so a scoped file is the duplication S12 removed — UNLESS the profile
|
|
153
|
+
* actually left the region, which is `narrowing`, the caller's answer, and which means
|
|
154
|
+
* the reader would otherwise get nothing.
|
|
155
|
+
*/
|
|
156
|
+
export async function scopedTargets(root, rules, sha, resolved, notes) {
|
|
157
|
+
const targets = [];
|
|
158
|
+
for (const rule of rules) {
|
|
159
|
+
// `alwaysApply: false` is what asks the surface to attach the file on the patterns
|
|
160
|
+
// rather than always. Cursor's documented reading of no description plus no globs is
|
|
161
|
+
// a manual @-mention, so a scoped rule carries its scope and the description it
|
|
162
|
+
// already had.
|
|
163
|
+
// `target` is what `ruleName` reads, and a stack profile has none: it is a plain
|
|
164
|
+
// `python.md`, not an `.mdc` in the rules directory. Without it the file is named
|
|
165
|
+
// `null.mdc`, which is exactly what the first version of this did.
|
|
166
|
+
const scoped = {
|
|
167
|
+
...rule,
|
|
168
|
+
target: rule.target ?? `${rule.id}.mdc`,
|
|
169
|
+
alwaysApply: false,
|
|
170
|
+
scope: rule.scope,
|
|
171
|
+
};
|
|
172
|
+
targets.push(...(await ruleTargets(root, scoped, rule.body, sha, resolved, notes)).targets);
|
|
173
|
+
}
|
|
174
|
+
return { targets };
|
|
175
|
+
}
|
|
139
176
|
|
|
140
177
|
/**
|
|
141
178
|
* Pointer targets: `CLAUDE.md` and `GEMINI.md` as symlinks to `AGENTS.md`.
|