halfcycle 0.3.33 → 0.3.35

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halfcycle",
3
- "version": "0.3.33",
3
+ "version": "0.3.35",
4
4
  "description": "Halfcycle Method bundle — resolution-stub slash commands, remote method-delivery registration, and governance-hook wiring for a Halfcycle engagement repo. It ships NO worker role files: a project's roles are authored from that project's own recorded decisions at orchestration kickoff (FX-2, W3-F-27).",
5
5
  "commands": [
6
6
  {
package/dist/bin.js CHANGED
@@ -4457,9 +4457,10 @@ function counted(n, one, many) {
4457
4457
  return `${String(n)} ${n === 1 ? one : many}`;
4458
4458
  }
4459
4459
  var TITLE_PREFIX = "# Build Record: ";
4460
- var HEADER_WHAT = "This is the Build Record for one phase of a software project run with the Halfcycle method. A phase is a stage of the work with an agreed finish line; this record says how this one ended.";
4461
- var HEADER_REGISTERS = "Two kinds of content are kept apart here. Lines under **Observed by Halfcycle** come from Halfcycle's own records, made as the work happened. Lines under **Stated by the client** are quoted, and are the client's own word: Halfcycle did not check them. Halfcycle witnessed the method being run. The client attests the code.";
4462
- var HEADER_KEPT = "Halfcycle derived this record and kept it when the phase closed, and changes it afterwards in one way only: if an account that closed this phase is later deleted, its email is removed, and so is the name given at any close Halfcycle recorded as made by that account. The client's Halfcycle command-line tool wrote this file from that kept copy when the phase closed or when it was fetched again, so a later deletion changes the kept copy and reaches this file at the next fetch; the same record, as data, is in the .json file of the same name beside this one. If the phase is closed again, this file is replaced by a new record that describes every close, this one included.";
4460
+ var HEADER_WHAT = "This is the Build Record for one phase of a software project run with the Halfcycle method. The Halfcycle method is a way of building software that Halfcycle runs inside the project's AI coding agent: it works out what is being built, plans the work, reviews it, and checks it as it is built. A phase is one stage of that work. Its finish conditions are the tests of done set out in the phase's plan; this record does not list them. This record says how this phase ended.";
4461
+ var HEADER_REGISTERS = "The client is the person or team running this project. Halfcycle is the service that supplies the method and runs the checks. Two kinds of content are kept apart here. Lines under **Observed by Halfcycle** come from Halfcycle's own records, made as the work happened. Lines under **Stated by the client** are quoted, and are the client's own word: Halfcycle did not check them. Halfcycle witnessed the method being run. The client attests the code.";
4462
+ var HEADER_CHECKS = "Halfcycle's checks are automatic rules drawn from the ways real software builds break. They are set up to run each time the project's AI coding agent edits a file. A check that finds something either warns or stops the work, depending on how serious it is.";
4463
+ var HEADER_KEPT = "Halfcycle derived this record and kept a copy of it when the phase closed. It changes that copy afterwards in one way only. If an account that closed this phase is later deleted, its email is removed, and so is the name given at any close Halfcycle recorded as made by that account. The client's Halfcycle command-line tool wrote this file from the kept copy, when the phase closed or when the record was fetched again. So a later deletion reaches this file the next time the record is fetched. The same record, as data, is in the .json file of the same name beside this one. If the phase is closed again, this file is replaced by a new record that describes every close, this one included.";
4463
4464
  var HEADER_HIDDEN = "Some text in this record contains characters that do not print. Each is shown as U+ and its code of four or more hex digits; the .json file holds the text exactly.";
4464
4465
  var OBSERVED_LABEL = "**Observed by Halfcycle**";
4465
4466
  var STATED_LABEL = "**Stated by the client** \u2014 Halfcycle did not check these.";
@@ -4515,11 +4516,18 @@ function renderCouldNotRun(entries, p) {
4515
4516
  }
4516
4517
  return lines.join("\n");
4517
4518
  }
4518
- function headline(observed, attested) {
4519
+ function headline(observed, attested, checks) {
4519
4520
  const met = attested.decision === "done-when-met";
4521
+ const problemsReported = attested.walk !== null && attested.walk.verdict === "defects";
4520
4522
  switch (observed.crossed.kind) {
4521
4523
  case "none":
4522
- return met ? "**Closed cleanly.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met." : "**Closed by override.** Halfcycle saw nothing outstanding, and the person closing the phase chose to override rather than state its finish conditions were met.";
4524
+ if (!met) {
4525
+ return "**Closed by override.** Halfcycle saw nothing outstanding, and the person closing the phase chose to override rather than state its finish conditions were met.";
4526
+ }
4527
+ if (problemsReported) {
4528
+ return "**Closed with problems reported.** Halfcycle saw nothing outstanding, and the person closing the phase reported problems found in its acceptance walk.";
4529
+ }
4530
+ return checks === "not-observed" ? "**Closed with nothing outstanding, but no checks ran.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met, but Halfcycle has no record of any check running during this phase, so this is not a clean result." : "**Closed cleanly.** Halfcycle saw nothing outstanding, and the person closing the phase stated its finish conditions were met.";
4523
4531
  case "unfinished-steps":
4524
4532
  case "clean-over-findings":
4525
4533
  return met ? "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase stated its finish conditions were met anyway." : "**Closed over outstanding work.** Halfcycle saw work still outstanding, and the person closing the phase chose to override it.";
@@ -4561,12 +4569,12 @@ function outstanding(crossed, p) {
4561
4569
  }
4562
4570
  }
4563
4571
  function machines(coverage) {
4564
- const label = "- Machines signed in on this project at the close: ";
4572
+ const label = "- Computers signed in to Halfcycle for this project when the phase closed: ";
4565
4573
  if (coverage === null)
4566
4574
  return `${label}not recorded.`;
4567
4575
  if (coverage.enrolled === 0)
4568
4576
  return `${label}none.`;
4569
- return `${label}${String(coverage.enrolled)}, of which ${String(coverage.conformant)} had Halfcycle's checks working as set up.`;
4577
+ return `${label}${String(coverage.enrolled)}. Of these, ${String(coverage.conformant)} had reported Halfcycle's checks as fully set up.`;
4570
4578
  }
4571
4579
  function walkLines(walk, p) {
4572
4580
  const label = "> - Acceptance walk (the finished work tried as a user would, by someone other than its builder): ";
@@ -4607,10 +4615,10 @@ function renderStated(attested, p) {
4607
4615
  }
4608
4616
  return lines.join("\n");
4609
4617
  }
4610
- function renderClose(heading, observed, attested, p) {
4618
+ function renderClose(heading, observed, attested, checks, p) {
4611
4619
  return [
4612
4620
  heading,
4613
- headline(observed, attested),
4621
+ headline(observed, attested, checks),
4614
4622
  OBSERVED_LABEL,
4615
4623
  [
4616
4624
  `- Closed at: ${closedAtText(observed.closedAt, p)}`,
@@ -4639,21 +4647,21 @@ function renderBuildRecordV2Markdown(record2) {
4639
4647
  `Phase: ${phase} (the name the client gave it)`,
4640
4648
  OBSERVED_LABEL,
4641
4649
  [
4642
- `- Method version: ${p.text(record2.observed.methodVersion)}. This is the version of the Halfcycle method the project was run under; it does not change during a project.`,
4643
- `- Halfcycle's reference for this project: ${p.text(record2.observed.engagementId)}`,
4644
- `- Record format: ${p.text(record2.format)}`
4650
+ `- Method version: ${p.text(record2.observed.methodVersion)}. The Halfcycle method is updated from time to time, and each update has its own version number. This is the one the project was run under; it does not change during a project.`,
4651
+ `- Project identifier: ${p.text(record2.observed.engagementId)}. Halfcycle keeps this project's records under this identifier.`,
4652
+ `- Record format: ${p.text(record2.format)}. This names the layout this file and the .json file beside it follow, for software that reads them.`
4645
4653
  ].join("\n"),
4646
4654
  total === 1 ? "This phase was closed once." : `This phase was closed ${String(total)} times. The latest close is described first; each earlier close follows, as it was recorded when it was made.`,
4647
4655
  ...renderChecks(record2.observed.checks, p),
4648
- ...renderClose(total === 1 ? "## The close" : `## The latest close (close ${String(latest.sequence)} of ${String(total)})`, latest, attestedBySequence.get(latest.sequence), p)
4656
+ ...renderClose(total === 1 ? "## The close" : `## The latest close (close ${String(latest.sequence)} of ${String(total)})`, latest, attestedBySequence.get(latest.sequence), record2.observed.checks.state, p)
4649
4657
  ];
4650
4658
  if (total > 1) {
4651
4659
  body.push("## Earlier closes");
4652
4660
  for (const close of closes.slice(0, -1)) {
4653
- body.push(...renderClose(`### Close ${String(close.sequence)} of ${String(total)}`, close, attestedBySequence.get(close.sequence), p));
4661
+ body.push(...renderClose(`### Close ${String(close.sequence)} of ${String(total)}`, close, attestedBySequence.get(close.sequence), record2.observed.checks.state, p));
4654
4662
  }
4655
4663
  }
4656
- const header = [`${TITLE_PREFIX}${phase}`, HEADER_WHAT, HEADER_REGISTERS, HEADER_KEPT];
4664
+ const header = [`${TITLE_PREFIX}${phase}`, HEADER_WHAT, HEADER_REGISTERS, HEADER_CHECKS, HEADER_KEPT];
4657
4665
  if (p.sawHidden())
4658
4666
  header.push(HEADER_HIDDEN);
4659
4667
  return `${[...header, ...body].join("\n\n")}
@@ -6465,7 +6473,7 @@ halfcycle open-phase: a phase name has to work as a single folder name on this m
6465
6473
  findings: findingsDetail.length,
6466
6474
  findingsDetail
6467
6475
  }, closeDecision, void 0, repoRoot, stated);
6468
- process.stdout.write(`[halfcycle] Phase "${phaseArg}" closed as ${verdict}${findingsDetail.length > 0 ? ` with ${findingsDetail.length} finding(s)` : ""} by ${closeDecision.actor}. The engagement is now ${closed.status}.
6476
+ process.stdout.write(`[halfcycle] Phase "${phaseArg}" closed as ${verdict}${findingsDetail.length > 0 ? ` with ${findingsDetail.length} finding(s)` : ""} by ${closeDecision.actor}. The next phase can be opened.
6469
6477
  `);
6470
6478
  if (closeDecision.decision === "override") {
6471
6479
  process.stdout.write(`[halfcycle] This close was an OVERRIDE: ${closeDecision.reason}