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.
- package/CHANGELOG.md +24 -1
- package/README.md +12 -10
- package/bin/ark-check-runtime.mjs +9 -1
- package/bin/lib/agent-homes.mjs +296 -0
- package/bin/lib/agent-projection.mjs +1 -1
- package/bin/lib/ci-and-commands.mjs +7 -7
- package/bin/lib/design-smells.mjs +3 -7
- package/bin/lib/doctor-plan.mjs +36 -12
- package/bin/lib/golden-pattern.mjs +1 -1
- package/bin/lib/host-support-matrix.mjs +4 -4
- package/bin/lib/html-report-depth.mjs +7 -8
- package/bin/lib/html-report.mjs +2 -1
- package/bin/lib/install-migrate.mjs +12 -0
- package/bin/lib/post-green-path.mjs +3 -2
- package/bin/lib/product-copy.mjs +32 -0
- package/bin/lib/skill-write.mjs +1 -1
- package/bin/lib/upgrade-whats-new.mjs +16 -0
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -22
- package/docs/README.md +3 -2
- package/docs/agent-guide.md +10 -7
- package/docs/ai-gates.md +19 -0
- package/docs/develop.md +3 -3
- package/docs/package-surface.md +2 -2
- package/docs/product-voice.md +80 -74
- package/docs/use.md +7 -5
- package/package.json +2 -2
- package/server.json +3 -3
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
- package/templates/agent-skills/ark-explore/SKILL.md +5 -5
- package/templates/agent-skills/ark-upgrade/SKILL.md +2 -1
- package/templates/skills/ark-autopilot.md +1 -1
- package/templates/skills/ark-explore.md +5 -5
- package/templates/skills/ark-upgrade.md +2 -1
|
@@ -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:
|
|
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:
|
|
230
|
+
return `Codex: edits are warning only (not blocked) at write time. ${mergeBoundary}.`;
|
|
231
231
|
}
|
|
232
232
|
if (host === 'opencode') {
|
|
233
|
-
return `OpenCode:
|
|
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}:
|
|
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
|
|
387
|
-
|
|
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
|
-
?
|
|
392
|
-
: 'Design smells exist alongside open
|
|
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
|
|
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
|
|
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;
|
package/bin/lib/html-report.mjs
CHANGED
|
@@ -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="
|
|
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)';
|
package/bin/lib/skill-write.mjs
CHANGED
|
@@ -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 =
|
|
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)',
|