@tekyzinc/gsd-t 4.19.14 → 4.20.11

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.
@@ -867,6 +867,38 @@ let result;
867
867
  // M90 §2 D4-T4: holds the divergence-path result from the competition arm (R-ARCH-1).
868
868
  // Set inside the competition arm (before Finalize), attached to result after.
869
869
  let _pendingArchTriggerDivergence = null;
870
+
871
+ // M101 — Architect's Oversight Six-Stage Pass. Injected as a PROTOCOL DIRECTIVE into
872
+ // the design phases (plan/milestone) where the design is decided, before code exists.
873
+ // Reuses the existing phase agent rather than adding a parallel gate (the doctrine's
874
+ // own "reuse the process" rule). Each stage answered with EVIDENCE (grep/Read/graph),
875
+ // never conviction. Contract: architects-oversight-contract.md §1/§4.
876
+ // [RULE] phase-workflow-injects-architect-pass
877
+ const _ARCHITECT_PHASES = new Set(["plan", "milestone"]);
878
+ const _architectPassLine = _ARCHITECT_PHASES.has(phaseName)
879
+ ? [
880
+ ``,
881
+ `ARCHITECT'S OVERSIGHT — run this Six-Stage Pass BEFORE finalizing the ${phaseName}, IN ORDER.`,
882
+ `Each stage can KILL/reshape the plan. Answer each with EVIDENCE (a grep, a Read, or the`,
883
+ `graph slice above) — never conviction. Record the answers in plain, jargon-free language`,
884
+ `in the milestone's PseudoCode document (.gsd-t/pseudocode/), house style: title + one-line`,
885
+ `purpose, CURRENT/PROPOSED blocks, "# plain comment" inline, a summary table.`,
886
+ ` 1. OBJECTIVE — what is the core objective, and why is it the objective?`,
887
+ ` 2. CONFLICT — does it conflict with another objective? must a prior one be re-examined?`,
888
+ ` 3. REUSE — have I already done any piece of this? Can I reuse the PROCESS, or the OUTPUT`,
889
+ ` (a value already computed/stored)? Consult the graph slice, NOT memory. This stage`,
890
+ ` kills redundant work (e.g. re-deriving a value already stored locally).`,
891
+ ` 4. SIMPLICITY — is this the simplest, most efficient plan? Prove it.`,
892
+ ` 5. REUSE FORECAST — HIGH (core entity / recurs / pure transform) → build clean+extractable,`,
893
+ ` register in graph as reuse-likely. LOW → simplest inline, no abstraction. If a similar`,
894
+ ` thing exists: same JOB → extract a shared core (do NOT mutate the working original);`,
895
+ ` if stability forbids touching it → build new BUT register a "reuse-candidate" graph link`,
896
+ ` to the twin (never a silent rogue duplicate).`,
897
+ ` 6. RISK — any security or stability/scalability risk? Am I sure?`,
898
+ `A stage you cannot answer with evidence HALTS the plan (needs-human) — do not proceed on a hunch.`,
899
+ ].join("\n")
900
+ : "";
901
+
870
902
  if (!competitionOn) {
871
903
  // ── Single-producer path (default, unchanged behavior) ──
872
904
  phase("Phase");
@@ -879,6 +911,7 @@ if (!competitionOn) {
879
911
  userInput ? `\nUser input:\n${userInput}` : "",
880
912
  ``,
881
913
  `Objective: ${baseObjective}`,
914
+ _architectPassLine,
882
915
  ``,
883
916
  `Follow the CLAUDE.md Pre-Commit Gate. Commit artifacts with prefix "${(milestone || "m").toLowerCase()}(${phaseName})".`,
884
917
  `Return JSON per the schema.`,