@antelopejs/tooling-configs 0.2.18 → 0.3.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/README.md +12 -7
- package/dist/bin/capture.mjs +1 -1
- package/dist/bin/checks.mjs +22 -4
- package/dist/bin/garden.mjs +231 -31
- package/dist/bin/lease.d.mts +1 -0
- package/dist/bin/lease.mjs +1053 -0
- package/dist/bin/sync.mjs +50 -45
- package/dist/bin/verify.mjs +2404 -2756
- package/dist/{ci-workflow-ChW4He0r.mjs → ci-workflow-DVkpwauQ.mjs} +12 -0
- package/dist/verify/index.d.mts +2 -4
- package/package.json +2 -1
package/dist/bin/sync.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { t as runCli } from "../cli-4Tv71vYk.mjs";
|
|
|
7
7
|
import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
|
|
8
8
|
import { i as recordedRelease, t as measureBaseline } from "../ratchet-BAcLRYuM.mjs";
|
|
9
9
|
import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-C0SkPO5R.mjs";
|
|
10
|
-
import { a as MUTATION_PATH, c as MISSING_CHECKS_WORKFLOW, d as hasChecksWorkflow, l as ciNodeCallers, o as ciWorkflow, r as CI_PATH, s as mutationCaller, u as ciRenovateSyncCallers } from "../ci-workflow-
|
|
10
|
+
import { a as MUTATION_PATH, c as MISSING_CHECKS_WORKFLOW, d as hasChecksWorkflow, l as ciNodeCallers, o as ciWorkflow, r as CI_PATH, s as mutationCaller, u as ciRenovateSyncCallers } from "../ci-workflow-DVkpwauQ.mjs";
|
|
11
11
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
|
|
12
12
|
import { dirname, join, resolve } from "node:path";
|
|
13
13
|
import { execFileSync } from "node:child_process";
|
|
@@ -696,10 +696,26 @@ function planDocs(root, manager) {
|
|
|
696
696
|
for (const item of packages) planPackage(root, plan, locks.get(item.directory), standard, item);
|
|
697
697
|
return plan;
|
|
698
698
|
}
|
|
699
|
+
//#endregion
|
|
700
|
+
//#region src/guardrails/template-agent-layer.ts
|
|
701
|
+
/** The folders a project scaffolded from a template does not get, as `ajs project init` excludes them. */
|
|
702
|
+
const SCAFFOLD_EXCLUDED_PATHS = [".agents/", ".claude/skills/"];
|
|
703
|
+
/** Whether a scaffold lacks `path`, so a template's AGENTS.md, which every scaffold keeps, must not link it. */
|
|
704
|
+
function inScaffoldExcludedPath(path) {
|
|
705
|
+
return path !== void 0 && SCAFFOLD_EXCLUDED_PATHS.some((folder) => path.startsWith(folder));
|
|
706
|
+
}
|
|
707
|
+
/** The writing skills belong to the agent layer, which the template profile syncs only in the template source. */
|
|
708
|
+
function planWritingSkills(root, profile, kind) {
|
|
709
|
+
if (profile === "template" && kind !== "template") return {
|
|
710
|
+
actions: [],
|
|
711
|
+
errors: []
|
|
712
|
+
};
|
|
713
|
+
return planDocsSkills(root);
|
|
714
|
+
}
|
|
699
715
|
/** The kind-specific text of each shared skill. */
|
|
700
716
|
const KIND_TEXT = {
|
|
701
717
|
interface: {
|
|
702
|
-
description: "Drive this AntelopeJS interface the way a module author does: pack it, load it in `ajs project dev` next to a stub provider wired through ImplementInterface and a consumer, call every declared function through core, and check the minor-bump rule against the published version. Use to prove a change to the interface works before merge, to verify a PR
|
|
718
|
+
description: "Drive this AntelopeJS interface the way a module author does: pack it, load it in `ajs project dev` next to a stub provider wired through ImplementInterface and a consumer, call every declared function through core, and check the minor-bump rule against the published version. Use to prove a change to the interface works before merge, or to verify a PR.",
|
|
703
719
|
title: "Verify interface",
|
|
704
720
|
user: "The user of an interface is a module author: one module implements it, others import it and call its functions through core.",
|
|
705
721
|
launch: "`new` runs the setup (`pnpm run build` by default), then packs the interface with `pnpm pack` and extracts it, so journeys load what npm would publish, `files` and `exports` included. Every `services` entry of `verify.config.ts` then starts in its own Docker container on a free loopback port, as for a module.",
|
|
@@ -715,14 +731,10 @@ const KIND_TEXT = {
|
|
|
715
731
|
- \`interface.calls["<entry>:<path>"]\` calls a plain exported function from the consumer and states the value it must return.
|
|
716
732
|
- \`interface.providerSide["<entry>:<path>"]\` names a function only providers call, with the reason.`,
|
|
717
733
|
smoke: "`every-function`",
|
|
718
|
-
gotchas: [
|
|
719
|
-
"A function the consumer awaits forever, such as a getter no provider resolved, fails after 15 seconds with a `Timeout` value.",
|
|
720
|
-
"`minor-bump` needs the npm registry. Without it the journey is not verified, never passed.",
|
|
721
|
-
"A containment journey of a Data or Format door must check what that door's seeded patch changes, for example the arguments the stub provider logged. `containments` reports one that still passes with its door as `MISSED`."
|
|
722
|
-
]
|
|
734
|
+
gotchas: ["A function the consumer awaits forever, such as a getter no provider resolved, fails after 15 seconds with a `Timeout` value.", "`minor-bump` needs the npm registry. Without it the journey is not verified, never passed."]
|
|
723
735
|
},
|
|
724
736
|
module: {
|
|
725
|
-
description: "Drive this AntelopeJS implementation module the way an app developer does: install it as `local` in a fixture project, run its backing services in Docker on free ports, call its interfaces from a consumer module and read stored state back with the service's native client. Use to prove a change to the module works before merge, to verify a PR
|
|
737
|
+
description: "Drive this AntelopeJS implementation module the way an app developer does: install it as `local` in a fixture project, run its backing services in Docker on free ports, call its interfaces from a consumer module and read stored state back with the service's native client. Use to prove a change to the module works before merge, or to verify a PR.",
|
|
726
738
|
title: "Verify module",
|
|
727
739
|
user: "The user of a module is an app developer: they add it to `antelope.config.ts`, configure it, and other modules call the interfaces it implements.",
|
|
728
740
|
launch: "`new` runs the setup (`pnpm run build` by default), then starts every `services` entry of `verify.config.ts` in its own Docker container on a free loopback port, named `<prefix>-<repo>-<service>-<run>` (`VERIFY_CONTAINER_PREFIX`, default `verify`), and waits for each readiness command. A provider with sandbox keys in `saas.env` records the missing ones.",
|
|
@@ -732,14 +744,10 @@ const KIND_TEXT = {
|
|
|
732
744
|
- \`saas: { env, sandbox }\`: a SaaS module runs against the provider's sandbox with keys from these environment variables. Without every key, each journey is NOT VERIFIED and so is the verdict, never PASS or PASS+NOTES.
|
|
733
745
|
- \`journeys\`: the module's own journeys. Each writes through the module with \`context.call(...)\` and reads the result back with \`context.native(...)\` (\`redis-cli\`, \`mongosh\`, \`psql\`, the Mailpit API) inside the service container.`,
|
|
734
746
|
smoke: "`module-dev` and one write read back through the native client",
|
|
735
|
-
gotchas: [
|
|
736
|
-
"Every container is the run's own. Never point a journey at a shared instance such as a developer's local database.",
|
|
737
|
-
"A sandbox key missing from the environment is a NOT VERIFIED verdict, which sets status `verify` to `error`.",
|
|
738
|
-
"A containment journey of a Data or Format door must read back, through the native client, the state that door's seeded patch corrupts. `containments` reports one that still passes with its door as `MISSED`."
|
|
739
|
-
]
|
|
747
|
+
gotchas: ["Every container is the run's own. Never point a journey at a shared instance such as a developer's local database.", "A sandbox key missing from the environment is a NOT VERIFIED verdict, which sets status `verify` to `error`."]
|
|
740
748
|
},
|
|
741
749
|
template: {
|
|
742
|
-
description: "Drive this AntelopeJS template the way a new user does: scaffold a project with `ajs project init` from an offline interfaces manifest, install it, run its own `pnpm run checks`, run `ajs project dev --watch` and hit its welcome page, endpoint or ready line. Use to prove a change to the template works before merge, to verify a PR, to run the release canary
|
|
750
|
+
description: "Drive this AntelopeJS template the way a new user does: scaffold a project with `ajs project init` from an offline interfaces manifest, install it, run its own `pnpm run checks`, run `ajs project dev --watch` and hit its welcome page, endpoint or ready line. Use to prove a change to the template works before merge, to verify a PR, or to run the release canary.",
|
|
743
751
|
title: "Verify template",
|
|
744
752
|
user: "The user of a template is someone running `ajs project init --template`: they get a copy of the whole repository and expect it to install, pass its checks and run.",
|
|
745
753
|
launch: "`new` copies the working tree, uncommitted changes included, into a local git repository, and lists it in an offline interfaces manifest (`templates`, or `projectTemplates` when `template.project` is set) under `template.name`. Journeys point `ajs config set git` at it, so no step reaches GitHub. Every `services` entry of `verify.config.ts` then starts in its own Docker container on a free loopback port, as for a module.",
|
|
@@ -750,11 +758,7 @@ const KIND_TEXT = {
|
|
|
750
758
|
- \`services\`: image, port, readiness command and \`reset\`, as for a module. \`new\` starts them in Docker on free ports; a journey reads them with \`context.service(name)\` and \`context.native(...)\` and passes their endpoints to the project it starts through the \`env\` of \`context.dev\`.
|
|
751
759
|
- \`template.probe\`: \`path\`, \`status\` and \`body\` for an HTTP welcome page or endpoint, or \`log\` and \`settleMs\` for a template that serves nothing.`,
|
|
752
760
|
smoke: "`scaffold-dev` and `scaffold-checks`",
|
|
753
|
-
gotchas: [
|
|
754
|
-
"`ajs` copies the whole repository, `.agents/` and `.claude/` included, so the scaffolded project carries this skill too.",
|
|
755
|
-
"Every file a user gets is user-facing here, tests included; only `.agents/`, `.claude/` and `.github/` are not.",
|
|
756
|
-
"A containment journey of a Data or Format door must check the scaffolded files or endpoint that door's seeded patch changes. `containments` reports one that still passes with its door as `MISSED`."
|
|
757
|
-
]
|
|
761
|
+
gotchas: ["`ajs` copies the whole repository, `.agents/` and `.claude/` included, so the scaffolded project carries this skill too.", "Every file a user gets is user-facing here, tests included; only `.agents/`, `.claude/` and `.github/` are not."]
|
|
758
762
|
}
|
|
759
763
|
};
|
|
760
764
|
//#endregion
|
|
@@ -820,24 +824,23 @@ ${BIN} clean <run>
|
|
|
820
824
|
## The repository's own layer
|
|
821
825
|
|
|
822
826
|
- \`verify.config.ts\` default-exports a \`VerifyConfig\` from \`@antelopejs/tooling-configs/verify\`:
|
|
823
|
-
- \`doors\`: one entry per door kind (\`data\`, \`format\`, \`contract\`, \`outbound\`, \`exposure\`, \`publish\`), each \`null\` when it cannot apply or \`{ globs, funnels,
|
|
824
|
-
- \`journeys\`: the repository's journeys by id, each \`{ title, entryPoint, run(context) }\`, using the check helpers the same import exports. A check states what the product must do; an environment that went away is never a failing check. When a journey fails, the harness reruns each service's readiness command, up to four times over about 3.5 s, and looks at every \`ajs project dev\` the journey started, its own readiness probe included. The journey ends NOT VERIFIED, not FAIL, when a service still fails every rerun, an app was killed by SIGKILL, SIGTERM, SIGHUP or SIGINT that the harness did not send, or the app the harness started failed to bind the port the harness gave it (\`EADDRINUSE\` naming that port). An app that exits on its own with an exit code, one that crashes by another signal such as SIGABRT or SIGSEGV, and one that logs \`EADDRINUSE\` for any other port are the product's failure. A
|
|
827
|
+
- \`doors\`: one entry per door kind (\`data\`, \`format\`, \`contract\`, \`outbound\`, \`exposure\`, \`publish\`), each \`null\` when it cannot apply or \`{ globs, funnels, why }\`.
|
|
828
|
+
- \`journeys\`: the repository's journeys by id, each \`{ title, entryPoint, run(context) }\`, using the check helpers the same import exports. A check states what the product must do; an environment that went away is never a failing check. When a journey fails, the harness reruns each service's readiness command, up to four times over about 3.5 s, and looks at every \`ajs project dev\` the journey started, its own readiness probe included. The journey ends NOT VERIFIED, not FAIL, when a service still fails every rerun, an app was killed by SIGKILL, SIGTERM, SIGHUP or SIGINT that the harness did not send, or the app the harness started failed to bind the port the harness gave it (\`EADDRINUSE\` naming that port). An app that exits on its own with an exit code, one that crashes by another signal such as SIGABRT or SIGSEGV, and one that logs \`EADDRINUSE\` for any other port are the product's failure. A change that takes its own service down still reads as an outage: the service stays down, so the journey is NOT VERIFIED. For anything else the journey depends on, such as a process it started with \`context.command\` or an outside endpoint, probe it when a check fails and call \`context.notVerified(reason)\` when it no longer answers.
|
|
825
829
|
- \`env\`, \`setup\` (commands replacing the build), \`userFacing\` (globs replacing the kind's default) and \`formal\` (formal checks: \`name\`, \`covers\`, \`command\`, \`violation\`, and optionally \`behaviour\` and \`baseCommand\`).
|
|
826
830
|
${text.layer}
|
|
831
|
+
- \`features/README.md\`: the index of the features; \`map\` does not read it as a feature.
|
|
827
832
|
- \`features/<feature>.md\`: frontmatter lists \`covers:\` (source globs), \`docs:\` (pages a verdict judges) and \`journeys:\`, then the sections Sub-features, How to get to it (user POV), Driving it with antelopejs-verify, and Gotchas. \`features/smoke.md\` covers nothing and runs on every verdict; here it runs ${text.smoke}.
|
|
828
|
-
- \`seeded-breaks/<feature>.patch\`: one minimal product bug per feature that its journeys must catch.
|
|
829
|
-
- \`seeded-doors/<kind>.patch\`: one change per door kind that applies. A Data or Format door's patch must break what its containment journeys check.
|
|
830
833
|
|
|
831
834
|
\`\`\`bash
|
|
832
835
|
${BIN} map
|
|
833
836
|
\`\`\`
|
|
834
837
|
|
|
835
|
-
\`map\` fails on a user-facing file no feature covers, a feature without journeys
|
|
838
|
+
\`map\` fails on a user-facing file no feature covers, a feature without journeys or docs, an unknown journey, and a \`verify.config.ts\` journey no feature names.
|
|
836
839
|
|
|
837
840
|
## Verdict rules
|
|
838
841
|
|
|
839
842
|
1. **Run every feature whose \`covers:\` globs the diff touches, plus \`smoke\`.** \`plan\` prints that list as \`run\`.
|
|
840
|
-
2. **An unmapped surface fails the verdict.** A changed user-facing file no feature covers needs a feature entry
|
|
843
|
+
2. **An unmapped surface fails the verdict.** A changed user-facing file no feature covers needs a feature entry and its journeys in the same PR.
|
|
841
844
|
3. **Every registered journey of a feature in \`run\` must have run and passed.** Run whole features. A journey that could not reach the product, or whose environment went away during it, is NOT VERIFIED, and so is the verdict, whatever else passed: never PASS and never PASS+NOTES. Every journey result in the run's evidence counts, also for a feature outside \`run\`: a failed one fails the verdict, because it shows a \`covers:\` glob that misses what the diff broke. A NOT VERIFIED one outside \`run\` is listed under Not verified and caps the result at PASS+NOTES. A journey outside \`run\` that never ran is not required.
|
|
842
845
|
4. **Docs.** Judge every \`docs:\` page of a touched feature against what the journeys showed. A stale page fails the verdict.
|
|
843
846
|
5. **Formal checks.** \`${BIN} formal <run>\` runs every formal check of \`verify.config.ts\` that covers the diff, or whose own \`files\` the diff changes, and records it under \`evidence/formal/<name>/\`. For each one it decides, without judgement, whether the diff changed what the covered code does. \`emit\` (the default) compares the structure of the covered files' JavaScript on the base and on HEAD: node kinds, names and literal values, leaving out types, comments, formatting, parentheses and \`export\` keywords. Each use of an imported binding stands for its origin (the resolved module and the imported name), so an import retargeted to another module or alias counts as changed; a function declaration refers to the top-level variables and classes of its own file by file and name, so moving it next to a different variable of the same name counts as changed. Exports are keyed by the origin they export, so a re-export or an \`export { f as run }\` retargeted to another binding counts as changed. Each file must keep its top-level statements and its side-effect imports in order; function declarations, which are hoisted, may move between covered files with their imports. So a type-only edit, a reformat or a moved function declaration counts as unchanged, while reordering statements or moving any other statement counts as changed. \`emit\` judges behaviour, not the public surface: exports are the api-diff's job. \`probe\` runs the check's \`behaviour.command\` with a worktree of each commit and compares what it prints. Then:
|
|
@@ -846,7 +849,7 @@ ${BIN} map
|
|
|
846
849
|
- when the covered behaviour changed, or the diff changed the check's own \`files\`, \`formal\` also runs the check on the base (\`baseCommand\` when set). A rule the base broke counts as fixed only when HEAD reports it passing (\`passing\`); a rule the base broke that HEAD does not report at all fails the verdict. A change that leaves no violated rule passes.
|
|
847
850
|
|
|
848
851
|
The decision never reads the check's output, so a model whose rule names stay the same still fails on a changed behaviour. It is conservative: a local rename or an extracted helper counts as changed, and code outside \`covers\` is invisible to it. \`--all\` also runs the checks that do not cover the diff, without gating.
|
|
849
|
-
6. **One-way doors.** The section comes right after the result line and is mandatory. \`${BIN} doors\` prints the \`One-way-door:\` line of the diff. Every file the path rules flag needs a door row or a false positive with its reason.
|
|
852
|
+
6. **One-way doors.** The section comes right after the result line and is mandatory. \`${BIN} doors\` prints the \`One-way-door:\` line of the diff. Every file the path rules flag needs a door row or a false positive with its reason.
|
|
850
853
|
7. **Result.** FAIL if any rule fails. NOT VERIFIED when any journey of a required feature is NOT VERIFIED, for example a SaaS module run without its sandbox keys, however many other journeys passed. PASS+NOTES when everything required ran and passed but the judgement lists something no journey reached or something the owner should look at. PASS otherwise.
|
|
851
854
|
|
|
852
855
|
Write your judgement to \`<run>/evidence/judgement.json\`:
|
|
@@ -865,7 +868,7 @@ Write your judgement to \`<run>/evidence/judgement.json\`:
|
|
|
865
868
|
}
|
|
866
869
|
\`\`\`
|
|
867
870
|
|
|
868
|
-
A door row is \`{ "kind", "location", "irreversible", "containment"
|
|
871
|
+
A door row is \`{ "kind", "location", "irreversible", "containment" }\`, where \`containment\` says what limits the damage. Then render and publish:
|
|
869
872
|
|
|
870
873
|
\`\`\`bash
|
|
871
874
|
${BIN} verdict <run> --pr <n>
|
|
@@ -876,17 +879,7 @@ ${BIN} publish <run> --pr <n>
|
|
|
876
879
|
|
|
877
880
|
## Trust
|
|
878
881
|
|
|
879
|
-
The skill is not Trusted yet. It becomes Trusted when it
|
|
880
|
-
|
|
881
|
-
## Seeded breaks and doors
|
|
882
|
-
|
|
883
|
-
\`\`\`bash
|
|
884
|
-
${BIN} seeded <feature...>
|
|
885
|
-
${BIN} seeded-doors
|
|
886
|
-
${BIN} containments
|
|
887
|
-
\`\`\`
|
|
888
|
-
|
|
889
|
-
\`seeded\` runs each feature's journeys in a scratch worktree of HEAD without the patch, as the control, and with \`seeded-breaks/<feature>.patch\` applied. It prints \`CAUGHT\` only when a journey that passes in the control fails one of its checks with the patch. Journeys failing in the control, failures without a failing check and NOT VERIFIED journeys do not count. A break no journey caught is \`NOT VERIFIED\` when a journey could not reach the product in either run, for example because a service went away, and \`MISSED\` otherwise. The command exits 1 on anything but \`CAUGHT\`. \`seeded-doors\` prints \`FLAGGED\` when the path rules flag each patch with its own kind. \`containments\` runs every Data and Format containment journey in a scratch worktree of HEAD without the door, as the control, and with \`seeded-doors/<kind>.patch\` applied. It prints \`CONTAINED\` only when the journey passes in the control and fails one of its checks with the door. \`MISSED\` means it passes with its door, \`UNPROVEN\` that it fails in the control or ends without a failing check, and \`NO-DOOR\` that the kind has no seeded door; the command exits 1 on anything but \`CONTAINED\`.
|
|
882
|
+
The skill is not Trusted yet. It becomes Trusted when it passes a shadow run of 10 consecutive agent PRs and its last maintain pass is newer than the last change to the repository or its \`@antelopejs\` dependencies and at most 30 days old.
|
|
890
883
|
|
|
891
884
|
## Gotchas
|
|
892
885
|
|
|
@@ -956,8 +949,7 @@ function ownVerificationSkill(root) {
|
|
|
956
949
|
}
|
|
957
950
|
}
|
|
958
951
|
}
|
|
959
|
-
function inferKind(manifest
|
|
960
|
-
if (profile === "template") return "template";
|
|
952
|
+
function inferKind(manifest) {
|
|
961
953
|
const declared = manifest.antelopeJs;
|
|
962
954
|
if (declared?.kind === "interface" || declared?.kind === "module") return declared.kind;
|
|
963
955
|
if (Array.isArray(declared?.implements) && declared.implements.length > 0) return "module";
|
|
@@ -982,8 +974,12 @@ function resolveKind(root, flag, manifest, profile) {
|
|
|
982
974
|
kind: "custom",
|
|
983
975
|
errors
|
|
984
976
|
};
|
|
977
|
+
if (profile === "template") return {
|
|
978
|
+
kind: existsSync(join(root, skillFolder("template"))) ? "template" : void 0,
|
|
979
|
+
errors
|
|
980
|
+
};
|
|
985
981
|
return {
|
|
986
|
-
kind: inferKind(manifest
|
|
982
|
+
kind: inferKind(manifest),
|
|
987
983
|
errors
|
|
988
984
|
};
|
|
989
985
|
}
|
|
@@ -1045,7 +1041,11 @@ function planStaleKinds(root, keep) {
|
|
|
1045
1041
|
notes
|
|
1046
1042
|
};
|
|
1047
1043
|
}
|
|
1048
|
-
/**
|
|
1044
|
+
/**
|
|
1045
|
+
* Resolves the repository's verification kind and plans the synced layer; the repo-owned files are never touched.
|
|
1046
|
+
* The template profile infers no kind: a shared skill lives under `.agents`, which a project scaffolded from the template does not get,
|
|
1047
|
+
* so it is synced only where it already exists, as `verify-template` does in the template source, or where `--verify` asks for it.
|
|
1048
|
+
*/
|
|
1049
1049
|
function planVerify(root, options) {
|
|
1050
1050
|
const { kind, errors } = resolveKind(root, options.flag, options.manifest, options.profile);
|
|
1051
1051
|
const shared = kind !== void 0 && kind !== "custom" ? kind : void 0;
|
|
@@ -1292,7 +1292,7 @@ function repositoryContext(root, current, profile, verificationSkill) {
|
|
|
1292
1292
|
suppressionBudget: profile === "full" ? adoptedBudget(root, current.get(SUPPRESSIONS_FILE)) : "",
|
|
1293
1293
|
packageName: manifest.name ?? "",
|
|
1294
1294
|
managesCi: current.has(".github/workflows/ci.yml") || !hasChecksWorkflow(root),
|
|
1295
|
-
verificationSkill,
|
|
1295
|
+
verificationSkill: profile === "template" && inScaffoldExcludedPath(verificationSkill) ? void 0 : verificationSkill,
|
|
1296
1296
|
glossary: ["GLOSSARY.md", "docs/GLOSSARY.md"].find((file) => existsSync(join(root, file))),
|
|
1297
1297
|
docs: profile === "full" && current.has("package.json") ? planDocs(root, manager) : void 0
|
|
1298
1298
|
};
|
|
@@ -1312,7 +1312,12 @@ function repositoryNotices(root, context) {
|
|
|
1312
1312
|
if (context.ratchet && isRetired(readCeilings(root))) notices.push(RETIRED_RATCHET);
|
|
1313
1313
|
return notices;
|
|
1314
1314
|
}
|
|
1315
|
-
/**
|
|
1315
|
+
/**
|
|
1316
|
+
* Measures debt only on first adoption, before sync has written the sync:check script; retired repositories stay retired.
|
|
1317
|
+
* Under the template profile the agent layer, `verify-template` and the writing skills, is synced only in the template source,
|
|
1318
|
+
* marked by its `.agents/skills/verify-template` folder or chosen with `--verify template`, because a scaffold ships without it,
|
|
1319
|
+
* and the AGENTS.md block, which a scaffold keeps, links no skill under it.
|
|
1320
|
+
*/
|
|
1316
1321
|
function syncRepository(root, options = {}) {
|
|
1317
1322
|
const profile = options.profile ?? "full";
|
|
1318
1323
|
const { current, modes } = repositorySnapshot(root);
|
|
@@ -1322,7 +1327,7 @@ function syncRepository(root, options = {}) {
|
|
|
1322
1327
|
manifest,
|
|
1323
1328
|
profile
|
|
1324
1329
|
});
|
|
1325
|
-
const writing =
|
|
1330
|
+
const writing = planWritingSkills(root, profile, verify.kind);
|
|
1326
1331
|
const actions = [...verify.actions, ...writing.actions];
|
|
1327
1332
|
const context = repositoryContext(root, current, profile, verify.verificationSkill);
|
|
1328
1333
|
const boundaries = backendBoundaryArtifacts(root);
|