@appchy/jarvis 0.1.88 → 0.1.90

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/dist/bin.js CHANGED
@@ -8478,22 +8478,37 @@ function planScope(ctx, req) {
8478
8478
  anticipated,
8479
8479
  editCodeNodes,
8480
8480
  governance,
8481
- obligations: toObligations(governance),
8481
+ obligations: toObligations(governance, anticipated, testsCovering),
8482
8482
  references,
8483
8483
  testsCovering,
8484
8484
  blastRadius,
8485
8485
  lowConfidence
8486
8486
  };
8487
8487
  }
8488
- function toObligations(governance) {
8489
- return governance.map((g) => {
8488
+ function toObligations(governance, existing = [], keep = []) {
8489
+ const rules = governance.map((g) => {
8490
8490
  const full = g.body !== void 0;
8491
8491
  return {
8492
+ type: "governance",
8492
8493
  id: g.id,
8493
8494
  full,
8494
8495
  statement: full ? `Its full text is here. Say how the plan satisfies it, or why it does not apply.` : `Not read yet \u2014 only its title arrived. Read it, then say how the plan satisfies it.`
8495
8496
  };
8496
8497
  });
8498
+ const preserved = keep.map((c) => ({
8499
+ type: "keep",
8500
+ id: c.line === void 0 ? c.file : `${c.file}:${c.line}`,
8501
+ statement: `Passes over this code today. It must still pass \u2014 and it must not be the thing the plan changes to make it.`
8502
+ }));
8503
+ return [
8504
+ ...rules,
8505
+ ...existing.map((e) => ({
8506
+ type: "existing",
8507
+ id: e.line === void 0 ? e.file : `${e.file}:${e.line}`,
8508
+ statement: `Already in the tree and close to what was described. Reuse it, or say why the plan builds alongside it.`
8509
+ })),
8510
+ ...preserved
8511
+ ];
8497
8512
  }
8498
8513
  function isCodeHit(hit) {
8499
8514
  return hit.file !== void 0 && hit.id === void 0;
@@ -9120,8 +9135,10 @@ async function scope(ctx, req) {
9120
9135
  const rules = await readRules(ctx, plan.governance, req.rules);
9121
9136
  const topFiles = plan.editSet.slice(0, 3).map((e) => e.file).join(", ");
9122
9137
  const topGov = plan.governance.filter((g) => g.body === void 0).slice(0, 3).map((g) => g.id).join(", ");
9123
- const unread = plan.obligations.filter((o) => !o.full).length;
9124
- const summary = plan.lowConfidence ? `Low-confidence (build-new) scope for "${req.task}": no code strongly matched \u2014 ${plan.anticipated.length} integration point(s) to READ, not edit; ${plan.governance.length} concept-matched governance. Lead with search + read.` : `Scoped "${req.task}": ${plan.editSet.length} edit target(s), ${plan.governance.length} governance, ${plan.testsCovering.length} covering test(s), blast radius ${plan.blastRadius.total} (${confidence})${topFiles ? ` \u2014 ${topFiles}` : ""}.${rules.ids > 0 && topGov ? ` ${rules.full} rule(s) came back in full; NEXT: read ${topGov} for the ${rules.ids} that did not,` : rules.full > 0 ? ` All ${rules.full} governing rule(s) came back in FULL \u2014 read them here, not with map_read;` : " NEXT:"} then check the edit-set with map_scope {edits} before you commit.${plan.obligations.length > 0 ? ` ${plan.obligations.length} obligation(s) outstanding${unread > 0 ? `, ${unread} of them not yet read` : ""} \u2014 see \`obligations\`.` : ""}`;
9138
+ const unread = plan.obligations.filter((o) => o.type === "governance" && !o.full).length;
9139
+ const reuse = plan.obligations.filter((o) => o.type === "existing").length;
9140
+ const keep = plan.obligations.filter((o) => o.type === "keep").length;
9141
+ const summary = plan.lowConfidence ? `Low-confidence (build-new) scope for "${req.task}": no code strongly matched \u2014 ${plan.anticipated.length} integration point(s) to READ, not edit; ${plan.governance.length} concept-matched governance. Lead with search + read.` : `Scoped "${req.task}": ${plan.editSet.length} edit target(s), ${plan.governance.length} governance, ${plan.testsCovering.length} covering test(s), blast radius ${plan.blastRadius.total} (${confidence})${topFiles ? ` \u2014 ${topFiles}` : ""}.${rules.ids > 0 && topGov ? ` ${rules.full} rule(s) came back in full; NEXT: read ${topGov} for the ${rules.ids} that did not,` : rules.full > 0 ? ` All ${rules.full} governing rule(s) came back in FULL \u2014 read them here, not with map_read;` : " NEXT:"} then check the edit-set with map_scope {edits} before you commit.${plan.obligations.length > 0 ? ` ${plan.obligations.length} obligation(s) outstanding${unread > 0 ? `, ${unread} rule(s) not yet read` : ""}${reuse > 0 ? `, ${reuse} thing(s) that already exist` : ""}${keep > 0 ? `, ${keep} that must keep passing` : ""} \u2014 see \`obligations\`.` : ""}`;
9125
9142
  return {
9126
9143
  summary,
9127
9144
  task: req.task,
@@ -10128,7 +10145,7 @@ import { createRequire as createRequire2 } from "module";
10128
10145
  var _require = createRequire2(import.meta.url);
10129
10146
  var VERSION2 = _require("../package.json").version ?? "0.0.0";
10130
10147
  var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
10131
- var SHA = "c469cb4";
10148
+ var SHA = "223098e";
10132
10149
  var BUILT = "2026-09-11";
10133
10150
  var BUILD = SHA ?? "source";
10134
10151
  var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;