@amsterdamdatalabs/enact-extensions 0.1.12 → 0.1.25
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 +11 -12
- package/dist/create/enact.js +1 -1
- package/dist/create/enact.js.map +1 -1
- package/dist/create/index.d.ts +4 -3
- package/dist/create/index.d.ts.map +1 -1
- package/dist/create/index.js +9 -2
- package/dist/create/index.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +5 -0
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +10 -3
- package/dist/install.js.map +1 -1
- package/dist/internal/agents.d.ts +6 -1
- package/dist/internal/agents.d.ts.map +1 -1
- package/dist/internal/agents.js +8 -4
- package/dist/internal/agents.js.map +1 -1
- package/dist/internal/claude.d.ts +24 -0
- package/dist/internal/claude.d.ts.map +1 -1
- package/dist/internal/claude.js +99 -0
- package/dist/internal/claude.js.map +1 -1
- package/dist/internal/platform.d.ts +3 -1
- package/dist/internal/platform.d.ts.map +1 -1
- package/dist/internal/platform.js +7 -1
- package/dist/internal/platform.js.map +1 -1
- package/dist/internal/types.d.ts +2 -1
- package/dist/internal/types.d.ts.map +1 -1
- package/dist/principles.d.ts +28 -0
- package/dist/principles.d.ts.map +1 -0
- package/dist/principles.js +159 -0
- package/dist/principles.js.map +1 -0
- package/extensions/dev-state/.agents/plugin.json +2 -1
- package/extensions/enact-context/.agents/plugin.json +2 -1
- package/extensions/enact-context/hooks/hooks.json +0 -10
- package/extensions/enact-context/skills/enact-context/SKILL.md +14 -12
- package/extensions/enact-context/skills/enact-context/scripts/install.sh +7 -7
- package/extensions/enact-core/.agents/plugin.json +2 -1
- package/extensions/enact-core/OPERATING-PRINCIPLES.md +7 -0
- package/extensions/enact-core/hooks/hooks.json +12 -0
- package/extensions/enact-evolve/.agents/plugin.json +47 -0
- package/extensions/enact-evolve/agents/evolve-session-analyst.toml +37 -0
- package/extensions/enact-evolve/skills/session-analysis/SKILL.md +98 -0
- package/extensions/enact-evolve/skills/session-analysis/scripts/run-evolve-analysis.sh +343 -0
- package/extensions/enact-factory/.agents/plugin.json +2 -2
- package/extensions/enact-factory/agents/architect.toml +9 -5
- package/extensions/enact-factory/agents/code-reviewer.toml +9 -5
- package/extensions/enact-factory/agents/critic.toml +9 -5
- package/extensions/enact-factory/agents/executor.toml +4 -1
- package/extensions/enact-factory/agents/explore.toml +4 -1
- package/extensions/enact-factory/agents/planner.toml +4 -1
- package/extensions/enact-factory/agents/verifier.toml +9 -5
- package/extensions/enact-factory/skills/advisor/SKILL.md +82 -0
- package/extensions/enact-factory/skills/ai-slop-cleaner/SKILL.md +6 -1
- package/extensions/enact-factory/skills/autonomous-runner/SKILL.md +347 -0
- package/extensions/enact-factory/skills/azdo-ci-strategy/SKILL.md +42 -15
- package/extensions/enact-factory/skills/committee/SKILL.md +80 -0
- package/extensions/enact-factory/skills/deep-interview/SKILL.md +9 -13
- package/extensions/enact-factory/skills/drive-loop/SKILL.md +161 -31
- package/extensions/enact-factory/skills/drive-loop/references/contract-schema.md +26 -6
- package/extensions/enact-factory/skills/handoff/SKILL.md +72 -0
- package/extensions/enact-factory/skills/hyperplan/SKILL.md +11 -3
- package/extensions/enact-factory/skills/looplan/SKILL.md +34 -17
- package/extensions/enact-factory/skills/plan/SKILL.md +40 -8
- package/extensions/enact-factory/skills/remove-deadcode/SKILL.md +6 -1
- package/extensions/enact-factory/skills/research/SKILL.md +14 -4
- package/extensions/enact-factory/skills/review/SKILL.md +21 -2
- package/extensions/enact-factory/skills/security-research/SKILL.md +5 -2
- package/extensions/enact-factory/skills/tdd/SKILL.md +7 -1
- package/extensions/enact-factory/skills/testing-strategy/SKILL.md +5 -0
- package/extensions/enact-factory/skills/trace/SKILL.md +5 -0
- package/extensions/enact-factory/skills/ultraqa/SKILL.md +21 -15
- package/extensions/enact-factory/skills/work-with-workitem/SKILL.md +5 -0
- package/extensions/enact-factory/skills/workitem-triage/SKILL.md +5 -0
- package/extensions/enact-loop/.agents/plugin.json +5 -4
- package/extensions/enact-loop/scripts/validate.mjs +123 -0
- package/extensions/enact-loop/skills/enact-loop/SKILL.md +189 -30
- package/extensions/enact-wiki/.agents/plugin.json +2 -1
- package/extensions/net-revenue-management/.agents/plugin.json +2 -1
- package/extensions/plugin-dev/.agents/plugin.json +2 -1
- package/extensions/plugin-dev/skills/start/SKILL.md +3 -3
- package/package.json +1 -1
- package/scripts/check-hooks.mjs +5 -5
- package/scripts/check-principles.mjs +19 -4
- package/scripts/enact-extensions.mjs +237 -90
- package/scripts/lib/hooks.mjs +61 -217
- package/scripts/lib/migrate-artifacts.mjs +144 -0
- package/scripts/lib/principles.mjs +109 -0
- package/scripts/lib/provision-mcp.mjs +1 -1
- package/scripts/lib/run-install.mjs +72 -2
- package/scripts/lib/run-prune.mjs +23 -2
- package/scripts/lib/run-sync.mjs +4 -1
- package/scripts/postinstall.mjs +6 -6
- package/scripts/setup-enact-context.sh +20 -15
- package/scripts/version-bump.sh +22 -1
- package/spec/codex.json +5 -0
- package/spec/enact.json +3 -3
- package/spec/enact.md +1 -4
- package/spec/index.json +1 -1
- package/extensions/enact-factory/hooks/hooks.json +0 -14
- package/extensions/enact-operator/.agents/plugin.json +0 -56
- package/extensions/enact-operator/.app.json +0 -3
- package/extensions/enact-operator/.mcp.json +0 -10
- package/extensions/enact-operator/_taxonomy.md +0 -86
- package/extensions/enact-operator/agents/README.md +0 -5
- package/extensions/enact-operator/agents/architect.toml +0 -25
- package/extensions/enact-operator/agents/code-reviewer.toml +0 -24
- package/extensions/enact-operator/agents/critic.toml +0 -30
- package/extensions/enact-operator/agents/executor.toml +0 -24
- package/extensions/enact-operator/agents/explore.toml +0 -23
- package/extensions/enact-operator/agents/planner.toml +0 -24
- package/extensions/enact-operator/agents/verifier.toml +0 -24
- package/extensions/enact-operator/docs/skill-variants.md +0 -44
- package/extensions/enact-operator/hooks/hooks.json +0 -91
- package/extensions/enact-operator/skills/ai-slop-cleaner/SKILL.md +0 -50
- package/extensions/enact-operator/skills/analyze/SKILL.md +0 -91
- package/extensions/enact-operator/skills/ask/SKILL.md +0 -47
- package/extensions/enact-operator/skills/autopilot/SKILL.md +0 -170
- package/extensions/enact-operator/skills/autoresearch-goal/SKILL.md +0 -79
- package/extensions/enact-operator/skills/cancel/SKILL.md +0 -99
- package/extensions/enact-operator/skills/configure-notifications/SKILL.md +0 -77
- package/extensions/enact-operator/skills/deep-interview/SKILL.md +0 -80
- package/extensions/enact-operator/skills/doctor/SKILL.md +0 -48
- package/extensions/enact-operator/skills/hud/SKILL.md +0 -49
- package/extensions/enact-operator/skills/hyperplan/SKILL.md +0 -47
- package/extensions/enact-operator/skills/plan/SKILL.md +0 -78
- package/extensions/enact-operator/skills/ralph/SKILL.md +0 -201
- package/extensions/enact-operator/skills/ralph/gemini.md +0 -18
- package/extensions/enact-operator/skills/ralplan/SKILL.md +0 -151
- package/extensions/enact-operator/skills/remove-deadcode/SKILL.md +0 -45
- package/extensions/enact-operator/skills/research/SKILL.md +0 -74
- package/extensions/enact-operator/skills/review/SKILL.md +0 -58
- package/extensions/enact-operator/skills/security-research/SKILL.md +0 -54
- package/extensions/enact-operator/skills/setup/SKILL.md +0 -91
- package/extensions/enact-operator/skills/setup/scripts/install.sh +0 -50
- package/extensions/enact-operator/skills/skill/SKILL.md +0 -82
- package/extensions/enact-operator/skills/tdd/SKILL.md +0 -59
- package/extensions/enact-operator/skills/team/SKILL.md +0 -199
- package/extensions/enact-operator/skills/trace/SKILL.md +0 -41
- package/extensions/enact-operator/skills/ultragoal/SKILL.md +0 -99
- package/extensions/enact-operator/skills/ultraqa/SKILL.md +0 -113
- package/extensions/enact-operator/skills/ultrawork/SKILL.md +0 -145
- package/extensions/enact-operator/skills/ultrawork/planner.md +0 -28
- package/extensions/enact-operator/skills/wiki/SKILL.md +0 -41
- package/extensions/enact-operator/skills/work-with-workitem/SKILL.md +0 -51
- /package/extensions/{enact-operator → enact-evolve}/assets/icon.png +0 -0
- /package/extensions/{enact-operator → enact-evolve}/assets/logo.png +0 -0
|
@@ -1,201 +0,0 @@
|
|
|
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.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Ralph (Gemini Variant)
|
|
2
|
-
|
|
3
|
-
You are running Ralph with a Gemini model identity.
|
|
4
|
-
|
|
5
|
-
Keep the same durable runtime contract as the default Ralph skill:
|
|
6
|
-
|
|
7
|
-
- drive the goal to completion with real state updates
|
|
8
|
-
- record evidence for every mandatory gate
|
|
9
|
-
- fail closed when evidence is missing or contradictory
|
|
10
|
-
- do not claim completion until all required gates are passed
|
|
11
|
-
|
|
12
|
-
## TOOL_CALL_MANDATE
|
|
13
|
-
|
|
14
|
-
- keep tool usage explicit, short, and sequential
|
|
15
|
-
- prefer direct MCP/tool results over narrative summaries
|
|
16
|
-
- when a gate depends on a command or runtime check, run it first and cite the result
|
|
17
|
-
- if a required tool is not visible, load/search the operator MCP namespace before continuing
|
|
18
|
-
- do not substitute inferred status for tool-backed evidence
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ralplan
|
|
3
|
-
description: "Plan-first Operator execution wrapper: write a durable plan, enter the Ralph loop, drive to verified completion."
|
|
4
|
-
lane: true
|
|
5
|
-
mcpToolPrefix: operator_ralplan_
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Ralplan
|
|
9
|
-
|
|
10
|
-
## Purpose
|
|
11
|
-
|
|
12
|
-
Use `$ralplan` when the work needs a reviewable execution plan before the Ralph loop starts. Ralplan is the disciplined alternative to `$autopilot` — it gates execution behind a plan the user or reviewer can inspect, then advances into Ralph's self-referential loop with explicit verification checkpoints.
|
|
13
|
-
|
|
14
|
-
Ralplan is the combination of `$plan` (write artifacts, define slices and verification) and `$ralph` (durable execution loop with phase gates). Neither sub-skill is optional.
|
|
15
|
-
|
|
16
|
-
## Use When
|
|
17
|
-
|
|
18
|
-
- The request is clear enough to plan but carries meaningful risk or complexity
|
|
19
|
-
- A written plan artifact needs to exist before any code changes
|
|
20
|
-
- Verification gates need to be defined up front, not discovered mid-execution
|
|
21
|
-
- The user wants to review the plan before execution begins
|
|
22
|
-
|
|
23
|
-
## Do Not Use When
|
|
24
|
-
|
|
25
|
-
- The request is still ambiguous — route through `$deep-interview` first, then return here
|
|
26
|
-
- The work is trivial and a plan would add no value
|
|
27
|
-
- The user explicitly wants unattended delivery without a plan review — use `$autopilot`
|
|
28
|
-
|
|
29
|
-
## Execution Policy
|
|
30
|
-
|
|
31
|
-
- start from the repo and `.enact/operator/` truth, not chat memory
|
|
32
|
-
- drive the workflow through MCP tools when running inside Codex; CLI commands are the equivalent operator surface
|
|
33
|
-
- keep ralph, task, and review state current as you go
|
|
34
|
-
- do not advance to the Ralph loop before the plan artifact exists and is reviewed
|
|
35
|
-
|
|
36
|
-
## Lifecycle
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
intent → $plan (write plan + verification map) → user review → $ralph start → running → verifying → completed
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Each transition is explicit. Never advance to the Ralph loop before the plan artifact exists and is reviewed.
|
|
43
|
-
|
|
44
|
-
## Workflow
|
|
45
|
-
|
|
46
|
-
### Phase 1 — Plan
|
|
47
|
-
|
|
48
|
-
1. Read current Operator artifacts:
|
|
49
|
-
- MCP: `operator_session_status`, `operator_state_read`
|
|
50
|
-
- CLI:
|
|
51
|
-
```
|
|
52
|
-
enact-operator session status
|
|
53
|
-
enact-operator state read
|
|
54
|
-
```
|
|
55
|
-
2. Write the plan to `.enact/operator/plans/<phase>.md` following `$plan` conventions:
|
|
56
|
-
- Named files per slice
|
|
57
|
-
- Explicit verification per slice
|
|
58
|
-
- Exit conditions stated
|
|
59
|
-
3. Write the verification map to `.enact/operator/plans/<phase>-verification.md`.
|
|
60
|
-
4. Link the plan artifact to ultrawork if an ultrawork session is active:
|
|
61
|
-
- MCP: `operator_ultrawork_link_plan` with the plan id
|
|
62
|
-
5. Present the plan for review. Do not advance until it is approved.
|
|
63
|
-
|
|
64
|
-
### Phase 2 — Execute
|
|
65
|
-
|
|
66
|
-
6. Start the Ralph loop with the goal and verification gates from the plan:
|
|
67
|
-
- MCP: `operator_ralph_start` with `goal`
|
|
68
|
-
- CLI: `enact-operator ralph start "<goal>" --gate g1:"<Gate Name>" --gate g2:"<Gate Name>"`
|
|
69
|
-
7. Confirm Ralph is running:
|
|
70
|
-
- MCP: `operator_ralph_status`
|
|
71
|
-
- CLI: `enact-operator ralph status`
|
|
72
|
-
8. Execute each plan slice. After each slice, record evidence:
|
|
73
|
-
- MCP: `operator_ralph_verify` with `gateId` and `status=passed`
|
|
74
|
-
- CLI: `enact-operator ralph verify <gateId> passed --evidence "<evidence text>"`
|
|
75
|
-
9. If blocked, record the blocker and pause:
|
|
76
|
-
- MCP: `operator_ralph_block` with reason, then `operator_ralph_pause`
|
|
77
|
-
- CLI:
|
|
78
|
-
```
|
|
79
|
-
enact-operator ralph block --note "<reason>"
|
|
80
|
-
enact-operator ralph pause
|
|
81
|
-
```
|
|
82
|
-
Resolve the block, then resume:
|
|
83
|
-
- MCP: `operator_ralph_resume`
|
|
84
|
-
- CLI: `enact-operator ralph resume`
|
|
85
|
-
|
|
86
|
-
### Phase 3 — Verify and Complete
|
|
87
|
-
|
|
88
|
-
10. When all gates have evidence, advance to the verifying phase:
|
|
89
|
-
- MCP: `operator_ralph_advance` with `toPhase=verifying`
|
|
90
|
-
- CLI: `enact-operator ralph advance verifying`
|
|
91
|
-
11. Run `$review` against the completed work and plan artifacts.
|
|
92
|
-
12. If review passes, complete the Ralph session:
|
|
93
|
-
- MCP: `operator_ralph_complete` with `summary`
|
|
94
|
-
- CLI: `enact-operator ralph complete`
|
|
95
|
-
13. If review returns changes requested, advance back to running and address findings:
|
|
96
|
-
- MCP: `operator_ralph_advance` with `toPhase=running`
|
|
97
|
-
- CLI: `enact-operator ralph advance running --note "<what changed>"`
|
|
98
|
-
|
|
99
|
-
## State Contract
|
|
100
|
-
|
|
101
|
-
Reads:
|
|
102
|
-
- `.enact/operator/plans/` (plan and verification map written in Phase 1)
|
|
103
|
-
- `.enact/operator/state/ralph-state.json` (Ralph loop state)
|
|
104
|
-
|
|
105
|
-
Writes:
|
|
106
|
-
- `.enact/operator/plans/<phase>.md`
|
|
107
|
-
- `.enact/operator/plans/<phase>-verification.md`
|
|
108
|
-
- Ralph state via MCP tools or CLI commands
|
|
109
|
-
|
|
110
|
-
## MCP Tools
|
|
111
|
-
|
|
112
|
-
- `operator_session_status` — read current session state
|
|
113
|
-
- `operator_state_read` — read active operator state
|
|
114
|
-
- `operator_ralph_start` — start a new ralph loop with goal and gates
|
|
115
|
-
- `operator_ralph_status` — read current ralph state
|
|
116
|
-
- `operator_ralph_advance` — transition to a new phase
|
|
117
|
-
- `operator_ralph_verify` — record a gate verdict with evidence
|
|
118
|
-
- `operator_ralph_block` — mark blocked with a reason
|
|
119
|
-
- `operator_ralph_pause` — pause the active loop
|
|
120
|
-
- `operator_ralph_resume` — resume a paused loop
|
|
121
|
-
- `operator_ralph_complete` — close the loop with a summary
|
|
122
|
-
- `operator_ralph_abort` — abort the loop with a reason
|
|
123
|
-
- `operator_ultrawork_link_plan` — link the plan artifact to an active ultrawork session
|
|
124
|
-
|
|
125
|
-
## Commands
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
enact-operator session status
|
|
129
|
-
enact-operator state read
|
|
130
|
-
enact-operator ralph start "<goal>" --gate <id>:<name>
|
|
131
|
-
enact-operator ralph status
|
|
132
|
-
enact-operator ralph advance <phase>
|
|
133
|
-
enact-operator ralph verify <gateId> passed --evidence "<text>"
|
|
134
|
-
enact-operator ralph verify <gateId> failed --evidence "<text>"
|
|
135
|
-
enact-operator ralph block --note "<reason>"
|
|
136
|
-
enact-operator ralph pause
|
|
137
|
-
enact-operator ralph resume
|
|
138
|
-
enact-operator ralph complete
|
|
139
|
-
enact-operator ralph abort
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Activation
|
|
143
|
-
|
|
144
|
-
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.
|
|
145
|
-
## Final Check
|
|
146
|
-
|
|
147
|
-
- Plan artifact exists at `.enact/operator/plans/<phase>.md` before Ralph was started
|
|
148
|
-
- All verification gates have evidence recorded, not just a passed status
|
|
149
|
-
- `$review` verdict is approved
|
|
150
|
-
- `operator_ralph_status` shows phase as `completed`
|
|
151
|
-
- No stale Ralph state file remains active under `.enact/operator/state/`
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: remove-deadcode
|
|
3
|
-
description: "LSP-verified symbol deletion with entry-point guards and candidate-parallel execution."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Remove Deadcode
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Use `$remove-deadcode` to remove provably unused code symbols without damaging runtime entry points.
|
|
11
|
-
|
|
12
|
-
## Preconditions
|
|
13
|
-
|
|
14
|
-
- collect candidate symbols before any deletion
|
|
15
|
-
- load optional entry-point guard list from `.enact/operator/remove-deadcode/entry-points.txt`
|
|
16
|
-
|
|
17
|
-
## Required Safety Contract
|
|
18
|
-
|
|
19
|
-
For each candidate symbol, the deletion gate is strict:
|
|
20
|
-
|
|
21
|
-
1. If symbol is listed in the entry-point guard file, skip deletion unconditionally.
|
|
22
|
-
2. Otherwise call `lsp_find_references` (via enact-context).
|
|
23
|
-
3. If references are non-empty, abort deletion for that symbol and emit an explanatory message.
|
|
24
|
-
4. Only delete when references are exactly zero and the symbol is not guarded.
|
|
25
|
-
|
|
26
|
-
## Execution Model
|
|
27
|
-
|
|
28
|
-
- batching is explicit: enumerate all candidates first
|
|
29
|
-
- then dispatch parallel `executor` subagents, one candidate per subagent
|
|
30
|
-
- each subagent must apply the same guard-list and `lsp_find_references` checks
|
|
31
|
-
|
|
32
|
-
## Behavioral Constraints
|
|
33
|
-
|
|
34
|
-
- no heuristic-only deletion
|
|
35
|
-
- no bypass of entry-point guard list
|
|
36
|
-
- no GitHub-specific assumptions or workflows in deletion decisions
|
|
37
|
-
|
|
38
|
-
## Verification Expectations
|
|
39
|
-
|
|
40
|
-
- unit test: non-empty `lsp_find_references` result must refuse deletion
|
|
41
|
-
- unit test: guard-listed symbol must be skipped even when reference count is zero
|
|
42
|
-
|
|
43
|
-
## Activation
|
|
44
|
-
|
|
45
|
-
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.
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: research
|
|
3
|
-
description: "Evidence-first research mode for current patterns, implementation risks, and decision support."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Research
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Use `$research` when the correct implementation depends on facts you do not yet have, either from the repo or from current external sources.
|
|
11
|
-
|
|
12
|
-
## Execution Policy
|
|
13
|
-
|
|
14
|
-
- start with brownfield evidence from the repo
|
|
15
|
-
- use primary sources for technical questions
|
|
16
|
-
- end with a decision-ready recommendation, not a wall of notes
|
|
17
|
-
- persist findings so the next pass does not repeat the work
|
|
18
|
-
|
|
19
|
-
## Workflow
|
|
20
|
-
|
|
21
|
-
1. Identify the actual unknowns.
|
|
22
|
-
2. Separate:
|
|
23
|
-
- repo truth
|
|
24
|
-
- external truth
|
|
25
|
-
- assumptions
|
|
26
|
-
3. Gather only the evidence needed to decide.
|
|
27
|
-
4. Write the result into `.enact/operator/research/summary.md`.
|
|
28
|
-
5. Update any linked ultrawork or task state if the research is part of an active execution lane.
|
|
29
|
-
|
|
30
|
-
## Parallel Sweep
|
|
31
|
-
|
|
32
|
-
Run concurrent research agents for independent evidence lanes. The floor is 2 concurrent agents whenever there are both repo-truth and external-truth unknowns.
|
|
33
|
-
|
|
34
|
-
- minimum concurrent-agent floor: 2
|
|
35
|
-
- recommended split: one agent for internal repo evidence and one agent for external primary sources
|
|
36
|
-
- increase concurrency only when unknowns are independent and synthesis cost remains manageable
|
|
37
|
-
|
|
38
|
-
Anti-stop rule: do not stop at the first result. Continue each lane until at least one corroborating source is collected per lane, or until an explicit blocker is documented.
|
|
39
|
-
|
|
40
|
-
## Runtime Clarification
|
|
41
|
-
|
|
42
|
-
- `$research` is an evidence pass, not a currently exposed closure-owning
|
|
43
|
-
runtime lane.
|
|
44
|
-
- If research output is being used to support closure on a live task, rely
|
|
45
|
-
on the real Operator proof surfaces rather than treating research notes as
|
|
46
|
-
equivalent to parity evidence:
|
|
47
|
-
- `operator_contract_parity_run`
|
|
48
|
-
- `operator_workflow_reconcile`
|
|
49
|
-
- `operator_operator_snapshot`
|
|
50
|
-
|
|
51
|
-
## Deliverables
|
|
52
|
-
|
|
53
|
-
- current pattern or contract summary
|
|
54
|
-
- risk list
|
|
55
|
-
- recommendation with concrete tradeoffs
|
|
56
|
-
- open questions that still block planning or execution
|
|
57
|
-
|
|
58
|
-
### Internal Evidence
|
|
59
|
-
|
|
60
|
-
- repo paths inspected
|
|
61
|
-
- commands or tools used
|
|
62
|
-
- concrete findings tied to files, code, or runtime state
|
|
63
|
-
- unresolved internal gaps
|
|
64
|
-
|
|
65
|
-
### External Evidence
|
|
66
|
-
|
|
67
|
-
- primary sources consulted
|
|
68
|
-
- dated facts and version-sensitive constraints
|
|
69
|
-
- corroboration across at least one additional source
|
|
70
|
-
- unresolved external gaps
|
|
71
|
-
|
|
72
|
-
## Activation
|
|
73
|
-
|
|
74
|
-
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.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: review
|
|
3
|
-
description: "Findings-first pre-landing review against code, plan completion, verification evidence, and durable runtime state."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Review
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Use `$review` to answer one question: is this actually ready to land? Review is not a summary pass. It is a bug, regression, coverage, and state-integrity pass.
|
|
11
|
-
|
|
12
|
-
## Execution Policy
|
|
13
|
-
|
|
14
|
-
- findings first, summary second
|
|
15
|
-
- prefer evidence over author claims
|
|
16
|
-
- check the code, the tests, the plan, and the runtime artifacts
|
|
17
|
-
- if the current context authored the change, prefer a separate reviewer role for approval
|
|
18
|
-
|
|
19
|
-
## Review Order
|
|
20
|
-
|
|
21
|
-
1. Read the changed code.
|
|
22
|
-
2. Read the active plan and verification map.
|
|
23
|
-
3. Check what was supposed to happen vs what actually landed.
|
|
24
|
-
4. Verify:
|
|
25
|
-
- tests and typechecks
|
|
26
|
-
- docs drift
|
|
27
|
-
- `.enact/operator/` state drift
|
|
28
|
-
- task, review, inbox, and ledger accuracy
|
|
29
|
-
5. Produce a verdict:
|
|
30
|
-
- approved
|
|
31
|
-
- changes requested
|
|
32
|
-
- blocked
|
|
33
|
-
|
|
34
|
-
## Mandatory Checks
|
|
35
|
-
|
|
36
|
-
- missing or fake verification
|
|
37
|
-
- uncovered changed paths
|
|
38
|
-
- stale docs or setup instructions
|
|
39
|
-
- task marked done but still pending review evidence
|
|
40
|
-
- runtime claiming health while inbox or review queue says otherwise
|
|
41
|
-
|
|
42
|
-
## Recommended State Reads
|
|
43
|
-
|
|
44
|
-
- `operator_reviews_list`
|
|
45
|
-
- `operator_inbox_list`
|
|
46
|
-
- `operator_ledger_recent`
|
|
47
|
-
- `operator_hud`
|
|
48
|
-
|
|
49
|
-
## Output Standard
|
|
50
|
-
|
|
51
|
-
- findings ordered by severity
|
|
52
|
-
- file references and why they matter
|
|
53
|
-
- residual risk
|
|
54
|
-
- final verdict and next action
|
|
55
|
-
|
|
56
|
-
## Activation
|
|
57
|
-
|
|
58
|
-
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.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: security-research
|
|
3
|
-
description: "Multi-agent security research with hunter/PoC split and optional critical bug auto-creation in Azure DevOps."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Security Research
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Use `$security-research` to run a focused vulnerability hunt, produce ranked findings, and optionally create Azure DevOps Bug work items for critical issues.
|
|
11
|
-
|
|
12
|
-
## Parameters
|
|
13
|
-
|
|
14
|
-
- `autoCreateBugs: boolean` (default `true`)
|
|
15
|
-
- when `false`, no `factory_workitem_sync_once` call is allowed regardless of severity
|
|
16
|
-
|
|
17
|
-
## Team Topology
|
|
18
|
-
|
|
19
|
-
- 3 hunter agents:
|
|
20
|
-
- hunter 1: CWE classification
|
|
21
|
-
- hunter 2: CVSS v4 scoring
|
|
22
|
-
- hunter 3: OWASP category mapping
|
|
23
|
-
- 2 PoC engineer agents:
|
|
24
|
-
- PoC 1 and PoC 2: exploitability proof and reproduction quality
|
|
25
|
-
|
|
26
|
-
## Required Workflow
|
|
27
|
-
|
|
28
|
-
1. Launch hunters to identify and classify potential vulnerabilities.
|
|
29
|
-
2. Launch PoC engineers on top-ranked findings to validate exploitability.
|
|
30
|
-
3. Merge outputs into a single findings report.
|
|
31
|
-
4. Write report to `.enact/operator/security/<sessionId>/findings.md`.
|
|
32
|
-
5. Rank findings in the report by CVSS v4 severity.
|
|
33
|
-
6. For each finding with CVSS v4 `>= 9.0`, if `autoCreateBugs=true`, call `factory_workitem_sync_once` to create a `Bug` work item.
|
|
34
|
-
7. If `autoCreateBugs=false`, skip all bug auto-creation calls.
|
|
35
|
-
|
|
36
|
-
## Azure DevOps-Only Contract
|
|
37
|
-
|
|
38
|
-
- use factory MCP work-item surfaces for bug creation
|
|
39
|
-
- no GitHub Security Advisories, GitHub issue creation, or GitHub-specific security automation assumptions
|
|
40
|
-
|
|
41
|
-
## Behavioral Constraints
|
|
42
|
-
|
|
43
|
-
- CVSS scoring must be v4, not v3 fallback
|
|
44
|
-
- critical auto-bug creation threshold is fixed at `>= 9.0`
|
|
45
|
-
- findings must include at least one of: CWE, CVSS v4 vector/score, OWASP mapping
|
|
46
|
-
|
|
47
|
-
## Verification Expectations
|
|
48
|
-
|
|
49
|
-
- integration test: findings report includes at least one CWE classification entry
|
|
50
|
-
- integration test: with `autoCreateBugs=false`, verify no `factory_workitem_sync_once` call is made
|
|
51
|
-
|
|
52
|
-
## Activation
|
|
53
|
-
|
|
54
|
-
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.
|