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>
This commit is contained in:
2026-09-09 22:50:07 +02:00
co-authored by Copilot
parent 383129f571
commit cd36cc0efc
25 changed files with 273 additions and 20 deletions
+30
View File
@@ -0,0 +1,30 @@
# agents-2026 architecture
<!-- Living document. Update when components, data flow, invariants, or ADR outcomes change. Keep claims concrete and current. -->
## Purpose
Describe what this system exists to do, who uses it, and what success means.
## System context
List upstream callers, downstream services, data stores, queues, files, and trust boundaries.
## Components
- Component: responsibility, owner, key files.
## Data flow
1. Input source.
2. Validation and transformation.
3. Persistence or external calls.
4. Output and observability.
## Key invariants
- Invariant: why it must hold, where enforced, how verified.
## Decision log (ADRs)
<!-- Append ADR links or summaries here. Newest last. -->
+38
View File
@@ -0,0 +1,38 @@
# agents-2026 conventions
<!-- Living document. Promote repeated review feedback and user corrections here. Keep rules specific, checkable, and current. -->
## Code style
- Prefer simple control flow and explicit names.
- Keep side effects at boundaries.
## Naming
- Use domain terms consistently.
- Name files after their primary responsibility.
## Testing
- Cover changed behaviour with the smallest meaningful test.
- Add regression tests for fixed bugs.
## Error handling
- Fail fast on invalid inputs.
- Preserve actionable error context without leaking secrets.
## Commit format
- Use concise conventional commits when possible.
- Explain why in the body when not obvious.
## Directory layout
- Keep generated artifacts out of source directories.
- Put shared deterministic helpers in library modules.
## Review rules
- Verify scoped files only.
- Flag correctness, security, and contract drift before style.
+94
View File
@@ -0,0 +1,94 @@
{
"version": 1,
"memory": {
"root": ".agents",
"committed": [
"architecture.md",
"conventions.md",
"memory",
"specs",
"runs/*/journal.md"
],
"ignored": [
".cache",
"runs/*/events.ndjson",
"runs/*/board.md"
],
"tokenBudget": 8000,
"compactAtPercent": 85
},
"artifacts": {
"architecture": true,
"conventions": true,
"adr": true,
"journal": true,
"spec": true
},
"index": {
"include": [
"**/*"
],
"exclude": [
"**/node_modules/**",
"**/.git/**",
"**/dist/**",
"**/build/**",
"**/target/**",
"**/vendor/**",
"**/*.min.*",
"**/.agents/**"
],
"depth": 3,
"budget": 1200
},
"models": {
"tiers": {
"cheap": "claude-haiku-4.5",
"mid": "claude-sonnet-5",
"strong": "claude-opus-5"
},
"roles": {
"conductor": "strong",
"interrogator": "strong",
"scout": "cheap",
"architect": "strong",
"splitter": "mid",
"builder": "mid",
"verifier": "cheap",
"reviewer": "strong",
"integrator": "strong",
"scribe": "cheap"
}
},
"ralph": {
"maxIterations": 4,
"exitCriteria": [
"verify-commands-exit-zero",
"acceptance-criteria-checked",
"structural-gate-passes",
"reviewer-approves",
"no-out-of-scope-files"
],
"onMaxIterations": "escalate"
},
"verify": {
"commands": [
{
"name": "test",
"command": "npm run test"
}
],
"autodetected": true
},
"concurrency": {
"maxWriteLanes": 4,
"readOnlyFanOut": 6
},
"isolation": {
"backend": "worktree"
},
"context7": {
"required": true,
"envVar": "CONTEXT7_API_KEY"
}
}
+15
View File
@@ -0,0 +1,15 @@
# Memory index
Only this file is always loaded. Open shard files only when needed.
updated: 2026-09-09T20:49:13.380Z
total_tokens: 228
| shard | entries | tokens | updated | summary |
| --- | ---: | ---: | --- | --- |
| seed | 0 | 35 | 2026-09-09T20:49:13.379Z | Stable repo facts and bootstrap knowledge. |
| failures | 0 | 38 | 2026-09-09T20:49:13.379Z | Known failures, regressions, and broken approaches. |
| corrections | 0 | 36 | 2026-09-09T20:49:13.379Z | User corrections and changed assumptions. |
| insights | 0 | 37 | 2026-09-09T20:49:13.379Z | Reusable discoveries and design observations. |
| conventions | 0 | 42 | 2026-09-09T20:49:13.379Z | Project-specific conventions not yet promoted to conventions.md. |
| quirks | 0 | 40 | 2026-09-09T20:49:13.379Z | Sharp edges, environment quirks, and non-obvious constraints. |
+9
View File
@@ -0,0 +1,9 @@
# conventions memory
Project-specific conventions not yet promoted to conventions.md.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`
+9
View File
@@ -0,0 +1,9 @@
# corrections memory
User corrections and changed assumptions.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`
+9
View File
@@ -0,0 +1,9 @@
# failures memory
Known failures, regressions, and broken approaches.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`
+9
View File
@@ -0,0 +1,9 @@
# insights memory
Reusable discoveries and design observations.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`
+9
View File
@@ -0,0 +1,9 @@
# quirks memory
Sharp edges, environment quirks, and non-obvious constraints.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`
+9
View File
@@ -0,0 +1,9 @@
# seed memory
Stable repo facts and bootstrap knowledge.
Entries use:
`## <ISO timestamp> — <title>`
Optional next line: `tags: a, b`