amsd-pipeline-shared 0.5.40 → 0.5.41

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.
@@ -9,22 +9,23 @@
9
9
  "",
10
10
  "Live 2026-08-17: the survey reported a codeline in_scope on a file that codeline does not",
11
11
  "have, and an implementer was briefed to apply that codeline's fix in a repository with no",
12
- "such code. A validator was written to strip false paths, and it SILENTLY REWROTE the survey \u2014",
12
+ "such code. A validator was written to strip false paths, and it SILENTLY REWROTE the survey —",
13
13
  "worse than reporting, and removed. A generated prompt already gets an adversarial reviewer",
14
14
  "before anything inherits it (prompt-review); the survey needs the same and had none.",
15
15
  "",
16
16
  "SCOPE IS DELIBERATELY NARROW, for the reason prompt-review's is: it judges CHECKABLE CLAIMS",
17
17
  "ABOUT THE REPOSITORIES, never whether the survey looked hard enough or chose well. A reviewer",
18
- "invited to improve judgement rewrites correct surveys."
18
+ "invited to improve judgement rewrites correct surveys.",
19
+ "v2 (run 14, 2026-10-24): read INSIDE the mint before any project prompt exists (the estate survey's review; the mint's test-ownership policy), so a never-minted project could not be minted. Bootstrap layer: rendered from the template there, as the registry's bootstrap seams are; the builder still makes the project's own copy for the seams that read it later."
19
20
  ],
20
21
  "id": "survey-review",
21
- "version": 1,
22
- "layer": "project",
22
+ "version": 2,
23
+ "layer": "bootstrap",
23
24
  "description": "Falsifies what an estate survey claims about the codelines, before a roster is minted from it.",
24
25
  "seams": [
25
26
  "survey-review"
26
27
  ],
27
- "body": "You are reviewing an ESTATE SURVEY. A roster of agents is about to be minted from it, and every\nclaim below will be inherited as a brief and re-checked by nothing.\n\nTHE SURVEY UNDER REVIEW:\n__SURVEY_BLOCK__\n\nTHE CODELINES IN SCOPE, and where each is checked out:\n__CODELINE_BLOCK__\n\nTHE WORK THE PROJECT WAS ASKED TO DO:\n__TICKET_BLOCK__\n\n__TOOL_LINE__\n\n# What is in scope\n\nONE QUESTION ONLY: does the survey state anything about these repositories that is FALSE?\n\nA claim is in scope when you can check it by opening a repository. Open them and check.\n\n- a file named in `filesRead` that the codeline does not contain\n- a file, module, function or symbol said to exist where it does not\n- a claim attributed to the WRONG codeline \u2014 the commonest and most damaging error, because the\n brief built from it sends an implementer into a repository that has no such code\n- a dependency, script, framework or command the codeline does not declare\n- a codeline reported in_scope on evidence that belongs to a different one\n\nA codeline reported no_work_found or not_investigated is making a WEAK claim, not a false one.\nCheck it only if you can show the work plainly does reach it.\n\n# What is NOT in scope\n\nDo not judge whether the survey looked hard enough, chose the right focus, or recommended the\nright team. Do not propose better wording. Do not supply a FIX SITE of your own \u2014 naming which\nfile to edit is not yours to say here any more than it was the surveyor's, and a fix site you add\nfor a repository you swept from the outside is how one codeline's file ends up in another's work.\n\n# Evidence\n\nFor each finding, say what you CHECKED and what you FOUND, naming the repository and the path you\nopened. A finding without a check is an opinion, and an opinion about a survey is not a defect.\n\nIf every claim checks out, return no findings. An empty finding list from a review that RAN is the\ncorrect answer for a sound survey.\n",
28
+ "body": "You are reviewing an ESTATE SURVEY. A roster of agents is about to be minted from it, and every\nclaim below will be inherited as a brief and re-checked by nothing.\n\nTHE SURVEY UNDER REVIEW:\n__SURVEY_BLOCK__\n\nTHE CODELINES IN SCOPE, and where each is checked out:\n__CODELINE_BLOCK__\n\nTHE WORK THE PROJECT WAS ASKED TO DO:\n__TICKET_BLOCK__\n\n__TOOL_LINE__\n\n# What is in scope\n\nONE QUESTION ONLY: does the survey state anything about these repositories that is FALSE?\n\nA claim is in scope when you can check it by opening a repository. Open them and check.\n\n- a file named in `filesRead` that the codeline does not contain\n- a file, module, function or symbol said to exist where it does not\n- a claim attributed to the WRONG codeline — the commonest and most damaging error, because the\n brief built from it sends an implementer into a repository that has no such code\n- a dependency, script, framework or command the codeline does not declare\n- a codeline reported in_scope on evidence that belongs to a different one\n\nA codeline reported no_work_found or not_investigated is making a WEAK claim, not a false one.\nCheck it only if you can show the work plainly does reach it.\n\n# What is NOT in scope\n\nDo not judge whether the survey looked hard enough, chose the right focus, or recommended the\nright team. Do not propose better wording. Do not supply a FIX SITE of your own — naming which\nfile to edit is not yours to say here any more than it was the surveyor's, and a fix site you add\nfor a repository you swept from the outside is how one codeline's file ends up in another's work.\n\n# Evidence\n\nFor each finding, say what you CHECKED and what you FOUND, naming the repository and the path you\nopened. A finding without a check is an opinion, and an opinion about a survey is not a defect.\n\nIf every claim checks out, return no findings. An empty finding list from a review that RAN is the\ncorrect answer for a sound survey.\n",
28
29
  "placeholders": [
29
30
  "__CODELINE_BLOCK__",
30
31
  "__SURVEY_BLOCK__",
@@ -34,5 +35,5 @@
34
35
  "mayBeEmpty": [
35
36
  "__SURVEY_BLOCK__"
36
37
  ],
37
- "$whyMayBeEmpty": "Declared 2026-08-27 by sweeping the CLASS rather than the instance, after three runs died on it one placeholder at a time. Every call site for these writes an explicit empty branch \u2014 the story is not being split, attempt one carries no forced-retry note, no documentation was fetched, the persona prefix is optional \u2014 so absence is a real state, which is the renderer's own test. Placeholders supplied by a lookup that may FAIL (`x || ''`) are deliberately NOT here: for those, empty means broken, and declaring them would hide the blank-brief defect the renderer exists to surface. Unanimity is required \u2014 one deliberate branch among several defensive lookups is not a licence."
38
+ "$whyMayBeEmpty": "Declared 2026-08-27 by sweeping the CLASS rather than the instance, after three runs died on it one placeholder at a time. Every call site for these writes an explicit empty branch — the story is not being split, attempt one carries no forced-retry note, no documentation was fetched, the persona prefix is optional — so absence is a real state, which is the renderer's own test. Placeholders supplied by a lookup that may FAIL (`x || ''`) are deliberately NOT here: for those, empty means broken, and declaring them would hide the blank-brief defect the renderer exists to surface. Unanimity is required — one deliberate branch among several defensive lookups is not a licence."
38
39
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "test-ownership",
3
- "layer": "project",
4
- "version": 1,
3
+ "layer": "bootstrap",
4
+ "version": 2,
5
5
  "description": "Who owns the tests. ONE policy per MODE, rendered into the mint (what a brief may claim), the writer and the reviewer, so no agent holds a belief another contradicts.",
6
6
  "$why": [
7
7
  "This lived as a heredoc in claude.sh — the WRITER's prompt builder — and nowhere else.",
@@ -23,7 +23,8 @@
23
23
  "spec-mode-runner.js ('a dedicated agent of this pipeline writes the tests'), so every greenfield brief",
24
24
  "disowned its stories' test files; the roster reviewer then found, correctly, that no stage in a greenfield",
25
25
  "run authors feature tests, and blocked the roster on every cycle. In greenfield the implementer owns the",
26
- "test files its stories declare. The mode picks the body; the mint renders it from here."
26
+ "test files its stories declare. The mode picks the body; the mint renders it from here.",
27
+ "v2 (run 14, 2026-10-24): read INSIDE the mint before any project prompt exists (the estate survey's review; the mint's test-ownership policy), so a never-minted project could not be minted. Bootstrap layer: rendered from the template there, as the registry's bootstrap seams are; the builder still makes the project's own copy for the seams that read it later."
27
28
  ],
28
29
  "placeholders": [],
29
30
  "bodies": {
@@ -202,6 +202,10 @@ function templateLayerOf(id) {
202
202
  try {
203
203
  const own = JSON.parse(fs.readFileSync(path.join(templatesDir(), `${id}.json`), 'utf8'));
204
204
  if (own && own.layer === 'project') return 'project';
205
+ // A TEMPLATE THAT DECLARES ITSELF BOOTSTRAP runs inside the mint, before this project's prompt layer exists (survey-review,
206
+ // test-ownership: read by the estate survey and the roster mint), and renders from the template as the registry's bootstrap
207
+ // seams do — run 14, 2026-10-24: a project never minted could not be minted ("project-authority prompt missing")
208
+ if (own && own.layer === 'bootstrap') return 'bootstrap';
205
209
  } catch { /* no template of that id here: the registry decides, as before */ }
206
210
  const registryPath = path.join(__dirname, '..', '..', 'agents', 'invocation-profiles.json');
207
211
  let reg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "amsd-pipeline-shared",
3
- "version": "0.5.40",
3
+ "version": "0.5.41",
4
4
  "description": "The AMSD pipeline's shared components, one source for the bash pipeline and its Claude workflows: the model-call gateway (llm-handler.sh — retry, ladder, self-heal, cost) and the libraries it runs.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {