Harness Intelligence Wiki
SpecsCLISettings Reconfiguration

Implementation Notes

Implementation Notes

Summary

  • Implemented hi ensure, the shared init/ensure selector, backlog project URL persistence, URL-authoritative write-backlog, generated-surface sync, and operator documentation.

Execution Mode

  • sequential

Surprises and Decisions

  • The plan's direct bun test command bypassed the repository Vitest configuration; evidence uses the equivalent package test script.
  • writeRepoSettings gained an explicit no-stamp mode so settings reconfiguration preserves known version fields while scaffold/update retain their existing managed stamping behavior.
  • Harness .devpunks/settings.json uses https://linear.app/devpunks/project/harness-intelligence-5780e6830f87, the HARNESS-INTELLIGENCE project URL already recorded in apps/wiki/content/docs/project/grilling/harness-public-entrypoints-backlog.md; this avoids inventing a destination.
  • A closeout bundled-update smoke initially repinned manifest authority to the worktree/bundled version. The generated manifest was restored exactly to the committed remote-stable authority (2026.07.13-codex-multi-agent-config) and canonical Desktop paths; settings retained the same baseline/CLI pins plus only the new URL.
  • Stage tests now supply backlog URLs explicitly. The shared test prompt has no global URL fallback, so missing init prompt answers fail instead of being masked.

Sanity Checks

CheckResultNotes
T1 focused testsPassReview correction included; command coverage is 5 tests, including repeated canonical-settings byte idempotency.
T2 scaffold/update testsPassReview correction included; invalid init URL guidance now points to hi scaffold init.
T3 content/consumer testsPass2 files, 38 tests; upstream/bundle byte match.
Final focused suitePass7 files, 111 tests.
Bare hi command guidePassAutoreview RED reproduced in brand test; guide now lists settings-only hi ensure, distinguishes tool repair, and describes init as repository-settings selection.
CLI typecheck and buildPasstsc --noEmit; 1032 modules bundled.
Built helpPassRoot lists ensure; settings and tool commands have distinct descriptions.
Built fixture smokePassURL trimmed; sentinel hash unchanged; only settings mutated.
Built remote-stable update checkExpected feature driftwrite-backlog and settings changed; 0 stale files, no baseline drift; manifest authority unchanged.
Generated skill alignmentPassUpstream, CLI bundle, Harness .agents, and scaffolded consumer aligned.
Focused production lintPassNew selector and command modules clean.
Repository-wide CLI checkExisting debtBroad check reports pre-existing lint violations across legacy/generated CLI files; focused touched production lint is clean.
Diff whitespace checkPassgit diff --check.

Review

  • Standards and Spec axis reviewers initially found manager-tool preservation, init retry guidance, and idempotency-evidence gaps; each was fixed with focused regression coverage and both axes re-reviewed clean.
  • Structured review command: .agents/skills/autoreview/scripts/autoreview --mode local --model gpt-5.5 --prompt "Final re-review of the settings-reconfiguration feature after root command-guide fix. Governing spec: apps/wiki/content/docs/project/specs/cli/settings-reconfiguration/SPEC.md. Report only actionable defects; ignore unrelated legacy lint debt."
  • Final structured result: autoreview clean: no accepted/actionable findings reported (patch is correct, confidence 0.78).

Acceptance Criteria Status

CriterionStatusNotes
1MetFour settings are selected; URL trimming and absolute HTTP(S) validation covered.
2MetInit and ensure call selectRepoSettings; wiki selection remains init-only.
3MetCommand test and built fixture prove settings-only mutation.
4MetDefaults/idempotency and missing-settings guidance covered.
5MetManager-tool transition, preservation, de-duplication, and sorting covered.
6MetLegacy settings without URL are readable and upgradeable.
7MetInit, setup, check, and update preservation tests pass.
8Metwrite-backlog requires settings authority and stops with hi ensure guidance.
9MetUpstream commit add6bb4 pushed; bundle, Harness generated skill, and consumer align.
10MetHelp, root docs, runbook, routed wiki flow, and changelog updated.

Manual Review Checklist

AreaCheckHow to performExpected result
CLIReconfigure settings onlyRun node apps/cli/dist/index.js ensure in an initialized fixture, accept provider defaults, and enter a URL with surrounding spaces.Only .devpunks/settings.json changes and the stored URL is trimmed.
MigrationUpgrade legacy settingsRemove backlogProjectUrl, run built ensure, and enter an absolute HTTP(S) URL.Legacy settings load and the URL is added.
ValidationReject invalid destinationRun built ensure and enter an empty, relative, or non-HTTP URL.Command stops with absolute HTTP(S) guidance and points to hi ensure.
HelpDistinguish ensure commandsRun built --help, ensure --help, and tools ensure --help.Top-level ensure is settings-only; nested command installs/repairs tools.
BacklogConfirm destination authorityRead a scaffolded .agents/skills/write-backlog/SKILL.md.Settings are read before provider work; discovery/guessing is forbidden.

On this page