arkgate 4.5.7 → 4.6.0

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.
@@ -224,18 +224,18 @@ export function doctorWritePathHonestyMessage(activeHost, hardWriteActive) {
224
224
  const mergeBoundary =
225
225
  'Required CI hard merge boundary = a required GitHub status context that runs arkgate-check --strict-merge (alias ark-check --strict-merge)';
226
226
  if (host === 'cursor' && !hardWriteActive) {
227
- return `Cursor: hard preToolUse is supported for Write/StrReplace when .cursor/hooks.json is installed + trusted; without runtime-observed hook evidence, hard is unverified. ${mergeBoundary}.`;
227
+ return `Cursor: pre-write block is supported for Write/StrReplace when .cursor/hooks.json is installed + trusted; without runtime-observed hook evidence, the block is unverified. ${mergeBoundary}.`;
228
228
  }
229
229
  if (host === 'codex') {
230
- return `Codex: write path is advisory / best-effort at write (not Claude/Grok/Cursor hard). ${mergeBoundary}.`;
230
+ return `Codex: edits are warning only (not blocked) at write time. ${mergeBoundary}.`;
231
231
  }
232
232
  if (host === 'opencode') {
233
- return `OpenCode: write path is advisory / best-effort (MCP + optional plugin; not Claude/Grok/Antigravity/Cursor hard). ${mergeBoundary}.`;
233
+ return `OpenCode: edits are warning only (not blocked). ${mergeBoundary}.`;
234
234
  }
235
235
  if ((host === 'claude' || host === 'grok' || host === 'antigravity') && !hardWriteActive) {
236
236
  const label =
237
237
  host === 'claude' ? 'Claude' : host === 'grok' ? 'Grok' : 'Antigravity';
238
- return `${label}: hard PreToolUse is supported for listed ops when installed + trusted; without runtime-observed hook evidence, hard is unverified. ${mergeBoundary}.`;
238
+ return `${label}: pre-write block is supported for listed ops when installed + trusted; without runtime-observed hook evidence, the block is unverified. ${mergeBoundary}.`;
239
239
  }
240
240
  return null;
241
241
  }
@@ -24,6 +24,7 @@ import { describePackageVersionDualTruth } from './field-install.mjs';
24
24
  import { buildDoctorImprovementCompass } from './improvement-compass-doctor.mjs';
25
25
  import { buildDeepModuleCoachAdvisory } from './deep-module-coach.mjs';
26
26
  import { computePhysicalCohesion } from './physical-cohesion.mjs';
27
+ import { POST_GREEN_LEDE, operatingModeTitle } from './product-copy.mjs';
27
28
 
28
29
  function esc(value) {
29
30
  return String(value)
@@ -383,13 +384,11 @@ export function renderDesignDepthStrip(depth = {}) {
383
384
 
384
385
  const mode = String(depth.mode || '').toLowerCase();
385
386
  const title = designWeak
386
- ? mode === 'enforce'
387
- ? 'ENFORCE · design-weak'
388
- : `${(mode || 'edges').toUpperCase()} · design-weak`
389
- : 'Design smells (edges still open)';
387
+ ? operatingModeTitle(mode || 'enforce', true)
388
+ : 'Design smells (imports still open)';
390
389
  const lede = designWeak
391
- ? 'Contract edges are clean, but lived design residual remains. This does not fail PASS — it blocks “healthy finished” until Shape work lands.'
392
- : 'Design smells exist alongside open edge debt. Fix edges first; treat smells as Shape residual after green.';
390
+ ? POST_GREEN_LEDE
391
+ : 'Design smells exist alongside open import-rule debt. Fix imports first; treat smells as leftover design work after green.';
393
392
 
394
393
  const smellItems = smells
395
394
  .slice(0, 6)
@@ -411,7 +410,7 @@ export function renderDesignDepthStrip(depth = {}) {
411
410
  ? `<div class="pilot-card">
412
411
  <h3 style="margin-top:.85rem">Next pilot (one at a time)</h3>
413
412
  <p class="dim" style="margin:.15rem 0 .4rem;font-size:.86rem">
414
- Judgment only — never mechanical-safe · never multi-pilot batch
413
+ Judgment only — never auto-applied · never multi-pilot batch
415
414
  </p>
416
415
  <ul class="senior-list">
417
416
  <li><b>Smell</b> · <code>${esc(pilot.smellId || pilot.id || '—')}</code></li>
@@ -489,7 +488,7 @@ export function renderDesignCleanNote(depth = {}) {
489
488
  return `<div class="section card design-strip is-clean" id="design-depth">
490
489
  <div class="design-head">
491
490
  <span class="badge design-ok" title="No deterministic design smells with clean edges">Design depth · OK</span>
492
- <span class="dim" style="font-size:.86rem">No design-weak residual detected</span>
491
+ <span class="dim" style="font-size:.86rem">No leftover design work detected</span>
493
492
  </div>
494
493
  <p class="dim" style="margin:.45rem 0 0;font-size:.88rem">
495
494
  Edges and deterministic design sensors agree. Keep placing new code on the golden path;
@@ -11,6 +11,7 @@ import {
11
11
  resolveOperatingMode,
12
12
  } from '../ark-shared.mjs';
13
13
  import { collectAdoptionGaps, arkCheckCommand } from './agent-gates.mjs';
14
+ import { LEFTOVER_DESIGN_BADGE } from './product-copy.mjs';
14
15
  import { CORE_LAYER_NAMES } from './core-layers.mjs';
15
16
  import {
16
17
  renderBaselineSignalLegend,
@@ -525,7 +526,7 @@ export function renderHtmlReport({
525
526
  const designSmells = Array.isArray(depth.designSmells) ? depth.designSmells : [];
526
527
  const designWeakBadge =
527
528
  designFitness?.designWeak === true
528
- ? ` <span class="badge design" title="Edges can be green while lived design residual remains (Shape). Not a FAIL.">design-weak</span>`
529
+ ? ` <span class="badge design" title="Import rules can be green while leftover design work remains. Not a FAIL.">${LEFTOVER_DESIGN_BADGE}</span>`
529
530
  : '';
530
531
  const designStripHtml =
531
532
  renderDesignDepthStrip({
@@ -80,6 +80,7 @@ import {
80
80
  RUNNER_BEFORE_ARK,
81
81
  } from './mcp-adoption.mjs';
82
82
  import { inspectCodexInstallActivation, printCodexActivationHandoff, reportPartialInstall } from './install-activation.mjs';
83
+ import { installRequestedAgentHomes } from './agent-homes.mjs';
83
84
  import {
84
85
  hasHardWriteHook,
85
86
  validateHardWriteRequest,
@@ -647,6 +648,17 @@ export function runInstallAgentGates(args) {
647
648
  }
648
649
  }
649
650
 
651
+ installRequestedAgentHomes({
652
+ root,
653
+ skills,
654
+ version,
655
+ force: args.force,
656
+ claudeHome: args.claudeHome,
657
+ grokHome: args.grokHome,
658
+ agentHomes: args.agentHomes,
659
+ json: args.json,
660
+ });
661
+
650
662
  // Optional legacy/home fallback. Normal Codex installs use the project-scoped
651
663
  // .codex/config.toml above, avoiding cross-project primary binding conflicts.
652
664
  //
@@ -6,6 +6,8 @@
6
6
  * Plan B stays never mechanical-safe.
7
7
  */
8
8
 
9
+ import { POST_GREEN_HUMAN } from './product-copy.mjs';
10
+
9
11
  /** Stable product id for JSON / tests. */
10
12
  export const POST_GREEN_PATH_ID = 'clarify-for-ai';
11
13
 
@@ -16,8 +18,7 @@ export const POST_GREEN_PRIMARY_SKILL = '/ark-explore';
16
18
  * Canonical human / agent next-action string (single door).
17
19
  * Chained: explore shape-focus then autopilot only to apply B with user OK.
18
20
  */
19
- export const POST_GREEN_PRIMARY_ACTION =
20
- 'Shape residual (design-weak): edges are clean, design is not finished. Map with /ark-explore shape-focus → dual-plan B; apply B only via /ark-autopilot with your OK. Empty plan A is not done; pattern bets are never mechanical-safe.';
21
+ export const POST_GREEN_PRIMARY_ACTION = POST_GREEN_HUMAN;
21
22
 
22
23
  /** Short label for tables / metrics. */
23
24
  export const POST_GREEN_PRIMARY_SHORT =
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Human-facing product copy (4.6). JSON field names stay stable; this module
3
+ * owns labels people read in doctor, HTML, and compact router.
4
+ *
5
+ * Brands kept: ArkGate, ArkRules. Dialect (design-weak, hard write, …) maps to
6
+ * common software words. See docs/product-voice.md.
7
+ */
8
+
9
+ /** Status-light leftover-design qualifier (was “design-weak”). */
10
+ export const LEFTOVER_DESIGN_LABEL = 'leftover design work';
11
+
12
+ /**
13
+ * Operating-mode title for humans (and doctor JSON `designFitness.label` prefix).
14
+ * @param {string|null|undefined} mode suggest|adapt|enforce
15
+ * @param {boolean} leftoverDesign
16
+ */
17
+ export function operatingModeTitle(mode, leftoverDesign) {
18
+ const light = String(mode || 'enforce').toUpperCase();
19
+ return leftoverDesign ? `${light} · ${LEFTOVER_DESIGN_LABEL}` : light;
20
+ }
21
+
22
+ /** Short HTML/doctor badge text. */
23
+ export const LEFTOVER_DESIGN_BADGE = LEFTOVER_DESIGN_LABEL;
24
+
25
+ export const POST_GREEN_HUMAN =
26
+ 'Imports check out, but the design is still messy. Map leftover work with /ark-explore shape-focus, then apply one small refactor via /ark-autopilot with your OK. A clean import check is not done; pattern bets are never auto-applied.';
27
+
28
+ export const POST_GREEN_LEDE =
29
+ 'Import rules are clean, but leftover design work remains. That does not fail the check — it only means “done” is still wrong until you tidy shape.';
30
+
31
+ export const HARD_WRITE_HUMAN = 'pre-write block';
32
+ export const ADVISORY_WRITE_HUMAN = 'warning only (not blocked)';
@@ -16,7 +16,7 @@ export const HOME_SKILL_PENDING_CATALOG = '.arkgate-catalog.pending.json';
16
16
  const HOME_SKILL_LOCK = '.arkgate-install.lock';
17
17
  const HOME_SKILL_CATALOG_SCHEMA = '1.0';
18
18
  const HOME_SKILL_LOCK_STALE_MS = 5 * 60 * 1000;
19
- const HOME_SKILL_LOCK_ATTEMPTS = 100;
19
+ const HOME_SKILL_LOCK_ATTEMPTS = 200;
20
20
  const HOME_SKILL_LOCK_RETRY_MS = 25;
21
21
  const UUID_PATTERN =
22
22
  /^[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i;
@@ -33,6 +33,22 @@ export function buildUpgradeWhatsNewSuggestions() {
33
33
  neverGateInput: true,
34
34
  title: 'Suggested improvements — try or inspect after this package',
35
35
  items: [
36
+ {
37
+ id: 'plain-language-doctor',
38
+ title: 'Doctor in plain language',
39
+ try: 'npx arkgate-check --doctor',
40
+ inspect: 'Status light + leftover design work (not a score)',
41
+ why:
42
+ 'Doctor and the HTML report use common words (import rules, leftover design work, pre-write block). ArkGate and ArkRules stay as product names.',
43
+ },
44
+ {
45
+ id: 'shared-agent-homes',
46
+ title: 'Shared agent skills (home)',
47
+ try: 'npx arkgate-check --install-agent-gates --skills-only --agent-homes --force',
48
+ inspect: 'doctor.agentHomeGaps (Claude/Grok ~/.*/skills when those catalogs exist)',
49
+ why:
50
+ 'Project skills follow this pin. Shared homes stay on the newest ArkGate on the machine (additive; never downgrade). Orphan 2.x global skills stop coaching the wrong version.',
51
+ },
36
52
  {
37
53
  id: 'deep-module-coach',
38
54
  title: 'Deep-module coach (hot paths + deepening)',