@amistio/cli 0.1.22 → 0.1.23

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/index.js CHANGED
@@ -4570,6 +4570,14 @@ var projectContextTopLevelWarningMaxLength = 600;
4570
4570
  var validProjectContextSliceKinds = /* @__PURE__ */ new Set(["overview", "architecture", "domain", "data", "api", "frontend", "backend", "cli", "workflow", "operations", "security", "testing", "unknown"]);
4571
4571
  var validProjectContextEntityTypes = /* @__PURE__ */ new Set(["project", "system", "component", "domain", "tool", "decision", "feature", "risk", "team", "workflow", "unknown"]);
4572
4572
  var validProjectContextRelationTypes = /* @__PURE__ */ new Set(["uses", "depends_on", "decides", "supersedes", "touches", "blocks", "implements", "mentions"]);
4573
+ var canonicalProjectContextCitationSources = /* @__PURE__ */ new Map([
4574
+ ["projectbrain", "projectBrain"],
4575
+ ["approvedbrain", "projectBrain"],
4576
+ ["approvedprojectbrain", "projectBrain"],
4577
+ ["localsource", "localSource"],
4578
+ ["runnerstate", "runnerState"],
4579
+ ["mixed", "mixed"]
4580
+ ]);
4573
4581
  function createImplementationVerificationPrompt(workItem) {
4574
4582
  return [
4575
4583
  "# Amistio Implementation Verification",
@@ -4727,6 +4735,7 @@ function createProjectContextRefreshPrompt(workItem, context) {
4727
4735
  "- Use only these exact singular slice kind values: overview, architecture, domain, data, api, frontend, backend, cli, workflow, operations, security, testing, unknown.",
4728
4736
  "- Capture entities and relations that explain how the app is put together and where future work should look first.",
4729
4737
  "- Prefer summaries, repository-relative paths, short citations, tags, and freshness status over raw source excerpts.",
4738
+ "- Use only these exact citation source values: projectBrain, localSource, runnerState, mixed. Approved project-brain records use projectBrain, not approvedBrain.",
4730
4739
  "- Mark stale or missing areas explicitly instead of guessing.",
4731
4740
  "- Keep coverage.missingAreas entries concise noun phrases under 160 characters.",
4732
4741
  "- Keep coverage.warnings and verificationPlan entries under 300 characters; keep top-level warnings under 600 characters.",
@@ -5400,6 +5409,7 @@ function normalizeProjectContextCitationPaths(value, options) {
5400
5409
  return citation;
5401
5410
  }
5402
5411
  const normalizedCitation = { ...citation };
5412
+ normalizedCitation.source = normalizeProjectContextCitationSource(normalizedCitation.source);
5403
5413
  if (typeof normalizedCitation.repoPath === "string") {
5404
5414
  normalizedCitation.repoPath = normalizeProjectContextRepoPath(normalizedCitation.repoPath, options);
5405
5415
  }
@@ -5408,6 +5418,13 @@ function normalizeProjectContextCitationPaths(value, options) {
5408
5418
  }
5409
5419
  return normalized;
5410
5420
  }
5421
+ function normalizeProjectContextCitationSource(value) {
5422
+ if (typeof value !== "string") {
5423
+ return value;
5424
+ }
5425
+ const sourceKey = value.trim().replace(/[\s_-]+/g, "").toLowerCase();
5426
+ return canonicalProjectContextCitationSources.get(sourceKey) ?? value;
5427
+ }
5411
5428
  function normalizeProjectContextRepoPath(value, options) {
5412
5429
  const trimmed = value.trim();
5413
5430
  if (!trimmed || /^[A-Za-z][A-Za-z0-9+.-]*:\/\//.test(trimmed) || /^file:/i.test(trimmed) || /^[A-Za-z]:($|[^\\/])/.test(trimmed)) {