@openlife/cli 1.7.4 → 1.7.5
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 +186 -0
- package/CODE_OF_CONDUCT.md +31 -0
- package/CONTRIBUTING.md +133 -0
- package/README.md +25 -9
- package/package.json +10 -2
- package/docs/CHANGELOG_FEATURE_ROLLOUT_DESIGNMD.md +0 -43
- package/docs/EXTERNAL_SOURCES_AND_SECURITY_GUARD.md +0 -33
- package/docs/OPENLIFE_AUDIT_2026-05-06.md +0 -170
- package/docs/OPENLIFE_CONSOLIDATED_PLAN_2026-05-06.md +0 -299
- package/docs/OPENLIFE_DUAL_MODE_IMPLEMENTATION_PLAN.md +0 -205
- package/docs/OPENLIFE_EVOLUTION_SURFACE_2026-05-07.md +0 -53
- package/docs/OPENLIFE_SKILLS_IMPORT_2026-05-07.json +0 -223
- package/docs/OPENLIFE_SQUADS_IMPORT_2026-05-07.json +0 -184
- package/docs/PAPERCLIP_OPENLIFE_INVESTIGATION.md +0 -85
- package/docs/RELEASE_ORGANIZATION_PLAN.md +0 -164
- package/docs/audit/CLI-EXECUTION-RESULTS.md +0 -113
- package/docs/audit/CLI-MATRIX.md +0 -556
- package/docs/audit/DOC-PARITY-GAPS.md +0 -351
- package/docs/audit/ORCHESTRATOR-MATRIX.md +0 -136
- package/docs/audit/TEST-COVERAGE-GAPS.md +0 -334
- package/docs/audit/integrations/SKIPPED.md +0 -101
- package/docs/autonomous-install.md +0 -79
- package/docs/capability-genesis.md +0 -137
- package/docs/capability-pack-schema.md +0 -157
- package/docs/commands.md +0 -82
- package/docs/deep-research-capability.md +0 -114
- package/docs/development/typescript-conventions.md +0 -95
- package/docs/host-installers.md +0 -68
- package/docs/install/aiobuilder.md +0 -70
- package/docs/install/claude-code.md +0 -83
- package/docs/install/codex.md +0 -64
- package/docs/install/gemini-cli.md +0 -64
- package/docs/install/runtime-profiles.md +0 -83
- package/docs/openlife-agent-os-blueprint.md +0 -114
- package/docs/openlife-install-backlog.md +0 -115
- package/docs/openlife-install-spec.md +0 -306
- package/docs/operations/CLOUD_CUTOVER_AUDIT.md +0 -37
- package/docs/operations/PHASE_PROGRESS_CONTINUATION.md +0 -24
- package/docs/performance-benchmarks.md +0 -83
- package/docs/planning/v1.3-capability-genesis.md +0 -157
- package/docs/plans/2026-05-05-admin-interface-professional-dark-premium-plan.md +0 -84
- package/docs/plans/2026-05-05-openlife-autonomous-domain-marketplace-masterplan.md +0 -122
- package/docs/roadmap/OPENLIFE_MASTER_PLAN_CLOUD_V3.md +0 -97
- package/docs/sandboxing-research.md +0 -117
- package/docs/stories/epic-feature-audit/1.1.story.md +0 -84
- package/docs/stories/epic-feature-audit/1.2.story.md +0 -102
- package/docs/stories/epic-feature-audit/1.3.story.md +0 -93
- package/docs/stories/epic-feature-audit/1.5.story.md +0 -121
- package/docs/stories/epic-feature-audit/1.6.story.md +0 -80
- package/docs/stories/epic-feature-completeness/2.1.story.md +0 -70
- package/docs/stories/epic-feature-completeness/2.2.story.md +0 -49
- package/docs/stories/epic-feature-completeness/2.3.story.md +0 -74
- package/docs/stories/epic-feature-completeness/2.4.story.md +0 -71
- package/docs/stories/epic-feature-completeness/3.1.story.md +0 -56
- package/docs/stories/epic-feature-completeness/3.2.story.md +0 -80
- package/docs/stories/epic-feature-completeness/3.3.story.md +0 -68
- package/docs/stories/epic-feature-completeness/3.4.story.md +0 -71
- package/docs/stories/epic-feature-completeness/3.5.story.md +0 -72
- package/docs/stories/epic-feature-completeness/3.6.story.md +0 -69
- package/docs/stories/epic-feature-completeness/3.7.story.md +0 -68
- package/docs/stories/epic-feature-completeness/3.8.story.md +0 -57
- package/docs/v1.4-changelog.md +0 -159
- package/docs/v1.5-changelog.md +0 -106
- package/docs/v1.5-roadmap.md +0 -121
- package/docs/v1.6-changelog.md +0 -67
- package/docs/v1.6-roadmap.md +0 -89
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
# Capability Pack Schema — `capability.yaml`
|
|
2
|
-
|
|
3
|
-
> Source of truth: `src/orchestrator/capability/CapabilityPackSchema.ts`
|
|
4
|
-
> Parser: `src/orchestrator/capability/CapabilityPackParser.ts`
|
|
5
|
-
> Stable error codes: `CAPABILITY_ERRORS`
|
|
6
|
-
|
|
7
|
-
A **Capability Pack** is a bundled unit that combines workflows, squads,
|
|
8
|
-
agents, skills, checklists, templates, and governance policies into one
|
|
9
|
-
canonizable asset. Packs live under `.catalog/capabilities/<id>/`.
|
|
10
|
-
|
|
11
|
-
## Minimal manifest
|
|
12
|
-
|
|
13
|
-
```yaml
|
|
14
|
-
capability:
|
|
15
|
-
id: my-cap
|
|
16
|
-
name: My Capability
|
|
17
|
-
description: short description
|
|
18
|
-
version: "1.0.0"
|
|
19
|
-
status: draft
|
|
20
|
-
objective: what the pack accomplishes when invoked
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
That's the smallest valid pack. Everything else is optional.
|
|
24
|
-
|
|
25
|
-
## Full manifest
|
|
26
|
-
|
|
27
|
-
```yaml
|
|
28
|
-
capability:
|
|
29
|
-
id: deep-research
|
|
30
|
-
name: Deep Research
|
|
31
|
-
description: thorough research with cited sources
|
|
32
|
-
version: "1.0.0"
|
|
33
|
-
status: draft # draft | tested | active | deprecated
|
|
34
|
-
objective: produce verifiable research reports with cited sources
|
|
35
|
-
success_criteria:
|
|
36
|
-
- "Every claim has a verifiable citation"
|
|
37
|
-
- "At least 3 contradicting sources considered"
|
|
38
|
-
|
|
39
|
-
agents:
|
|
40
|
-
- { id: research-lead, source: embedded, label: "Research Lead" }
|
|
41
|
-
- { id: writer, source: referenced, version: "1.0.0" }
|
|
42
|
-
|
|
43
|
-
skills:
|
|
44
|
-
- { id: source-credibility-scoring, source: embedded }
|
|
45
|
-
|
|
46
|
-
squads:
|
|
47
|
-
- { id: research-squad, source: embedded }
|
|
48
|
-
|
|
49
|
-
workflows:
|
|
50
|
-
- { id: deep-research-flow, source: embedded }
|
|
51
|
-
|
|
52
|
-
checklists:
|
|
53
|
-
- { id: quality-gate, path: checklists/quality-gate.md }
|
|
54
|
-
|
|
55
|
-
templates:
|
|
56
|
-
- { id: report, path: templates/report.md }
|
|
57
|
-
|
|
58
|
-
policies:
|
|
59
|
-
- { id: no-uncited-claims, rationale: "All claims must cite a source" }
|
|
60
|
-
|
|
61
|
-
metadata:
|
|
62
|
-
createdAt: 2026-05-12T17:30:00Z
|
|
63
|
-
updatedAt: 2026-05-12T17:30:00Z
|
|
64
|
-
contentSha256: ...
|
|
65
|
-
author: Genesis Engine
|
|
66
|
-
tags: [research, analysis]
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Asset refs
|
|
70
|
-
|
|
71
|
-
Every reference carries a `source` discriminator:
|
|
72
|
-
|
|
73
|
-
- **`embedded`** — the pack owns the file. Lives under
|
|
74
|
-
`<packDir>/<kind>/<id>.md|.yaml` or `<packDir>/<kind>/<id>/`. The
|
|
75
|
-
parser checks file existence when given a `packDir` context.
|
|
76
|
-
- **`referenced`** — the pack points at an asset already in the global
|
|
77
|
-
registry. Used by `CapabilityGenesisEngine` when
|
|
78
|
-
`AssetReuseRouter.find()` finds a match >= 80%.
|
|
79
|
-
|
|
80
|
-
## Directory layout
|
|
81
|
-
|
|
82
|
-
```
|
|
83
|
-
.catalog/capabilities/<id>/
|
|
84
|
-
├── capability.yaml # this manifest
|
|
85
|
-
├── INDEX.md # human-readable summary (generated)
|
|
86
|
-
├── agents/ # <id>/<id>.md or <id>.md
|
|
87
|
-
├── skills/ # <id>.md
|
|
88
|
-
├── squads/ # <id>/SQUAD.md
|
|
89
|
-
├── workflows/ # <id>.yaml
|
|
90
|
-
├── checklists/ # *.md
|
|
91
|
-
├── templates/ # *.md, *.txt, etc.
|
|
92
|
-
└── policies/ # policy tag definitions (optional)
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Lifecycle
|
|
96
|
-
|
|
97
|
-
Managed by `CapabilityPackStateStore`:
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
draft ──(tested promote, needs validatedBy)──→ tested
|
|
101
|
-
│
|
|
102
|
-
▼
|
|
103
|
-
(active promote, needs human actor)
|
|
104
|
-
│
|
|
105
|
-
▼
|
|
106
|
-
active
|
|
107
|
-
│
|
|
108
|
-
(any time)
|
|
109
|
-
▼
|
|
110
|
-
deprecated
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Lifecycle is fully audit-logged at `.openlife/capability-lifecycle.jsonl`.
|
|
114
|
-
|
|
115
|
-
## Stable error codes
|
|
116
|
-
|
|
117
|
-
| Code | Meaning |
|
|
118
|
-
|---|---|
|
|
119
|
-
| `capability_invalid_yaml` | YAML parse failed |
|
|
120
|
-
| `capability_missing_root` | top-level `capability:` key missing |
|
|
121
|
-
| `capability_missing_required_field` | id/name/description/version/objective absent |
|
|
122
|
-
| `capability_invalid_status` | status not in {draft,tested,active,deprecated} |
|
|
123
|
-
| `capability_invalid_type` | array/source malformed |
|
|
124
|
-
| `capability_duplicate_asset_ref` | same id appears twice in one kind |
|
|
125
|
-
| `capability_unknown_asset_ref` | referenced id not in registry (Story 1.4) |
|
|
126
|
-
| `capability_id_dir_mismatch` | frontmatter id ≠ directory name |
|
|
127
|
-
| `capability_embedded_ref_missing_file` | embedded ref has no backing file |
|
|
128
|
-
|
|
129
|
-
## How to author
|
|
130
|
-
|
|
131
|
-
Three paths:
|
|
132
|
-
|
|
133
|
-
1. **CLI (recommended):**
|
|
134
|
-
```bash
|
|
135
|
-
openlife create capability "<brief>" --mode quick|professional|elite
|
|
136
|
-
```
|
|
137
|
-
2. **Programmatic:**
|
|
138
|
-
```ts
|
|
139
|
-
import { CapabilityGenesisEngine } from './orchestrator/capability/CapabilityGenesisEngine';
|
|
140
|
-
new CapabilityGenesisEngine().generate({
|
|
141
|
-
description: '...', packId: 'my-pack', mode: 'professional', actor: 'me',
|
|
142
|
-
});
|
|
143
|
-
```
|
|
144
|
-
3. **Hand-write** the `capability.yaml` and the embedded asset files,
|
|
145
|
-
then run `CapabilityPackParser.parseCapabilityPackFile()` to validate.
|
|
146
|
-
|
|
147
|
-
## Promotion
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
# After authoring + manual test
|
|
151
|
-
openlife aiobuilder canonize capability my-cap # draft → active (via the
|
|
152
|
-
# existing canonize shim
|
|
153
|
-
# that also handles squads
|
|
154
|
-
# and skills)
|
|
155
|
-
|
|
156
|
-
# Or programmatically via CapabilityPackStateStore.promote()
|
|
157
|
-
```
|
package/docs/commands.md
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# OpenLife Command Manual (Atualizado)
|
|
2
|
-
|
|
3
|
-
## Núcleo
|
|
4
|
-
- `openlife --help`
|
|
5
|
-
- `openlife start --daemon`
|
|
6
|
-
- `openlife ask <mensagem...>`
|
|
7
|
-
- `openlife ask <mensagem...> --mode <task|service>`
|
|
8
|
-
- `openlife status`
|
|
9
|
-
- `openlife doctor`
|
|
10
|
-
|
|
11
|
-
## Instalação / Sistema
|
|
12
|
-
- `openlife install`
|
|
13
|
-
- `openlife system install`
|
|
14
|
-
- `openlife system status`
|
|
15
|
-
- `openlife system doctor`
|
|
16
|
-
- `openlife system runtime-policy-status`
|
|
17
|
-
- `openlife system runtime-policy-canary-start --intent <intent> --executor <executor>`
|
|
18
|
-
- `openlife system runtime-policy-canary-observe --intent <intent> --ok <true|false>`
|
|
19
|
-
- `openlife system runtime-policy-rollback --intent <intent>`
|
|
20
|
-
|
|
21
|
-
## Auth
|
|
22
|
-
- `openlife auth gemini`
|
|
23
|
-
- `openlife auth openai`
|
|
24
|
-
|
|
25
|
-
## Models
|
|
26
|
-
- `openlife models status`
|
|
27
|
-
- `openlife models set <provider/model>`
|
|
28
|
-
- `openlife models fallbacks list`
|
|
29
|
-
- `openlife models fallbacks add <provider/model>`
|
|
30
|
-
- `openlife models fallbacks remove <provider/model>`
|
|
31
|
-
- `openlife models fallbacks clear`
|
|
32
|
-
|
|
33
|
-
## Governança
|
|
34
|
-
- `openlife governance status`
|
|
35
|
-
- `openlife governance audit`
|
|
36
|
-
- `openlife governance risk-check <goal>`
|
|
37
|
-
- `openlife governance consent <scope> <userId>`
|
|
38
|
-
|
|
39
|
-
## Dual-mode (Task/Service)
|
|
40
|
-
- `openlife task status <taskId>`
|
|
41
|
-
- `openlife service status <serviceId>`
|
|
42
|
-
- `openlife service pause <serviceId> [--reason <texto>]`
|
|
43
|
-
- `openlife service resume <serviceId> [--reason <texto>]`
|
|
44
|
-
- `openlife service events <serviceId> [--limit <n>]`
|
|
45
|
-
|
|
46
|
-
## Jobs + Runtime
|
|
47
|
-
- `openlife job list [--limit <n>]`
|
|
48
|
-
- `openlife job events <jobId>`
|
|
49
|
-
- `openlife runtime probe`
|
|
50
|
-
- `openlife runtime list`
|
|
51
|
-
|
|
52
|
-
## Reversa
|
|
53
|
-
- `openlife reversa status`
|
|
54
|
-
- `openlife reversa mode --set <default|designmd> --profile <profileId>`
|
|
55
|
-
- `openlife reversa run-phase <reconnaissance|excavation|interpretation|generation|review> --note "..."`
|
|
56
|
-
- `openlife reversa run-all --note "..."`
|
|
57
|
-
- `openlife reversa export-json`
|
|
58
|
-
|
|
59
|
-
## DesignMD
|
|
60
|
-
- `openlife designmd import [--vendor <path>] [--source <awesome-design-md|open-design>]`
|
|
61
|
-
- `openlife designmd list`
|
|
62
|
-
- `openlife designmd show <profileId>`
|
|
63
|
-
- `openlife designmd status`
|
|
64
|
-
- `openlife designmd apply <profileId> <source> <title> <designPath>`
|
|
65
|
-
|
|
66
|
-
## AIOBUILDER
|
|
67
|
-
- `openlife aiobuilder mode --set <default|designmd> --profile <profileId>`
|
|
68
|
-
- `openlife aiobuilder generate-ui <featureName>`
|
|
69
|
-
- `openlife aiobuilder generate-ui <featureName> --strict-contracts`
|
|
70
|
-
- `openlife aiobuilder generate-ui <featureName> --consistency-check`
|
|
71
|
-
- `openlife aiobuilder generate-ui <featureName> --strict-contracts --consistency-check`
|
|
72
|
-
|
|
73
|
-
## Conversação (ask)
|
|
74
|
-
- `openlife ask "importe open design de vendor/open-design"`
|
|
75
|
-
- `openlife ask "ative designmd perfil <profileId>"`
|
|
76
|
-
- `openlife ask "gerar ui para <featureName>"`
|
|
77
|
-
|
|
78
|
-
## Operações auxiliares
|
|
79
|
-
- `openlife teammate list`
|
|
80
|
-
- `openlife teammate upsert <id> <owner> <status> <title> [--blocker <texto>] [--comment <texto>]`
|
|
81
|
-
- `openlife learning add <taskId> <summary>`
|
|
82
|
-
- `openlife learning list`
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# Deep Research Capability Pack
|
|
2
|
-
|
|
3
|
-
> Location: `.catalog/capabilities/deep-research/`
|
|
4
|
-
> Status: `draft`
|
|
5
|
-
> Generated by: `CapabilityGenesisEngine` (Story 1.5 / 3.4)
|
|
6
|
-
> Regression test: `src/test_deep_research_capability.ts`
|
|
7
|
-
|
|
8
|
-
The first seed Capability Pack. Demonstrates the v1.3 capability stack
|
|
9
|
-
end-to-end: schema, parser, providers, lifecycle, genesis engine, CLI.
|
|
10
|
-
|
|
11
|
-
## Contents
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
.catalog/capabilities/deep-research/
|
|
15
|
-
├── capability.yaml
|
|
16
|
-
├── INDEX.md
|
|
17
|
-
├── skills/
|
|
18
|
-
│ ├── source-credibility-scoring.md
|
|
19
|
-
│ ├── evidence-synthesis.md
|
|
20
|
-
│ ├── contradiction-analysis.md
|
|
21
|
-
│ ├── advanced-query-planning.md
|
|
22
|
-
│ └── executive-briefing.md
|
|
23
|
-
├── squads/
|
|
24
|
-
│ └── research-squad/SQUAD.md
|
|
25
|
-
├── workflows/
|
|
26
|
-
│ └── deep-research-flow.yaml
|
|
27
|
-
└── (agents/, checklists/, templates/ — empty directories ready for use)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Why this pack
|
|
31
|
-
|
|
32
|
-
The Hermes brief calls for an "elite" deep-research capability with five
|
|
33
|
-
specific skills, one squad, and one workflow. Building it via the
|
|
34
|
-
Genesis Engine doubles as a real test of the v1.3 pipeline: if you can
|
|
35
|
-
run `openlife create capability "..."` and get this output, the
|
|
36
|
-
end-to-end loop works.
|
|
37
|
-
|
|
38
|
-
## How it was produced
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
node bin/openlife.js create capability \
|
|
42
|
-
"Deep research with cited sources and contradiction checks" \
|
|
43
|
-
--id deep-research \
|
|
44
|
-
--mode elite \
|
|
45
|
-
--actor v1.3-bootstrap \
|
|
46
|
-
--skills source-credibility-scoring,evidence-synthesis,contradiction-analysis,advanced-query-planning,executive-briefing \
|
|
47
|
-
--squads research-squad \
|
|
48
|
-
--workflows deep-research-flow
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Every file inside the pack started as a draft stub. Operators are
|
|
52
|
-
expected to refine each one before promoting the pack to `tested`.
|
|
53
|
-
|
|
54
|
-
## Reuse-first verification
|
|
55
|
-
|
|
56
|
-
The Genesis Engine called `AssetReuseRouter.find('Deep research…')`
|
|
57
|
-
first. On a clean repo there are no promoted assets matching, so all 7
|
|
58
|
-
assets land as `source: 'embedded'`. On a repo with prior research
|
|
59
|
-
work, matching assets would surface as `source: 'referenced'`.
|
|
60
|
-
|
|
61
|
-
## Lifecycle
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
draft (current)
|
|
65
|
-
│
|
|
66
|
-
│ After operators refine the stubs + run validation tests:
|
|
67
|
-
▼
|
|
68
|
-
tested (requires validatedBy when calling
|
|
69
|
-
CapabilityPackStateStore.promote)
|
|
70
|
-
│
|
|
71
|
-
│ After explicit human canonization:
|
|
72
|
-
▼
|
|
73
|
-
active (requires human actor — not 'system' or 'auto')
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
The pack is intentionally shipped at `draft` to keep the contract
|
|
77
|
-
honest: a Genesis-produced pack is never automatically `active`.
|
|
78
|
-
|
|
79
|
-
## What's stubbed today
|
|
80
|
-
|
|
81
|
-
- **Skills** — frontmatter is real (id, name, status, source, version);
|
|
82
|
-
body sections are placeholder.
|
|
83
|
-
- **Squad** — frontmatter is real; agent table is `TBD | TBD`.
|
|
84
|
-
- **Workflow** — sequence is one placeholder step; operator fills in
|
|
85
|
-
the real plan.
|
|
86
|
-
|
|
87
|
-
## How to refine
|
|
88
|
-
|
|
89
|
-
1. Edit each skill `.md`: write the `When to use`, `Procedure`,
|
|
90
|
-
`Validation` sections.
|
|
91
|
-
2. Edit `squads/research-squad/SQUAD.md`: fill out the agent table and
|
|
92
|
-
the squad's `## Mission` section.
|
|
93
|
-
3. Edit `workflows/deep-research-flow.yaml`: add real phases and steps.
|
|
94
|
-
4. Run the regression test:
|
|
95
|
-
```bash
|
|
96
|
-
npm run test:deep-research-capability
|
|
97
|
-
```
|
|
98
|
-
5. Promote when ready:
|
|
99
|
-
```ts
|
|
100
|
-
import { CapabilityPackStateStore } from './orchestrator/capability/CapabilityPackState';
|
|
101
|
-
new CapabilityPackStateStore().promote({
|
|
102
|
-
packId: 'deep-research',
|
|
103
|
-
to: 'tested',
|
|
104
|
-
actor: 'rafa',
|
|
105
|
-
validatedBy: 'deep-research-quality-gate',
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Future: real implementation
|
|
110
|
-
|
|
111
|
-
v1.4 will replace the stubs with production content authored against
|
|
112
|
-
the `tech-search` skill family already in `.claude/skills/`. The
|
|
113
|
-
reuse-first contract means those references will appear as
|
|
114
|
-
`source: 'referenced'` instead of embedded duplicates.
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# TypeScript Conventions — OpenLife CLI
|
|
2
|
-
|
|
3
|
-
> Established by Story 7.1 (v1.2 Royal Stack).
|
|
4
|
-
> Enforced by `tsconfig.json` strict mode + reviewer discipline.
|
|
5
|
-
|
|
6
|
-
## Goal
|
|
7
|
-
|
|
8
|
-
Keep the production tree honest about types so refactors stay safe. The repo
|
|
9
|
-
already runs `strict: true` — these conventions cover the gaps strict mode
|
|
10
|
-
doesn't enforce.
|
|
11
|
-
|
|
12
|
-
## The `any` budget
|
|
13
|
-
|
|
14
|
-
`grep` audit at v1.2 baseline (May 2026):
|
|
15
|
-
|
|
16
|
-
| Scope | Allowed |
|
|
17
|
-
|-------|---------|
|
|
18
|
-
| `src/test_*.ts` | Unlimited — tests reach into private members via `(x as any).method` deliberately |
|
|
19
|
-
| `src/**/*.ts` (non-test) | < 90 (was 126 at v1.1 close) |
|
|
20
|
-
|
|
21
|
-
Target for v1.3: < 50. Target for v1.4: < 20.
|
|
22
|
-
|
|
23
|
-
## Permitted patterns
|
|
24
|
-
|
|
25
|
-
These show up across the codebase and are **kept on purpose**:
|
|
26
|
-
|
|
27
|
-
### 1. Test seams — reach into private members
|
|
28
|
-
```ts
|
|
29
|
-
(brain as any).failureCount // test_brain_fallback_chain.ts
|
|
30
|
-
(gw as any).bot // test_daemon_sigterm.ts
|
|
31
|
-
```
|
|
32
|
-
Tests stay tight against internals. If a method becomes public for testing
|
|
33
|
-
only, it leaks. `as any` is the right escape valve here.
|
|
34
|
-
|
|
35
|
-
### 2. Third-party SDK lacunas
|
|
36
|
-
```ts
|
|
37
|
-
const opts: any = { apiKey, baseURL }; // OpenAI constructor opts evolve faster than @types
|
|
38
|
-
(wrapped as any).cause = error; // Error.cause is Node 16.9+ but not in lib.dom.d.ts yet
|
|
39
|
-
```
|
|
40
|
-
Use only when SDK typings are demonstrably behind the runtime.
|
|
41
|
-
|
|
42
|
-
### 3. Untyped JSON at the boundary
|
|
43
|
-
```ts
|
|
44
|
-
const data: unknown = await response.json();
|
|
45
|
-
```
|
|
46
|
-
Always prefer `unknown` over `any` for parsed JSON, then narrow with a type
|
|
47
|
-
guard. The current codebase has some leftover `: any` here — convert to
|
|
48
|
-
`unknown` opportunistically.
|
|
49
|
-
|
|
50
|
-
### 4. Catch clauses on Error
|
|
51
|
-
```ts
|
|
52
|
-
} catch (err) {
|
|
53
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
TS 4.4+ defaults catch variables to `unknown` under strict mode. Don't
|
|
57
|
-
re-annotate `catch (err: any)` — drop the annotation entirely and narrow
|
|
58
|
-
inside the block.
|
|
59
|
-
|
|
60
|
-
## Forbidden patterns
|
|
61
|
-
|
|
62
|
-
### 1. `any` in public signatures
|
|
63
|
-
```ts
|
|
64
|
-
// BAD
|
|
65
|
-
export function routeTask(task: any): any { ... }
|
|
66
|
-
|
|
67
|
-
// GOOD
|
|
68
|
-
export function routeTask(task: TaskIntent): TaskResult { ... }
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 2. Drive-by `as any` to silence the compiler
|
|
72
|
-
```ts
|
|
73
|
-
// BAD
|
|
74
|
-
return (response as any).data;
|
|
75
|
-
|
|
76
|
-
// GOOD — declare a narrow interface
|
|
77
|
-
interface ResponseShape { data: string }
|
|
78
|
-
return (response as ResponseShape).data;
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### 3. `Function` / `Object` / `{}` as type
|
|
82
|
-
These behave like `any` with worse ergonomics. Use a specific signature
|
|
83
|
-
(`(x: number) => number`) or `Record<string, unknown>` instead.
|
|
84
|
-
|
|
85
|
-
## Convention enforcement
|
|
86
|
-
|
|
87
|
-
- **Local check before commit:** `grep -rEn ":\s*any\b|<any>|as any" src/ --include="*.ts" | grep -v test_ | wc -l` — should not exceed the documented budget.
|
|
88
|
-
- **CI:** Story 7.4 wires a `tsc --noEmit --strict` gate so any new `any` that breaks compile fails fast.
|
|
89
|
-
- **Review:** PRs that add `any` outside the permitted patterns should justify the addition in the PR body or split out a typing follow-up.
|
|
90
|
-
|
|
91
|
-
## Migration plan
|
|
92
|
-
|
|
93
|
-
Each story that touches a file with `any` should opportunistically reduce
|
|
94
|
-
the count in that file. Do not block feature work on type cleanup — the
|
|
95
|
-
budget is a ratchet, not a gate.
|
package/docs/host-installers.md
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# OpenLife — host installer coverage matrix
|
|
2
|
-
|
|
3
|
-
OpenLife can install its agent + command + MCP surface into three host CLIs.
|
|
4
|
-
Each one is reversible and uses the same `dist-templates/<host>/` layout.
|
|
5
|
-
|
|
6
|
-
## Coverage matrix (v1.4)
|
|
7
|
-
|
|
8
|
-
| Host | Status | `installFor<Host>` | `uninstallFor<Host>` | dist-templates path |
|
|
9
|
-
|---|---|---|---|---|
|
|
10
|
-
| `claude-code` | Real, original (v1.2 / v1.3) | ✅ | ✅ | `dist-templates/claude-code/` |
|
|
11
|
-
| `gemini-cli` | Real (Story 9.3) | ✅ | ✅ | `dist-templates/gemini-cli/` |
|
|
12
|
-
| `codex` | Real (Story 9.4) | ✅ | ✅ | `dist-templates/codex/` |
|
|
13
|
-
|
|
14
|
-
All three share `HostInstaller.installForHost()` / `uninstallForHost()`
|
|
15
|
-
private helpers so behavior stays consistent.
|
|
16
|
-
|
|
17
|
-
## What gets installed
|
|
18
|
-
|
|
19
|
-
For each host the installer copies:
|
|
20
|
-
|
|
21
|
-
- `dist-templates/<host>/agents/*.md` → `<targetRoot>/.<host>/agents/*.md`
|
|
22
|
-
- `dist-templates/<host>/commands/openlife/*.md` → `<targetRoot>/.<host>/commands/openlife/*.md`
|
|
23
|
-
- `dist-templates/<host>/mcp/openlife-orchestrator.json` →
|
|
24
|
-
`<targetRoot>/.openlife/install-mcp-snippet-<host>.json` (a staged snippet —
|
|
25
|
-
the operator merges its `mcpServers` block into the host's own config file).
|
|
26
|
-
|
|
27
|
-
For Claude Code (the original target) there are 5 agents (atlas, forge,
|
|
28
|
-
genesis, lyra, maestro) and 4 commands (ask, doctor, dream, status). The
|
|
29
|
-
other two hosts are seeded from the same content via Story 9.5.
|
|
30
|
-
|
|
31
|
-
## Uninstall semantics
|
|
32
|
-
|
|
33
|
-
Uninstall is reversible: it only removes files that match the
|
|
34
|
-
`openlife-*.md` / `openlife/*.md` / `install-mcp-snippet-<host>.json`
|
|
35
|
-
shape, so it never touches the operator's own host configuration files. A
|
|
36
|
-
`.bak` is created for any pre-existing file that would have been
|
|
37
|
-
overwritten by the corresponding install.
|
|
38
|
-
|
|
39
|
-
## CLI surface
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
openlife system install --host claude-code --target .
|
|
43
|
-
openlife system install --host gemini-cli --target .
|
|
44
|
-
openlife system install --host codex --target .
|
|
45
|
-
|
|
46
|
-
openlife system uninstall --host gemini-cli --target .
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The `--host` flag accepts only the three values above. Anything else is
|
|
50
|
-
rejected with `validateHost()`. If you omit `--host`, `detectHostFromEnv()`
|
|
51
|
-
picks one from `OPENLIFE_HOST` or falls back to `claude-code`.
|
|
52
|
-
|
|
53
|
-
## How to add a new host
|
|
54
|
-
|
|
55
|
-
1. Seed `dist-templates/<new-host>/{agents,commands,mcp}/` with content
|
|
56
|
-
following the existing layout. Story 9.5 is the reference.
|
|
57
|
-
2. Add `installFor<NewHost>()` + `uninstallFor<NewHost>()` to
|
|
58
|
-
`src/cli/HostInstaller.ts` — both should delegate to `installForHost()`
|
|
59
|
-
/ `uninstallForHost()` with the host name and the dot-dir name.
|
|
60
|
-
3. Extend the dispatcher branches in `install()` / `uninstall()`.
|
|
61
|
-
4. Add the new host to `validateHost()` in `src/cli/InstallFlow.ts`.
|
|
62
|
-
5. Mirror an integration test in `test_host_installers_<host>.ts`.
|
|
63
|
-
|
|
64
|
-
## Multi-host parity
|
|
65
|
-
|
|
66
|
-
`test_multi_host_docs_parity.ts` asserts that every host has the same
|
|
67
|
-
agent count, command count, and required-file presence so the docs
|
|
68
|
-
matrix never drifts silently.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# AIOBuilder — CLI Reference
|
|
2
|
-
|
|
3
|
-
> AIOBuilder is the orchestrator squad that turns intent into running software.
|
|
4
|
-
> It owns 16 verbs spanning discovery → planning → build → release. This doc is
|
|
5
|
-
> the canonical map between the verbs promised in
|
|
6
|
-
> `.catalog/squads/01-meta-framework-ai-builder/SQUAD.md` and the CLI handlers
|
|
7
|
-
> wired in `src/index.ts`.
|
|
8
|
-
>
|
|
9
|
-
> A regression test (`src/test_aiobuilder_cli_parity.ts`) fails the build if
|
|
10
|
-
> this mapping drifts.
|
|
11
|
-
|
|
12
|
-
## Verb → Handler Map
|
|
13
|
-
|
|
14
|
-
| Verb | CLI command | Notes |
|
|
15
|
-
|------|-------------|-------|
|
|
16
|
-
| `discover` | `openlife aiobuilder discover` | Delegates to `brownfield-discovery` workflow |
|
|
17
|
-
| `plan` | `openlife aiobuilder plan` | Phase 1 of `story-development-cycle` |
|
|
18
|
-
| `design` | `openlife aiobuilder generate-ui` (alias) | UI generation handler |
|
|
19
|
-
| `build` | `openlife aiobuilder build` | Story 5.4 handler, runs greenfield phase 3 |
|
|
20
|
-
| `test` | `openlife aiobuilder test` | Runs `npm run test:all` |
|
|
21
|
-
| `preview` | `openlife aiobuilder preview` | Placeholder for v1.3 Vercel/Railway wire-up |
|
|
22
|
-
| `release` | `openlife aiobuilder release` | Delegates to `qa-loop` workflow |
|
|
23
|
-
| `infra` | `openlife aiobuilder infra` | Placeholder for v1.3 infra report |
|
|
24
|
-
| `score` | `openlife aiobuilder score` | Reads `.artifacts/squad-scores.json` |
|
|
25
|
-
| `route` | `openlife route intent` (top-level) | Routing lives at the root, not under aiobuilder |
|
|
26
|
-
| `evolve` | `openlife aiobuilder evolve` | Runs `SquadCreator.analyze()` on all squads |
|
|
27
|
-
| `ship` | `openlife aiobuilder ship` | Full pipeline: discover → plan → build → test → release |
|
|
28
|
-
| `build-agent` | `openlife aiobuilder create-agent` (alias) | Uses SquadCreator-rendered template |
|
|
29
|
-
| `build-squad` | `openlife aiobuilder create-squad` (alias) | Uses `SquadCreator.create()` |
|
|
30
|
-
| `build-skill` | `openlife aiobuilder build-skill` | Uses `SkillCreator.create()` |
|
|
31
|
-
| `canonize` | `openlife aiobuilder canonize <type> <id>` | Promotes draft → active, logs to `.openlife/canonization-log.jsonl` |
|
|
32
|
-
|
|
33
|
-
## Authoring lifecycle (v1.2)
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
build-skill / build-squad → SquadCreator / SkillCreator render from
|
|
37
|
-
dist-templates/{squad,skill}-template/
|
|
38
|
-
into .catalog/{squads,skills}/<id>/
|
|
39
|
-
with status: draft
|
|
40
|
-
|
|
41
|
-
canonize squad <id> → reads .catalog/squads/<id>/SQUAD.md
|
|
42
|
-
verifies via SquadCreator.validate()
|
|
43
|
-
sets frontmatter status: active
|
|
44
|
-
appends to .openlife/canonization-log.jsonl
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
A squad/skill stays in `status: draft` until it has been used in at least one
|
|
48
|
-
real mission and `canonize` has been called explicitly. The
|
|
49
|
-
`test_catalog_quality.ts` gate flags any auto-route draft older than 7 days as
|
|
50
|
-
stale — promote it via `canonize` or delete it.
|
|
51
|
-
|
|
52
|
-
## v1.3 — Deferred placeholders
|
|
53
|
-
|
|
54
|
-
The following sub-commands return stable JSON envelopes today and will gain
|
|
55
|
-
real integrations in v1.3 (see `docs/planning/v1.3-capability-genesis.md`):
|
|
56
|
-
|
|
57
|
-
- `preview` — Vercel/Railway preview URL wiring
|
|
58
|
-
- `infra` — live infra inventory report
|
|
59
|
-
- `SquadCreator.design()` / `migrate()` / `extend()` / `publish()`
|
|
60
|
-
- `SkillCreator.design()` / `migrate()` / `extend()` / `publish()`
|
|
61
|
-
|
|
62
|
-
Each placeholder returns `{ ok: false, error: '<name>_not_implemented_until_v1_3' }`
|
|
63
|
-
so callers can wire today and the real handler lands behind the same API.
|
|
64
|
-
|
|
65
|
-
## Aliases preserved for backwards compatibility
|
|
66
|
-
|
|
67
|
-
- `openlife aiobuilder create-agent` — kept as canonical name, alias for `build-agent` verb
|
|
68
|
-
- `openlife aiobuilder create-squad` — same, alias for `build-squad`
|
|
69
|
-
- `openlife aiobuilder generate-ui` — same, alias for `design`
|
|
70
|
-
- `openlife route intent ...` — top-level routing, aliased by `route` verb
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# OpenLife on `claude-code`
|
|
2
|
-
|
|
3
|
-
## Status
|
|
4
|
-
|
|
5
|
-
**Supported (v1.0)** — this is the canonical host for OpenLife v1.0. Wizard and non-interactive paths both install real artifacts.
|
|
6
|
-
|
|
7
|
-
## Auto-detection signal
|
|
8
|
-
|
|
9
|
-
The `InstallFlow.detectHostFromEnv()` resolver selects `claude-code` when **either** of these environment variables is set:
|
|
10
|
-
|
|
11
|
-
- `CLAUDECODE`
|
|
12
|
-
- `CLAUDE_PROJECT_DIR`
|
|
13
|
-
|
|
14
|
-
To force-select `claude-code` regardless of environment, pass `--host claude-code`.
|
|
15
|
-
|
|
16
|
-
## What gets installed
|
|
17
|
-
|
|
18
|
-
Running `openlife init` (wizard) or `openlife system setup --profile <p> --host claude-code` writes:
|
|
19
|
-
|
|
20
|
-
| Artifact | Destination | Source |
|
|
21
|
-
|---------------------|-----------------------------------------------------|-------------------------------------------------------|
|
|
22
|
-
| 5 starter agents | `<root>/.claude/agents/openlife-*.md` | `dist-templates/claude-code/agents/openlife-*.md` |
|
|
23
|
-
| 4 slash commands | `<root>/.claude/commands/openlife/*.md` | `dist-templates/claude-code/commands/openlife/*.md` |
|
|
24
|
-
| MCP manifest (stub) | Staged at `.openlife/mcp/openlife-orchestrator.json`| `dist-templates/claude-code/mcp/openlife-orchestrator.json` |
|
|
25
|
-
| Runtime state dir | `<root>/.openlife/` | created from scratch |
|
|
26
|
-
| Install manifest | `<root>/.openlife/install-manifest.json` | written by `InstallFlow` |
|
|
27
|
-
|
|
28
|
-
The 5 starter agents are: `openlife-maestro`, `openlife-lyra`, `openlife-forge`, `openlife-atlas`, `openlife-genesis`.
|
|
29
|
-
|
|
30
|
-
The 4 starter slash commands are: `/openlife:status`, `/openlife:ask`, `/openlife:doctor`, `/openlife:dream`.
|
|
31
|
-
|
|
32
|
-
## What gets uninstalled
|
|
33
|
-
|
|
34
|
-
`openlife system uninstall --host claude-code` reverses **only** what we installed:
|
|
35
|
-
|
|
36
|
-
| Removed | Preserved |
|
|
37
|
-
|------------------------------------------------------|--------------------------------------------|
|
|
38
|
-
| `.claude/agents/openlife-*.md` (prefix-scoped) | `.claude/agents/*` (your own agents) |
|
|
39
|
-
| `.claude/commands/openlife/` (entire namespace dir) | `.claude/commands/*` (other namespaces) |
|
|
40
|
-
| Staged MCP snippet at `.openlife/mcp/` | `.openlife/` (state, missions, learning) |
|
|
41
|
-
| | `.catalog/` (runtime catalogs) |
|
|
42
|
-
| | `~/.claude.json` (operator merges manually)|
|
|
43
|
-
|
|
44
|
-
The prefix-scoped agent deletion (`openlife-*.md` only) is the contract from Story 3.4: any agent file you authored manually stays untouched.
|
|
45
|
-
|
|
46
|
-
## MCP integration
|
|
47
|
-
|
|
48
|
-
The MCP manifest at `dist-templates/claude-code/mcp/openlife-orchestrator.json` is **staged** during install — it is copied to `.openlife/mcp/` but **not** auto-merged into `~/.claude.json`.
|
|
49
|
-
|
|
50
|
-
To wire it up, the operator manually merges the snippet:
|
|
51
|
-
|
|
52
|
-
```jsonc
|
|
53
|
-
// ~/.claude.json (or your project .claude.json)
|
|
54
|
-
{
|
|
55
|
-
"mcpServers": {
|
|
56
|
-
"openlife-orchestrator": {
|
|
57
|
-
// contents of .openlife/mcp/openlife-orchestrator.json
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
The auto-merge is deferred because writing to `~/.claude.json` is a security/UX trap (clobbering operator config). Per Story 3.3, operator-driven merge is the chosen contract.
|
|
64
|
-
|
|
65
|
-
## Known limitations
|
|
66
|
-
|
|
67
|
-
- `bin/openlife-mcp.js` (the MCP server itself) is not yet shipped — the manifest is informational until a later v1.1 story lands the server.
|
|
68
|
-
- After install, `openlife system doctor` will surface a "MCP server pending" note; that is expected.
|
|
69
|
-
- The wizard does not auto-merge `~/.claude.json`; operator action required (see MCP integration above).
|
|
70
|
-
|
|
71
|
-
## After install
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
openlife system doctor # validate the install
|
|
75
|
-
openlife system status # surface runtime state
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
In Claude Code itself:
|
|
79
|
-
|
|
80
|
-
- `/openlife:status` — runtime status surface
|
|
81
|
-
- `/openlife:ask` — route a question through the Brain
|
|
82
|
-
- `/openlife:doctor` — diagnostic check
|
|
83
|
-
- `/openlife:dream` — Dream Organizer entry point
|