@amsterdamdatalabs/enact-extensions 0.1.1 → 0.1.3
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/README.md +4 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +82 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +187 -35
- package/dist/install.js.map +1 -1
- package/dist/internal/codex.d.ts.map +1 -1
- package/dist/internal/codex.js +7 -1
- package/dist/internal/codex.js.map +1 -1
- package/dist/internal/platform.d.ts +8 -0
- package/dist/internal/platform.d.ts.map +1 -1
- package/dist/internal/platform.js +46 -2
- package/dist/internal/platform.js.map +1 -1
- package/dist/provision.d.ts +30 -0
- package/dist/provision.d.ts.map +1 -0
- package/dist/provision.js +202 -0
- package/dist/provision.js.map +1 -0
- package/dist/validate/index.d.ts +23 -0
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +80 -0
- package/dist/validate/index.js.map +1 -1
- package/extensions/enact-context/.agents/plugin.json +40 -0
- package/extensions/enact-context/.mcp.json +8 -0
- package/extensions/enact-context/README.md +25 -0
- package/extensions/enact-context/assets/icon.png +0 -0
- package/extensions/enact-context/assets/logo.png +0 -0
- package/extensions/enact-context/hooks/hooks.json +115 -0
- package/extensions/enact-context/skills/enact-context/SKILL.md +149 -0
- package/extensions/enact-context/skills/enact-context/scripts/install.sh +69 -0
- package/extensions/enact-factory/.agents/plugin.json +42 -0
- package/extensions/enact-factory/.mcp.json +8 -0
- package/extensions/enact-factory/assets/icon.png +0 -0
- package/extensions/enact-factory/assets/logo.png +0 -0
- package/extensions/enact-factory/hooks/user-prompt-submit.mjs +67 -0
- package/extensions/enact-factory/skills/testing-strategy/SKILL.md +167 -0
- package/extensions/enact-factory/skills/workitem-triage/SKILL.md +22 -0
- package/extensions/enact-operator/.agents/plugin.json +57 -0
- package/extensions/enact-operator/.app.json +3 -0
- package/extensions/enact-operator/.mcp.json +10 -0
- package/extensions/enact-operator/_taxonomy.md +86 -0
- package/extensions/enact-operator/agents/README.md +5 -0
- package/extensions/enact-operator/agents/architect.toml +25 -0
- package/extensions/enact-operator/agents/code-reviewer.toml +24 -0
- package/extensions/enact-operator/agents/critic.toml +30 -0
- package/extensions/enact-operator/agents/executor.toml +24 -0
- package/extensions/enact-operator/agents/explore.toml +23 -0
- package/extensions/enact-operator/agents/planner.toml +24 -0
- package/extensions/enact-operator/agents/verifier.toml +24 -0
- package/extensions/enact-operator/assets/icon.png +0 -0
- package/extensions/enact-operator/assets/logo.png +0 -0
- package/extensions/enact-operator/commands/doctor.md +39 -0
- package/extensions/enact-operator/commands/setup.md +51 -0
- package/extensions/enact-operator/hooks/hooks.json +146 -0
- package/extensions/enact-operator/skills/_variants.md +44 -0
- package/extensions/enact-operator/skills/ai-slop-cleaner/SKILL.md +50 -0
- package/extensions/enact-operator/skills/analyze/SKILL.md +91 -0
- package/extensions/enact-operator/skills/ask/SKILL.md +47 -0
- package/extensions/enact-operator/skills/autopilot/SKILL.md +170 -0
- package/extensions/enact-operator/skills/autoresearch-goal/SKILL.md +79 -0
- package/extensions/enact-operator/skills/cancel/SKILL.md +99 -0
- package/extensions/enact-operator/skills/configure-notifications/SKILL.md +77 -0
- package/extensions/enact-operator/skills/deep-interview/SKILL.md +80 -0
- package/extensions/enact-operator/skills/doctor/SKILL.md +48 -0
- package/extensions/enact-operator/skills/hud/SKILL.md +49 -0
- package/extensions/enact-operator/skills/hyperplan/SKILL.md +47 -0
- package/extensions/enact-operator/skills/plan/SKILL.md +78 -0
- package/extensions/enact-operator/skills/ralph/SKILL.md +201 -0
- package/extensions/enact-operator/skills/ralph/gemini.md +18 -0
- package/extensions/enact-operator/skills/ralplan/SKILL.md +151 -0
- package/extensions/enact-operator/skills/remove-deadcode/SKILL.md +45 -0
- package/extensions/enact-operator/skills/research/SKILL.md +74 -0
- package/extensions/enact-operator/skills/review/SKILL.md +58 -0
- package/extensions/enact-operator/skills/security-research/SKILL.md +54 -0
- package/extensions/enact-operator/skills/setup/SKILL.md +91 -0
- package/extensions/enact-operator/skills/setup/scripts/install.sh +50 -0
- package/extensions/enact-operator/skills/skill/SKILL.md +82 -0
- package/extensions/enact-operator/skills/tdd/SKILL.md +59 -0
- package/extensions/enact-operator/skills/team/SKILL.md +199 -0
- package/extensions/enact-operator/skills/trace/SKILL.md +41 -0
- package/extensions/enact-operator/skills/ultragoal/SKILL.md +99 -0
- package/extensions/enact-operator/skills/ultraqa/SKILL.md +113 -0
- package/extensions/enact-operator/skills/ultrawork/SKILL.md +145 -0
- package/extensions/enact-operator/skills/ultrawork/planner.md +28 -0
- package/extensions/enact-operator/skills/wiki/SKILL.md +41 -0
- package/extensions/enact-operator/skills/work-with-workitem/SKILL.md +51 -0
- package/extensions/enact-wiki/.agents/plugin.json +42 -0
- package/extensions/enact-wiki/.mcp.json +15 -0
- package/extensions/enact-wiki/README.md +44 -0
- package/extensions/enact-wiki/assets/icon.png +0 -0
- package/extensions/enact-wiki/assets/logo.png +0 -0
- package/extensions/enact-wiki/skills/document-parser/SKILL.md +17 -0
- package/extensions/enact-wiki/skills/document-parser/scripts/parse.sh +60 -0
- package/extensions/enact-wiki/skills/document-parser/skill.json +9 -0
- package/extensions/enact-wiki/skills/enact-wiki/SKILL.md +30 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/ingest.md +62 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/manage.md +34 -0
- package/extensions/enact-wiki/skills/enact-wiki/references/query.md +59 -0
- package/extensions/enact-wiki/skills/search-lab/SKILL.md +57 -0
- package/extensions/enact-wiki/skills/search-lab/scripts/analyze.ts +23 -0
- package/package.json +1 -1
- package/scripts/enact-extensions.mjs +79 -12
- package/scripts/lib/hooks.mjs +352 -0
- package/scripts/lib/ledger.mjs +4 -3
- package/scripts/lib/provision-mcp.mjs +12 -365
- package/scripts/lib/run-install.mjs +87 -5
- package/scripts/lib/run-prune.mjs +73 -0
- package/scripts/lib/run-sync.mjs +9 -1
- package/scripts/lib/run-uninstall.mjs +26 -2
- package/scripts/lib/run-validate.mjs +10 -1
- package/scripts/lib/serve.mjs +19 -1
- package/scripts/version-bump.sh +463 -0
- package/spec/codex.json +1 -11
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cancel
|
|
3
|
+
description: "Explicit termination of any active Operator mode (ralph, ultrawork, team). Cleans up state and leaves no dangling sessions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Cancel
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Stops all active Operator execution modes cleanly. Each running mode (ralph loops, ultrawork sessions, team sessions) must be explicitly aborted or shut down — not just ignored. After cancel completes, no session remains in a running, claimed, or paused state.
|
|
10
|
+
|
|
11
|
+
## Use When
|
|
12
|
+
- A ralph loop, ultrawork session, or team session must be stopped before it completes
|
|
13
|
+
- A session is stuck, blocked indefinitely, or no longer relevant
|
|
14
|
+
- The operator wants a clean slate before starting a new workflow
|
|
15
|
+
|
|
16
|
+
## Execution Policy
|
|
17
|
+
|
|
18
|
+
- start from the repo and `.enact/operator/` truth, not chat memory
|
|
19
|
+
- if `operator_*` tools are not visible yet, load/search the Enact Operator MCP namespace before doing cancellation work
|
|
20
|
+
- drive cancellation through MCP tools when running inside Codex; CLI commands are the equivalent operator surface
|
|
21
|
+
- keep state current as you go — confirm each abort before moving to the next mode
|
|
22
|
+
|
|
23
|
+
## Lifecycle
|
|
24
|
+
|
|
25
|
+
### Step 1 — Inventory active modes
|
|
26
|
+
Check each execution surface for active state:
|
|
27
|
+
- MCP: `operator_ralph_status`, `operator_ultrawork_status`, `operator_team_status`
|
|
28
|
+
- CLI:
|
|
29
|
+
```
|
|
30
|
+
enact-operator ralph status
|
|
31
|
+
enact-operator ultrawork status
|
|
32
|
+
enact-operator team status
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 2 — Cancel ralph loops
|
|
36
|
+
For each loop returned by ralph status that is not already complete:
|
|
37
|
+
- MCP: `operator_ralph_abort` with `reason`
|
|
38
|
+
- CLI: `enact-operator ralph abort <loopId>`
|
|
39
|
+
|
|
40
|
+
### Step 3 — Cancel ultrawork sessions
|
|
41
|
+
For each session returned by ultrawork status that is not already complete:
|
|
42
|
+
- MCP: `operator_ultrawork_abort` with `reason`
|
|
43
|
+
- CLI: `enact-operator ultrawork abort <sessionId>`
|
|
44
|
+
|
|
45
|
+
### Step 4 — Shut down team sessions
|
|
46
|
+
For each team session returned by team status that is live:
|
|
47
|
+
- MCP: `operator_team_shutdown`
|
|
48
|
+
- CLI fallback: `enact-operator team shutdown`
|
|
49
|
+
|
|
50
|
+
### Step 5 — Verify clean state
|
|
51
|
+
Re-run each status command and confirm no active sessions remain:
|
|
52
|
+
- MCP: `operator_ralph_status`, `operator_ultrawork_status`, `operator_team_status`
|
|
53
|
+
- CLI:
|
|
54
|
+
```
|
|
55
|
+
enact-operator ralph status
|
|
56
|
+
enact-operator ultrawork status
|
|
57
|
+
enact-operator team status
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 6 — Confirm with doctor
|
|
61
|
+
- MCP: `operator_doctor`
|
|
62
|
+
- CLI: `enact-operator doctor`
|
|
63
|
+
|
|
64
|
+
## State Contract
|
|
65
|
+
- Reads: active session IDs from ralph status, ultrawork status, team status
|
|
66
|
+
- Writes: abort/shutdown records in `.enact/operator/state/` (managed by MCP tools or CLI commands)
|
|
67
|
+
- Does NOT delete `.enact/operator/` audit history unless the operator explicitly requests it
|
|
68
|
+
|
|
69
|
+
## MCP Tools
|
|
70
|
+
|
|
71
|
+
- `operator_ralph_status` — read current ralph state
|
|
72
|
+
- `operator_ralph_abort` — abort a ralph loop with a reason
|
|
73
|
+
- `operator_ultrawork_status` — read current ultrawork state
|
|
74
|
+
- `operator_ultrawork_abort` — abort an ultrawork session with a reason
|
|
75
|
+
- `operator_team_status` — read current team session state
|
|
76
|
+
- `operator_doctor` — confirm runtime health after cancellation
|
|
77
|
+
|
|
78
|
+
Prefer `operator_team_shutdown` when the Operator MCP namespace is available. The CLI remains a fallback operator surface.
|
|
79
|
+
|
|
80
|
+
## Commands
|
|
81
|
+
```
|
|
82
|
+
enact-operator ralph status
|
|
83
|
+
enact-operator ralph abort <loopId>
|
|
84
|
+
enact-operator ultrawork status
|
|
85
|
+
enact-operator ultrawork abort <sessionId>
|
|
86
|
+
enact-operator team status
|
|
87
|
+
enact-operator team shutdown
|
|
88
|
+
enact-operator doctor
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Activation
|
|
92
|
+
|
|
93
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
94
|
+
## Final Check
|
|
95
|
+
- `operator_ralph_status` shows no loops in `running` or `paused` state
|
|
96
|
+
- `operator_ultrawork_status` shows no sessions in `running` or `blocked` state
|
|
97
|
+
- `operator_team_status` shows no active team session
|
|
98
|
+
- `operator_doctor` reports clean
|
|
99
|
+
- Audit history in `.enact/operator/` is intact unless operator requested a clear
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: configure-notifications
|
|
3
|
+
description: "Operator-level notification configuration: read and write .enact/operator/state/notifications.json to control Operator runtime visibility."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Configure Notifications
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
Manages operator notification preferences for Operator runtime events. Notification configuration is stored in `.enact/operator/state/notifications.json`. This skill reads the current config, applies the requested changes, and verifies that Operator health is unaffected. There is no dedicated CLI command for notifications yet; this skill is operator-driven via direct file editing.
|
|
10
|
+
|
|
11
|
+
## Use When
|
|
12
|
+
- The operator wants to change which Operator events trigger notifications
|
|
13
|
+
- Notification delivery is broken or generating noise and needs to be adjusted
|
|
14
|
+
- Setting up notification preferences for the first time in a new project
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
1. Read the current notification configuration:
|
|
18
|
+
```
|
|
19
|
+
enact-operator state read notifications
|
|
20
|
+
```
|
|
21
|
+
If no file exists, the default is all events enabled.
|
|
22
|
+
|
|
23
|
+
2. Identify the notification contract. The file at `.enact/operator/state/notifications.json` is the operator's truth. Its shape:
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"events": {
|
|
27
|
+
"ralph.complete": true,
|
|
28
|
+
"ralph.fail": true,
|
|
29
|
+
"ultrawork.complete": true,
|
|
30
|
+
"ultrawork.block": true,
|
|
31
|
+
"team.task.complete": true,
|
|
32
|
+
"team.task.blocked": true,
|
|
33
|
+
"doctor.fail": true
|
|
34
|
+
},
|
|
35
|
+
"delivery": {
|
|
36
|
+
"console": true,
|
|
37
|
+
"hud": true
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. Edit `.enact/operator/state/notifications.json` with the requested changes.
|
|
43
|
+
|
|
44
|
+
4. Verify the configuration is valid JSON (no trailing commas, well-formed):
|
|
45
|
+
```
|
|
46
|
+
node -e "JSON.parse(require('fs').readFileSync('.enact/operator/state/notifications.json','utf8'))"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
5. Run doctor to confirm Operator runtime is unaffected:
|
|
50
|
+
```
|
|
51
|
+
enact-operator doctor
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
6. Check the HUD to confirm visibility settings reflect the new configuration:
|
|
55
|
+
```
|
|
56
|
+
enact-operator hud
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## State Contract
|
|
60
|
+
- Reads: `.enact/operator/state/notifications.json`
|
|
61
|
+
- Writes: `.enact/operator/state/notifications.json`
|
|
62
|
+
|
|
63
|
+
## Commands
|
|
64
|
+
```
|
|
65
|
+
enact-operator state read notifications
|
|
66
|
+
enact-operator doctor
|
|
67
|
+
enact-operator hud
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Activation
|
|
71
|
+
|
|
72
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
73
|
+
## Final Check
|
|
74
|
+
- `.enact/operator/state/notifications.json` is valid JSON
|
|
75
|
+
- Requested event flags match the operator's intent
|
|
76
|
+
- `enact-operator doctor` passes after the edit
|
|
77
|
+
- `enact-operator hud` reflects updated visibility settings
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: deep-interview
|
|
3
|
+
description: "Intent-first clarification loop for vague, risky, or product-heavy work before planning or execution."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deep Interview
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Use `$deep-interview` to turn a fuzzy request into an execution-ready spec. This is not generic brainstorming. It is a focused clarification loop that removes ambiguity before planning or coding.
|
|
11
|
+
|
|
12
|
+
## Use When
|
|
13
|
+
|
|
14
|
+
- the request describes outcomes, not behavior
|
|
15
|
+
- the user is still discovering what they want
|
|
16
|
+
- scope, non-goals, or decision boundaries are unclear
|
|
17
|
+
- a wrong assumption would create expensive rework
|
|
18
|
+
|
|
19
|
+
## Do Not Use When
|
|
20
|
+
|
|
21
|
+
- the request already names files, symbols, and acceptance criteria
|
|
22
|
+
- the user explicitly wants immediate execution and the risk is low
|
|
23
|
+
- the only missing work is architectural decomposition, not intent clarity
|
|
24
|
+
|
|
25
|
+
## Execution Policy
|
|
26
|
+
|
|
27
|
+
- ask one question at a time
|
|
28
|
+
- ask only the highest-leverage unresolved question
|
|
29
|
+
- use repo facts before asking about codebase internals
|
|
30
|
+
- force clarity on non-goals and decision boundaries before handoff
|
|
31
|
+
- keep the interview moving toward a durable artifact, not an endless conversation
|
|
32
|
+
|
|
33
|
+
## Question Order
|
|
34
|
+
|
|
35
|
+
1. Why does this need to exist?
|
|
36
|
+
2. What should be true when it is done?
|
|
37
|
+
3. How far should it go?
|
|
38
|
+
4. What should explicitly stay out?
|
|
39
|
+
5. What may Enact Operator decide without checking again?
|
|
40
|
+
6. What constraints or preferences are hard?
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. Read current `.enact/operator/` artifacts and inspect the repo if this is brownfield work.
|
|
45
|
+
2. Capture the current hypothesis in `.enact/operator/plans/<phase>-requirements.md`.
|
|
46
|
+
3. Run a one-question loop until these are explicit:
|
|
47
|
+
- goal
|
|
48
|
+
- in-scope
|
|
49
|
+
- out-of-scope
|
|
50
|
+
- acceptance criteria
|
|
51
|
+
- decision boundaries
|
|
52
|
+
4. Refresh the session/state record when the interview starts or resumes:
|
|
53
|
+
- MCP: `operator_session_start`
|
|
54
|
+
- CLI fallback: `enact-operator session start`
|
|
55
|
+
5. Update:
|
|
56
|
+
- `.enact/operator/plans/<phase>-requirements.md`
|
|
57
|
+
- `.enact/operator/research/summary.md`
|
|
58
|
+
- `.enact/operator/state/planning-state.json`
|
|
59
|
+
6. Hand off to `$plan` when the spec is concrete.
|
|
60
|
+
|
|
61
|
+
## Output Standard
|
|
62
|
+
|
|
63
|
+
The finished interview should leave behind:
|
|
64
|
+
|
|
65
|
+
- clear goal
|
|
66
|
+
- explicit non-goals
|
|
67
|
+
- decision boundaries
|
|
68
|
+
- testable acceptance criteria
|
|
69
|
+
- constraints that downstream execution must honor
|
|
70
|
+
|
|
71
|
+
## Stop Conditions
|
|
72
|
+
|
|
73
|
+
Do not hand off while either of these is missing:
|
|
74
|
+
|
|
75
|
+
- non-goals
|
|
76
|
+
- decision boundaries
|
|
77
|
+
|
|
78
|
+
## Activation
|
|
79
|
+
|
|
80
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: doctor
|
|
3
|
+
description: "Health-check mode for Enact Operator install, repo state, plugin wiring, hook status, and runtime degradation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Doctor
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Use `$doctor` when setup, runtime behavior, hooks, or the source plugin bundle feels wrong. This skill is for diagnosis plus the shortest correct remediation path.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Run the primary health surface:
|
|
15
|
+
- MCP: `operator_doctor`
|
|
16
|
+
- CLI fallback: `enact-operator doctor`
|
|
17
|
+
2. If the problem is plugin-source-related, inspect:
|
|
18
|
+
- MCP: `operator_plugin_list` / `operator_plugin_validate`
|
|
19
|
+
- CLI fallback: `enact-operator plugins validate`
|
|
20
|
+
3. If the problem is hook-related, inspect:
|
|
21
|
+
- MCP: `operator_hooks_status`
|
|
22
|
+
- CLI fallback: `enact-operator hooks status`
|
|
23
|
+
4. If the problem is session or team-runtime-related, inspect:
|
|
24
|
+
- `operator_session_status`
|
|
25
|
+
- `operator_team_status`
|
|
26
|
+
- `operator_hud`
|
|
27
|
+
5. Turn findings into concrete fixes, not generic advice.
|
|
28
|
+
|
|
29
|
+
## What to Check
|
|
30
|
+
|
|
31
|
+
- Node and Codex availability
|
|
32
|
+
- MCP server configured in `~/.codex/config.toml`
|
|
33
|
+
- `.enact/operator/` initialized in the current repo
|
|
34
|
+
- tmux availability vs degraded mock mode
|
|
35
|
+
- source plugin bundle validity; host install and marketplace drift are owned by enact-extensions
|
|
36
|
+
- hook installation state vs feature availability
|
|
37
|
+
- session, inbox, review, and task drift
|
|
38
|
+
|
|
39
|
+
## Output Standard
|
|
40
|
+
|
|
41
|
+
- what is healthy
|
|
42
|
+
- what is degraded
|
|
43
|
+
- what is broken
|
|
44
|
+
- the exact command or file change to fix each issue
|
|
45
|
+
|
|
46
|
+
## Activation
|
|
47
|
+
|
|
48
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hud
|
|
3
|
+
description: "Runtime-truth mode for reading tasks, sessions, reviews, inbox, and team state before acting."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# HUD
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Use `$hud` before trusting your memory of what the runtime is doing. The HUD is the fastest way to catch task drift, stale executor state, or fake progress.
|
|
11
|
+
|
|
12
|
+
## Primary Surfaces
|
|
13
|
+
|
|
14
|
+
- MCP: `operator_hud`
|
|
15
|
+
- CLI fallback: `enact-operator hud`
|
|
16
|
+
|
|
17
|
+
## Read It For
|
|
18
|
+
|
|
19
|
+
- current session and branch
|
|
20
|
+
- active modes
|
|
21
|
+
- queued vs active vs review tasks
|
|
22
|
+
- inbox and review pressure
|
|
23
|
+
- team backend state and stale executors
|
|
24
|
+
- install-registry drift
|
|
25
|
+
- doctor warnings that change operator decisions
|
|
26
|
+
- if `operator_*` tools are not visible yet, load/search the Enact Operator MCP namespace before reading runtime state
|
|
27
|
+
|
|
28
|
+
## Workflow
|
|
29
|
+
|
|
30
|
+
1. Read the HUD.
|
|
31
|
+
2. If anything looks wrong, drill down with:
|
|
32
|
+
- `operator_session_status`
|
|
33
|
+
- `operator_task_list`
|
|
34
|
+
- `operator_reviews_list`
|
|
35
|
+
- `operator_inbox_list`
|
|
36
|
+
- `operator_team_status`
|
|
37
|
+
- `operator_ledger_recent`
|
|
38
|
+
3. Compare it against the actual `.enact/operator/` artifacts if needed.
|
|
39
|
+
4. Fix state drift before continuing execution.
|
|
40
|
+
|
|
41
|
+
## Rules
|
|
42
|
+
|
|
43
|
+
- if the HUD says a mode is active, there must be durable evidence
|
|
44
|
+
- if the HUD says the team is healthy but inbox or reviews are piling up, the runtime is not healthy
|
|
45
|
+
- prefer MCP state tools when another agent needs machine-readable output
|
|
46
|
+
|
|
47
|
+
## Activation
|
|
48
|
+
|
|
49
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hyperplan
|
|
3
|
+
description: "Three-round adversarial planning debate that hands a distilled bundle to $plan instead of writing the final plan directly."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hyperplan
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Use `$hyperplan` when a plan needs adversarial pressure before execution starts.
|
|
11
|
+
|
|
12
|
+
## Debate Team
|
|
13
|
+
|
|
14
|
+
Use exactly this 4-agent team:
|
|
15
|
+
|
|
16
|
+
- `critic`
|
|
17
|
+
- `critic`
|
|
18
|
+
- `architect`
|
|
19
|
+
- `explore`
|
|
20
|
+
|
|
21
|
+
The original openagent placeholder names are not used here.
|
|
22
|
+
|
|
23
|
+
## Rounds
|
|
24
|
+
|
|
25
|
+
Run exactly 3 rounds:
|
|
26
|
+
|
|
27
|
+
1. independent analysis
|
|
28
|
+
2. cross-attack
|
|
29
|
+
3. defend, refine, or concede
|
|
30
|
+
|
|
31
|
+
Persist each round under:
|
|
32
|
+
|
|
33
|
+
- `.enact/operator/hyperplan/<sessionId>/round-1.md`
|
|
34
|
+
- `.enact/operator/hyperplan/<sessionId>/round-2.md`
|
|
35
|
+
- `.enact/operator/hyperplan/<sessionId>/round-3.md`
|
|
36
|
+
|
|
37
|
+
## Handoff Rule
|
|
38
|
+
|
|
39
|
+
The lead agent does not write the final implementation plan directly.
|
|
40
|
+
After round 3, hand the distilled debate bundle to a separate `$plan` invocation.
|
|
41
|
+
|
|
42
|
+
## Execution Notes
|
|
43
|
+
|
|
44
|
+
- use `explore` to gather the evidence bundle before critique
|
|
45
|
+
- use the two `critic` agents to take opposing positions in the cross-attack round
|
|
46
|
+
- use `architect` to synthesize the final structured verdict and tradeoffs
|
|
47
|
+
- do not skip a round because the first opinion looked sufficient
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: "Execution-plan mode that turns intent into small, verifiable slices backed by durable .enact/operator artifacts."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Use `$plan` to create execution-ready slices. The output is not a strategy memo. It is the prompt-quality plan that downstream execution can follow without improvising core behavior.
|
|
11
|
+
|
|
12
|
+
## Use When
|
|
13
|
+
|
|
14
|
+
- the work is bigger than a one-shot edit
|
|
15
|
+
- the request is clear enough to plan but not yet safe to execute
|
|
16
|
+
- verification, dependencies, or sequencing need to be locked in
|
|
17
|
+
|
|
18
|
+
## Do Not Use When
|
|
19
|
+
|
|
20
|
+
- the task is still ambiguous enough for `$deep-interview`
|
|
21
|
+
- the change is a trivial single-file fix
|
|
22
|
+
- the user explicitly wants direct execution and the risk is low
|
|
23
|
+
|
|
24
|
+
## Execution Policy
|
|
25
|
+
|
|
26
|
+
- gather repo facts before asking about internals
|
|
27
|
+
- plans are prompts for execution, not prose for humans only
|
|
28
|
+
- every slice must fit in one focused context window
|
|
29
|
+
- every slice must have explicit verification
|
|
30
|
+
- prefer a small number of high-quality slices over a long TODO dump
|
|
31
|
+
|
|
32
|
+
## Plan Anatomy
|
|
33
|
+
|
|
34
|
+
Each slice should answer:
|
|
35
|
+
|
|
36
|
+
- what files are likely to change
|
|
37
|
+
- what the slice must do
|
|
38
|
+
- how to verify it
|
|
39
|
+
- what counts as done
|
|
40
|
+
- what it depends on
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
1. Read current intent artifacts:
|
|
45
|
+
- `.enact/operator/plans/*-requirements.md`
|
|
46
|
+
- `.enact/operator/plans/brownfield-map.md`
|
|
47
|
+
- `.enact/operator/research/summary.md`
|
|
48
|
+
2. Derive the must-haves from the goal backward:
|
|
49
|
+
- what must be true when this is done?
|
|
50
|
+
- what artifacts and connections are required for those truths?
|
|
51
|
+
3. Split the work into waves and slices:
|
|
52
|
+
- interface or contracts first
|
|
53
|
+
- implementation second
|
|
54
|
+
- verification and wiring last
|
|
55
|
+
4. Write or refine:
|
|
56
|
+
- active phase plan
|
|
57
|
+
- verification map
|
|
58
|
+
- any required task queue items
|
|
59
|
+
5. If Ultrawork is active, link the plan id into session state:
|
|
60
|
+
- MCP: `operator_ultrawork_link_plan`
|
|
61
|
+
- CLI fallback: `enact-operator ultrawork link-plan <planId>`
|
|
62
|
+
|
|
63
|
+
## Quality Bar
|
|
64
|
+
|
|
65
|
+
- no vague acceptance criteria
|
|
66
|
+
- no "make it work" tasks
|
|
67
|
+
- no giant slice that hides three subsystems
|
|
68
|
+
- no verify step that depends on hope
|
|
69
|
+
|
|
70
|
+
## Deliverables
|
|
71
|
+
|
|
72
|
+
- `.enact/operator/plans/<phase>.md`
|
|
73
|
+
- `.enact/operator/plans/<phase>-verification.md`
|
|
74
|
+
- updated brownfield map or research summary when needed
|
|
75
|
+
|
|
76
|
+
## Activation
|
|
77
|
+
|
|
78
|
+
When a prompt contains `$enact-operator:<skill-name>` or `$<skill-name>`, Operator's UserPromptSubmit hook records the invocation in `.enact/operator/state/skill-active.json` and adds an MCP-first context note for the agent. That note tells the agent to load/search the Enact Operator MCP namespace immediately if `operator_*` tools are not visible yet, then prefer `operator_*` tools over the `enact-operator` CLI. This skill is operator-driven — there is no durable workflow state to start automatically. The activation log gives operators and the HUD a trace of which skills were explicitly invoked.
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralph
|
|
3
|
+
description: "Self-referential execution loop with mandatory verification gates. Use when the user wants work completed end-to-end with fresh evidence before stopping."
|
|
4
|
+
lane: true
|
|
5
|
+
mcpToolPrefix: operator_ralph_
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Ralph
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
`$ralph` is the persistence wrapper for Operator work. It runs a goal forward through implementation, records gate verifications, and refuses to exit until all mandatory gates pass. It is the right mode when partial completion is unacceptable and fresh evidence is required before closeout.
|
|
13
|
+
|
|
14
|
+
## Use When
|
|
15
|
+
|
|
16
|
+
- the user wants work shipped without a premature stop
|
|
17
|
+
- verification must be recorded, not assumed
|
|
18
|
+
- multiple audit gates (doctor, provider-boundary, replacement-readiness, tests) must all pass before done
|
|
19
|
+
- a previous attempt left work in an incomplete or unverified state
|
|
20
|
+
|
|
21
|
+
## Execution Policy
|
|
22
|
+
|
|
23
|
+
- start from the repo and `.enact/operator/` truth, not chat memory
|
|
24
|
+
- if `operator_*` tools are not visible yet, load/search the Enact Operator MCP namespace before doing ralph lifecycle actions
|
|
25
|
+
- drive ralph through MCP tools when running inside Codex; CLI commands are the equivalent operator surface
|
|
26
|
+
- keep ralph, task, inbox, and review state current as you go
|
|
27
|
+
- when no external `taskId` is linked, local Operator task discipline is mandatory; Ralph owns a local task and must keep it authoritative
|
|
28
|
+
- do not stop until every mandatory gate is recorded as `passed` or the loop is explicitly aborted
|
|
29
|
+
|
|
30
|
+
## Routing Rules
|
|
31
|
+
|
|
32
|
+
- ambiguous goal -> run `$deep-interview` first, then start ralph with the clarified goal
|
|
33
|
+
- goal is clear -> start ralph immediately (MCP: `operator_ralph_start`)
|
|
34
|
+
- work is blocked on an external dependency -> `operator_ralph_block` with the reason, resolve, then advance back to `running`
|
|
35
|
+
- all gates pass -> `operator_ralph_complete` is allowed only from phase=verifying
|
|
36
|
+
|
|
37
|
+
## Lifecycle
|
|
38
|
+
|
|
39
|
+
Phases in order: `idle` -> `running` -> `verifying` -> `completed`
|
|
40
|
+
|
|
41
|
+
Side exits from `running`: `blocked` (returns to `running` after resolution) or `aborted`
|
|
42
|
+
|
|
43
|
+
1. Start:
|
|
44
|
+
- MCP: `operator_ralph_start` with `goal`
|
|
45
|
+
- CLI: `enact-operator ralph start "<goal>"`
|
|
46
|
+
2. Implement the work while in phase `running`.
|
|
47
|
+
3. Advance to verification:
|
|
48
|
+
- MCP: `operator_ralph_advance` with `toPhase=verifying`
|
|
49
|
+
- CLI: `enact-operator ralph advance verifying`
|
|
50
|
+
4. Record each gate verdict:
|
|
51
|
+
- MCP: `operator_ralph_verify` with `gateId` and `status`
|
|
52
|
+
- CLI: `enact-operator ralph verify <gateId> <passed|failed> --evidence "<text>"`
|
|
53
|
+
5. All gates green:
|
|
54
|
+
- MCP: `operator_ralph_complete` with `summary`
|
|
55
|
+
- CLI: `enact-operator ralph complete "<summary>"`
|
|
56
|
+
6. If a gate fails: fix the underlying task, stay in phase `verifying`, re-verify.
|
|
57
|
+
|
|
58
|
+
## Mandatory Gates
|
|
59
|
+
|
|
60
|
+
| Gate ID | Name |
|
|
61
|
+
|----------------------------|-----------------------------|
|
|
62
|
+
| `doctor` | Operator doctor |
|
|
63
|
+
| `provider-boundary` | Provider boundary audit |
|
|
64
|
+
| `replacement-readiness` | Replacement readiness audit |
|
|
65
|
+
| `tests` | Real test suite |
|
|
66
|
+
|
|
67
|
+
These four gates are present by default. Do not skip them. Each must be recorded as `passed` before `complete` is allowed.
|
|
68
|
+
|
|
69
|
+
Additional rule:
|
|
70
|
+
|
|
71
|
+
- if the current Ralph run also carries a `contract-parity` gate in state,
|
|
72
|
+
treat it as mandatory and resolve it through the real gate output before
|
|
73
|
+
completion. Do not fabricate parity evidence.
|
|
74
|
+
|
|
75
|
+
## Workflow
|
|
76
|
+
|
|
77
|
+
1. Read current state:
|
|
78
|
+
- MCP: `operator_ralph_status`
|
|
79
|
+
- CLI: `enact-operator ralph status`
|
|
80
|
+
2. If no ralph is active, start one:
|
|
81
|
+
- MCP: `operator_ralph_start` with `goal`
|
|
82
|
+
- CLI: `enact-operator ralph start "<goal>"`
|
|
83
|
+
3. Implement the work. Keep changes atomic and verifiable.
|
|
84
|
+
4. When implementation is done, advance to `verifying`:
|
|
85
|
+
- MCP: `operator_ralph_advance` with `toPhase=verifying`, `note="Implementation complete"`
|
|
86
|
+
5. Run the doctor and record:
|
|
87
|
+
- Run: `operator_doctor` (or CLI `enact-operator doctor`)
|
|
88
|
+
- Record: `operator_ralph_verify` with `gateId=doctor`, `status=passed`, `evidence="doctor output clean"`
|
|
89
|
+
6. Run the provider-boundary audit and record:
|
|
90
|
+
- Run: `operator_audit_provider_boundary`
|
|
91
|
+
- Record: `operator_ralph_verify` with `gateId=provider-boundary`, `status=passed`, `evidence="<audit output>"`
|
|
92
|
+
7. Run the replacement-readiness audit and record:
|
|
93
|
+
- Run: `operator_audit_replacement_readiness`
|
|
94
|
+
- Record: `operator_ralph_verify` with `gateId=replacement-readiness`, `status=passed`, `evidence="<audit output>"`
|
|
95
|
+
8. Run the test suite and record:
|
|
96
|
+
- Record: `operator_ralph_verify` with `gateId=tests`, `status=passed`, `evidence="N tests passed"`
|
|
97
|
+
9. If a `contract-parity` gate is present, run it through the MCP surface:
|
|
98
|
+
- `operator_contract_parity_run`
|
|
99
|
+
- use its returned status/evidence directly when recording the gate
|
|
100
|
+
10. If state drift is suspected during verification, run the hygiene gate
|
|
101
|
+
through the Operator surface and fail closed on contradictions:
|
|
102
|
+
- `runStateHygieneCheck` is the underlying verifier
|
|
103
|
+
- use `operator_operator_snapshot` / `operator_hud` / `operator_workflow_reconcile`
|
|
104
|
+
to gather state evidence before recording verdicts
|
|
105
|
+
11. If any verification fails: fix the root cause, do NOT fabricate evidence. Re-run and re-record.
|
|
106
|
+
12. Once all four gates are `passed`:
|
|
107
|
+
- MCP: `operator_ralph_complete` with `summary`
|
|
108
|
+
- CLI: `enact-operator ralph complete "<one-line summary>"`
|
|
109
|
+
13. Check HUD:
|
|
110
|
+
- MCP: `operator_hud`
|
|
111
|
+
- CLI: `enact-operator hud`
|
|
112
|
+
|
|
113
|
+
## State Contract
|
|
114
|
+
|
|
115
|
+
- State file: `.enact/operator/state/ralph.json`
|
|
116
|
+
- Ralph reads and writes this file throughout the loop.
|
|
117
|
+
- On completion, the file reflects phase=completed, all gates passed, evidence recorded.
|
|
118
|
+
- On abort, phase=aborted with a reason string.
|
|
119
|
+
- Do not manually edit the state file. Use the MCP tools or equivalent CLI commands.
|
|
120
|
+
|
|
121
|
+
## MCP Tools
|
|
122
|
+
|
|
123
|
+
The full Ralph lifecycle is exposed through the `enact-operator` MCP server:
|
|
124
|
+
|
|
125
|
+
- `operator_ralph_start` — start a new ralph loop
|
|
126
|
+
- `operator_ralph_status` — read current ralph state
|
|
127
|
+
- `operator_ralph_advance` — transition to a new phase
|
|
128
|
+
- `operator_ralph_verify` — record a gate verdict with evidence
|
|
129
|
+
- `operator_ralph_pause` — pause an active loop
|
|
130
|
+
- `operator_ralph_resume` — resume a paused loop
|
|
131
|
+
- `operator_ralph_block` — mark blocked with a reason
|
|
132
|
+
- `operator_ralph_complete` — close the loop with a summary (phase=verifying with all gates passed)
|
|
133
|
+
- `operator_ralph_abort` — abort with a reason
|
|
134
|
+
|
|
135
|
+
Supporting tools used during the workflow: `operator_doctor`, `operator_audit_provider_boundary`, `operator_audit_replacement_readiness`, `operator_hud`.
|
|
136
|
+
|
|
137
|
+
Important:
|
|
138
|
+
|
|
139
|
+
- `contract-parity` is provider-first. Operator may call the running
|
|
140
|
+
`enact-context` server surface through its adapter layer to prove declared
|
|
141
|
+
commands/events/UI/tests/hooks. That is expected and correct.
|
|
142
|
+
- `state-hygiene` is no longer a stub. If it fails, Ralph should not close.
|
|
143
|
+
|
|
144
|
+
## CLI Equivalents
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Start a new loop
|
|
148
|
+
enact-operator ralph start "Implement provider hot-swap without downtime"
|
|
149
|
+
|
|
150
|
+
# Start with explicit task links and custom gates
|
|
151
|
+
enact-operator ralph start "Fix install path" --task-id abc123 --gate "lint:Lint check"
|
|
152
|
+
|
|
153
|
+
# Read state
|
|
154
|
+
enact-operator ralph status
|
|
155
|
+
|
|
156
|
+
# Advance phase
|
|
157
|
+
enact-operator ralph advance verifying --note "All code written"
|
|
158
|
+
|
|
159
|
+
# Record a gate
|
|
160
|
+
enact-operator ralph verify doctor passed --evidence "No errors, 3 warnings"
|
|
161
|
+
enact-operator ralph verify tests failed --evidence "2 failures in suite"
|
|
162
|
+
|
|
163
|
+
# Pause and resume
|
|
164
|
+
enact-operator ralph pause --note "Waiting on upstream merge"
|
|
165
|
+
enact-operator ralph resume --note "Upstream merged"
|
|
166
|
+
|
|
167
|
+
# Block and return
|
|
168
|
+
enact-operator ralph block "Cannot proceed without env var ENACT_API_KEY"
|
|
169
|
+
enact-operator ralph advance running --note "Env var added"
|
|
170
|
+
|
|
171
|
+
# Complete or abort
|
|
172
|
+
enact-operator ralph complete "Provider hot-swap ships cleanly, all 4 gates green"
|
|
173
|
+
enact-operator ralph abort "Goal invalidated by architecture change"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Activation
|
|
177
|
+
|
|
178
|
+
This skill is wired to Operator's UserPromptSubmit hook. When a prompt contains
|
|
179
|
+
an explicit marker like `$enact-operator:ralph "<goal>"` or `$ralph "<goal>"`
|
|
180
|
+
and the workspace-context hook preset is installed (verified via
|
|
181
|
+
`operator_hooks_status`), the hook automatically:
|
|
182
|
+
|
|
183
|
+
1. Detects the marker
|
|
184
|
+
2. Starts the durable state at `.enact/operator/state/ralph.json` before the agent reads its first turn of context
|
|
185
|
+
3. Adds an MCP-first context note telling the agent to load/search the Enact Operator MCP namespace immediately and continue through `operator_*` tools
|
|
186
|
+
4. Records the activation in `.enact/operator/state/skill-active.json`
|
|
187
|
+
|
|
188
|
+
That injected startup note is not AzDo-only. If no external `taskId` is linked, treat the local task as mandatory runtime state: read it through `operator_task_list` and keep it current throughout the run.
|
|
189
|
+
|
|
190
|
+
If hooks are not installed, OR the marker did not include a goal, OR you
|
|
191
|
+
want explicit control, call `operator_operator_activate` with `{skill: 'ralph',
|
|
192
|
+
goal: '<goal>'}` from the MCP tool surface. The result is idempotent — if
|
|
193
|
+
a ralph loop is already active, the activation is a no-op.
|
|
194
|
+
|
|
195
|
+
## Final Check
|
|
196
|
+
|
|
197
|
+
- Phase is `completed`, not `running` or `verifying` (check via `operator_ralph_status`).
|
|
198
|
+
- All four mandatory gates show `passed` in the ralph state.
|
|
199
|
+
- Every gate has non-empty evidence text — not a placeholder.
|
|
200
|
+
- `operator_hud` shows no active ralph loop outstanding.
|
|
201
|
+
- No fabricated evidence. Each gate result comes from a real command run.
|