Commit Graph
8 Commits
Author SHA1 Message Date
mozempkandCopilot 8330cf7900 ci: publish @redsentech/lean-harness to GitHub Packages
- Rename npm package scope @redsen -> @redsentech (GitHub Packages
  requires the scope to match the owning org/user login).
- Add publishConfig.registry pointing at npm.pkg.github.com.
- Add .github/workflows/publish.yml: on push of a vX.Y.Z tag (or manual
  dispatch), runs validate + test, checks the tag matches
  package.json's version, then npm publish using the auto-issued
  GITHUB_TOKEN (packages: write permission, no secret to manage).
- Update README/QUICKSTART lh-CLI install instructions for the private,
  org-scoped registry (.npmrc scope + auth token setup).
- Verified locally with npm publish --dry-run: 68 files, correct
  registry target, correct tarball contents.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-10 00:51:06 +02:00
mozempkandCopilot cadbec5797 docs: clarify manual vs automatic lh usage; lead with plugin install
- Add exhaustive table of every lh subcommand: who runs it automatically
  (agents, per their own instructions) vs what you run yourself (init,
  doctor, report).
- Reorder quickstart to lead with copilot plugin install (marketplace
  path, verified end-to-end on this machine), with onboarding script and
  clone+link as alternatives and explicit guidance on when to use each.
- Clarify the two-layer install model: plugin install only adds the
  behaviour layer; lh CLI (determinism layer) is a separate step until
  published to npm.
- README install section and troubleshooting table updated to match.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-10 00:46:17 +02:00
mozempkandCopilot 5ab8b59861 docs: add standalone quick start guide
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-10 00:11:30 +02:00
mozempkandCopilot 5ccf26f859 fix: tests depended on ambient CONTEXT7_API_KEY, broke in CI
\`lh doctor\`'s context7 check is a required, env-only check by design
(ADR: never inferred, never persisted). Tests that shell out to \`lh\`
or \`scripts/onboard.mjs\` inherited whatever CONTEXT7_API_KEY the
developer's shell happened to export, so \`doctor passes once the repo
is initialised\` and the onboard-script e2e test only ever passed on
machines with a real key set — never verified in a clean environment
until this CI run (no secret configured, correctly).

Fixed by injecting an obviously-fake fixture key (TEST_ENV in
helpers.mjs, exported and reused by onboard.test.mjs) into every
subprocess these tests spawn, so behaviour no longer depends on the
ambient shell. Verified locally with \`env -u CONTEXT7_API_KEY\` to
reproduce the CI environment exactly: 58/58 pass either way now.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-09 23:15:53 +02:00
mozempkandCopilot ce6b1563cd fix: npm test script fails with bare directory arg
\`node --test tests/\` throws MODULE_NOT_FOUND on this Node CLI (it
resolves the bare directory as a CommonJS entry module instead of a
test-runner glob) — this was masked locally all session because every
manual verification used \`node --test tests/*.test.mjs\` directly,
never the actual \`npm test\` script. CI caught it on the first real
run. Fixed package.json's test script to use the explicit glob.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-09 23:13:43 +02:00
mozempkandCopilot da20a6eaff feat: onboarding script, full lh flag reference, expanded README
- scripts/onboard.mjs: bootstraps a target repo onto the harness — copies
  the behaviour layer (.github/agents, skills, instructions, prompts,
  mcp.json, copilot-instructions.md, AGENTS.md), npm links the `lh` CLI,
  runs `lh init` + `lh doctor`, prints next steps. Idempotent: identical
  files are skipped, differing files require --force, re-running `lh init`
  on an initialized repo warns instead of failing. Supports --dry-run and
  --no-npm-link for CI/sandboxed use.
- tests/onboard.test.mjs: 5 new e2e tests (dry-run, full run, idempotent
  rerun, missing target dir, conflict + --force).
- README: new "Onboarding a new project" section, full lh flag reference
  for every subcommand (previously only one-line summaries), Development
  section mentions the onboarding script.

Live-tested against ~/Sources/ralph-runtime (a real, not-yet-git-tracked
project): git init, .github/ copied, `npm link` succeeded, `lh init`
ran, `lh doctor` correctly flagged its one real gap (no verify command
configured) rather than a false pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-09 22:58:46 +02:00
mozempkandCopilot cd36cc0efc fix: telemetry/memory flag mismatches, doc drift; add CI; self-dogfood
Parallel fleet audit (2 background agents) + direct work:

- src/commands/memory.mjs: `memory put --allow-secrets` was read as
  `flags.allowSecrets` (camelCase) but the CLI parser only emits
  kebab-case keys, so the flag was always undefined/false. Fixed to
  `flags['allow-secrets']`.
- Docs: `lh graph --brief` was referenced 14x across 5 agent.md files,
  harness.instructions.md, 4 SKILL.md files, onboard.prompt.md, and
  README, but `lh graph` has no --brief flag (terse output is already
  the default, --json/--severity are the only flags). Corrected every
  reference to match actual CLI surface.
- .github/workflows/ci.yml: run npm install/validate/test on node 20+22.
- Self-dogfooded `lh init --yes` in this repo, producing .agents/
  (harness.config.json, architecture.md, conventions.md, memory
  shards). `lh doctor` now reports all required checks green.
- Deduped .gitignore harness block against init's auto-managed block.

Verified: 53/53 tests pass, validate 0 errors, doctor all-green.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-09 22:50:07 +02:00
mozempkandCopilot 383129f571 feat: scaffold redsen-lean-harness v0.1.0
Recovered from crashed session (Node OOM). Repo contains full P0-P6
scaffold: plugin.json/marketplace.json, AGENTS.md, ADRs 0001-0006,
lh CLI (init/index/graph/lane/run/memory/host/report/doctor), 10
.github/agents, 12 CLI skills, instructions, context7 mcp.json, and
unit/e2e test suite.

Fixed: run.mjs read --in-tokens/--out-tokens but tests and CLI docs
use --input-tokens/--output-tokens, so telemetry totals were always 0.
Now accepts both forms.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-09 22:44:15 +02:00