@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.
Files changed (115) hide show
  1. package/README.md +4 -3
  2. package/dist/index.d.ts +5 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/install.d.ts +82 -1
  7. package/dist/install.d.ts.map +1 -1
  8. package/dist/install.js +187 -35
  9. package/dist/install.js.map +1 -1
  10. package/dist/internal/codex.d.ts.map +1 -1
  11. package/dist/internal/codex.js +7 -1
  12. package/dist/internal/codex.js.map +1 -1
  13. package/dist/internal/platform.d.ts +8 -0
  14. package/dist/internal/platform.d.ts.map +1 -1
  15. package/dist/internal/platform.js +46 -2
  16. package/dist/internal/platform.js.map +1 -1
  17. package/dist/provision.d.ts +30 -0
  18. package/dist/provision.d.ts.map +1 -0
  19. package/dist/provision.js +202 -0
  20. package/dist/provision.js.map +1 -0
  21. package/dist/validate/index.d.ts +23 -0
  22. package/dist/validate/index.d.ts.map +1 -1
  23. package/dist/validate/index.js +80 -0
  24. package/dist/validate/index.js.map +1 -1
  25. package/extensions/enact-context/.agents/plugin.json +40 -0
  26. package/extensions/enact-context/.mcp.json +8 -0
  27. package/extensions/enact-context/README.md +25 -0
  28. package/extensions/enact-context/assets/icon.png +0 -0
  29. package/extensions/enact-context/assets/logo.png +0 -0
  30. package/extensions/enact-context/hooks/hooks.json +115 -0
  31. package/extensions/enact-context/skills/enact-context/SKILL.md +149 -0
  32. package/extensions/enact-context/skills/enact-context/scripts/install.sh +69 -0
  33. package/extensions/enact-factory/.agents/plugin.json +42 -0
  34. package/extensions/enact-factory/.mcp.json +8 -0
  35. package/extensions/enact-factory/assets/icon.png +0 -0
  36. package/extensions/enact-factory/assets/logo.png +0 -0
  37. package/extensions/enact-factory/hooks/user-prompt-submit.mjs +67 -0
  38. package/extensions/enact-factory/skills/testing-strategy/SKILL.md +167 -0
  39. package/extensions/enact-factory/skills/workitem-triage/SKILL.md +22 -0
  40. package/extensions/enact-operator/.agents/plugin.json +57 -0
  41. package/extensions/enact-operator/.app.json +3 -0
  42. package/extensions/enact-operator/.mcp.json +10 -0
  43. package/extensions/enact-operator/_taxonomy.md +86 -0
  44. package/extensions/enact-operator/agents/README.md +5 -0
  45. package/extensions/enact-operator/agents/architect.toml +25 -0
  46. package/extensions/enact-operator/agents/code-reviewer.toml +24 -0
  47. package/extensions/enact-operator/agents/critic.toml +30 -0
  48. package/extensions/enact-operator/agents/executor.toml +24 -0
  49. package/extensions/enact-operator/agents/explore.toml +23 -0
  50. package/extensions/enact-operator/agents/planner.toml +24 -0
  51. package/extensions/enact-operator/agents/verifier.toml +24 -0
  52. package/extensions/enact-operator/assets/icon.png +0 -0
  53. package/extensions/enact-operator/assets/logo.png +0 -0
  54. package/extensions/enact-operator/commands/doctor.md +39 -0
  55. package/extensions/enact-operator/commands/setup.md +51 -0
  56. package/extensions/enact-operator/hooks/hooks.json +146 -0
  57. package/extensions/enact-operator/skills/_variants.md +44 -0
  58. package/extensions/enact-operator/skills/ai-slop-cleaner/SKILL.md +50 -0
  59. package/extensions/enact-operator/skills/analyze/SKILL.md +91 -0
  60. package/extensions/enact-operator/skills/ask/SKILL.md +47 -0
  61. package/extensions/enact-operator/skills/autopilot/SKILL.md +170 -0
  62. package/extensions/enact-operator/skills/autoresearch-goal/SKILL.md +79 -0
  63. package/extensions/enact-operator/skills/cancel/SKILL.md +99 -0
  64. package/extensions/enact-operator/skills/configure-notifications/SKILL.md +77 -0
  65. package/extensions/enact-operator/skills/deep-interview/SKILL.md +80 -0
  66. package/extensions/enact-operator/skills/doctor/SKILL.md +48 -0
  67. package/extensions/enact-operator/skills/hud/SKILL.md +49 -0
  68. package/extensions/enact-operator/skills/hyperplan/SKILL.md +47 -0
  69. package/extensions/enact-operator/skills/plan/SKILL.md +78 -0
  70. package/extensions/enact-operator/skills/ralph/SKILL.md +201 -0
  71. package/extensions/enact-operator/skills/ralph/gemini.md +18 -0
  72. package/extensions/enact-operator/skills/ralplan/SKILL.md +151 -0
  73. package/extensions/enact-operator/skills/remove-deadcode/SKILL.md +45 -0
  74. package/extensions/enact-operator/skills/research/SKILL.md +74 -0
  75. package/extensions/enact-operator/skills/review/SKILL.md +58 -0
  76. package/extensions/enact-operator/skills/security-research/SKILL.md +54 -0
  77. package/extensions/enact-operator/skills/setup/SKILL.md +91 -0
  78. package/extensions/enact-operator/skills/setup/scripts/install.sh +50 -0
  79. package/extensions/enact-operator/skills/skill/SKILL.md +82 -0
  80. package/extensions/enact-operator/skills/tdd/SKILL.md +59 -0
  81. package/extensions/enact-operator/skills/team/SKILL.md +199 -0
  82. package/extensions/enact-operator/skills/trace/SKILL.md +41 -0
  83. package/extensions/enact-operator/skills/ultragoal/SKILL.md +99 -0
  84. package/extensions/enact-operator/skills/ultraqa/SKILL.md +113 -0
  85. package/extensions/enact-operator/skills/ultrawork/SKILL.md +145 -0
  86. package/extensions/enact-operator/skills/ultrawork/planner.md +28 -0
  87. package/extensions/enact-operator/skills/wiki/SKILL.md +41 -0
  88. package/extensions/enact-operator/skills/work-with-workitem/SKILL.md +51 -0
  89. package/extensions/enact-wiki/.agents/plugin.json +42 -0
  90. package/extensions/enact-wiki/.mcp.json +15 -0
  91. package/extensions/enact-wiki/README.md +44 -0
  92. package/extensions/enact-wiki/assets/icon.png +0 -0
  93. package/extensions/enact-wiki/assets/logo.png +0 -0
  94. package/extensions/enact-wiki/skills/document-parser/SKILL.md +17 -0
  95. package/extensions/enact-wiki/skills/document-parser/scripts/parse.sh +60 -0
  96. package/extensions/enact-wiki/skills/document-parser/skill.json +9 -0
  97. package/extensions/enact-wiki/skills/enact-wiki/SKILL.md +30 -0
  98. package/extensions/enact-wiki/skills/enact-wiki/references/ingest.md +62 -0
  99. package/extensions/enact-wiki/skills/enact-wiki/references/manage.md +34 -0
  100. package/extensions/enact-wiki/skills/enact-wiki/references/query.md +59 -0
  101. package/extensions/enact-wiki/skills/search-lab/SKILL.md +57 -0
  102. package/extensions/enact-wiki/skills/search-lab/scripts/analyze.ts +23 -0
  103. package/package.json +1 -1
  104. package/scripts/enact-extensions.mjs +79 -12
  105. package/scripts/lib/hooks.mjs +352 -0
  106. package/scripts/lib/ledger.mjs +4 -3
  107. package/scripts/lib/provision-mcp.mjs +12 -365
  108. package/scripts/lib/run-install.mjs +87 -5
  109. package/scripts/lib/run-prune.mjs +73 -0
  110. package/scripts/lib/run-sync.mjs +9 -1
  111. package/scripts/lib/run-uninstall.mjs +26 -2
  112. package/scripts/lib/run-validate.mjs +10 -1
  113. package/scripts/lib/serve.mjs +19 -1
  114. package/scripts/version-bump.sh +463 -0
  115. package/spec/codex.json +1 -11
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: tdd
3
+ description: "Red-green-refactor mode for behavior with clear inputs, outputs, and regression value."
4
+ ---
5
+
6
+ # TDD
7
+
8
+ ## Purpose
9
+
10
+ Use `$tdd` when behavior can be specified before implementation. TDD is for design pressure and regression safety, not for ritual.
11
+
12
+ ## Good TDD Candidates
13
+
14
+ - business rules
15
+ - API contracts
16
+ - parsing, formatting, or validation
17
+ - state transitions
18
+ - algorithms and utility behavior
19
+
20
+ ## Skip TDD For
21
+
22
+ - pure layout and styling work
23
+ - config-only changes
24
+ - trivial glue code
25
+ - exploratory prototypes where behavior is not yet known
26
+
27
+ ## Iron Law
28
+
29
+ No production code without a failing test first.
30
+
31
+ ## Cycle
32
+
33
+ 1. Red
34
+ - write the smallest failing test for the next behavior
35
+ - run it and prove it fails for the right reason
36
+ 2. Green
37
+ - write the minimum code to make it pass
38
+ - rerun the test and the relevant suite
39
+ 3. Refactor
40
+ - clean up only after green
41
+ - keep the suite green after every change
42
+
43
+ ## Rules
44
+
45
+ - one behavior per cycle
46
+ - do not batch multiple features into one red-green pass
47
+ - prefer regression tests for changed behavior
48
+ - record the verify command in the plan or task notes
49
+
50
+ ## Output Standard
51
+
52
+ - what behavior the test locked in
53
+ - the failing signal
54
+ - the minimal implementation
55
+ - the final verification command
56
+
57
+ ## Activation
58
+
59
+ 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,199 @@
1
+ ---
2
+ name: team
3
+ description: "Durable multi-executor orchestration with queueing, claims, inbox, review gates, and tmux-aware lifecycle control."
4
+ lane: true
5
+ mcpToolPrefix: operator_team_
6
+ ---
7
+
8
+ # Team
9
+
10
+ ## Purpose
11
+
12
+ `$team` is the durable execution mode. Use it when you need a shared queue, executor leases, review handoffs, and a runtime that survives beyond one reasoning burst.
13
+
14
+ ## Team vs Native Fanout
15
+
16
+ - use native subagents for small, in-session parallelism
17
+ - use `$team` when the work needs durable state, tmux executors, inbox coordination, resumability, or explicit review gates
18
+
19
+ ## Use When
20
+
21
+ - the work splits into parallel slices
22
+ - one operator needs durable coordination and review history
23
+ - tasks need claims, heartbeats, inbox messages, and resumable state
24
+
25
+ ## Do Not Use When
26
+
27
+ - the task is sequential and small
28
+ - there is no meaningful slice boundary
29
+ - the cost of queueing and review would exceed the value of parallelism
30
+
31
+ ## Preconditions
32
+
33
+ Before launching team mode:
34
+
35
+ 1. the current task has a clear objective
36
+ 2. the first slices are identifiable
37
+ 3. the likely file areas are known
38
+ 4. there is a verify path
39
+
40
+ If those are missing, run `$deep-interview`, `$trace`, or `$plan` first.
41
+
42
+ ## Runtime Contract
43
+
44
+ - if `operator_*` tools are not visible yet, load/search the Enact Operator MCP namespace before doing team work
45
+ - initialize with `operator_team_init`
46
+ - queue work with `operator_team_queue`
47
+ - claim with executor ids via `operator_team_claim`
48
+ - complete into review with `operator_team_complete`, never straight to done
49
+ - record review decisions with `operator_team_review`
50
+ - use `operator_team_inbox`, `operator_team_logs`, `operator_team_status`, and `operator_hud` to monitor real progress
51
+ - shut down only after terminal state or explicit abort via `operator_team_shutdown`
52
+ - for every `operator_team_*` call, `root` means the repository root that owns `.enact/operator`
53
+ - it is **not** the task subdirectory
54
+ - task subdirectories are for code edits and verification only
55
+ - during bootstrap, use sequential MCP calls
56
+ - first confirm `operator_team_status`
57
+ - then `operator_team_init` if absent
58
+ - only after that move to queue / claim / complete / review
59
+ - when no external `taskId` exists, local Operator task discipline is mandatory
60
+ - queue or bootstrap the first local task immediately
61
+ - claim, review, and close by local `taskId`
62
+ - current MCP note: some lifecycle calls still carry that local task id in a `taskId` field
63
+ - do not defer tracker ownership to AzDo
64
+ - executor semantics are team-internal and are not a separate callable skill:
65
+ - executor is the team-internal execution lane, not a root skill
66
+ - executor claims exactly one task at a time
67
+ - executor sends regular heartbeats while active
68
+ - executor reports completion with non-empty summary
69
+ - blocked work must be reported explicitly (`BLOCKED: ...`)
70
+
71
+ ## Proof And Closure
72
+
73
+ - `$team` is a current operator lane and should use real Operator proof
74
+ surfaces when its work contributes to closure:
75
+ - `operator_contract_parity_run`
76
+ - `operator_workflow_reconcile`
77
+ - `operator_operator_snapshot`
78
+ - `operator_hud`
79
+ - `contract-parity` should be read from the real gate output, not inferred from
80
+ queue state or reviewer prose alone.
81
+ - Provider note: Operator may use its adapter over the running
82
+ `enact-context` server for proof. That is expected and preferable to
83
+ duplicating analysis in team-local logic.
84
+
85
+ ## Lifecycle
86
+
87
+ 1. Launch the runtime and inspect backend health.
88
+ 2. Queue explicit slices, not vague goals.
89
+ 3. Ensure every local task claim maps to a real executor id.
90
+ 4. Keep heartbeats and logs current.
91
+ 5. Move completions into review with a concrete handoff note.
92
+ 6. Monitor:
93
+ - MCP only: `operator_team_init`, `operator_team_status`, `operator_team_spawn`, `operator_team_claim`, `operator_team_heartbeat`, `operator_team_complete`, `operator_team_review`, `operator_team_inbox`, `operator_team_logs`, `operator_team_resume`, `operator_team_shutdown`, `operator_hud`
94
+ 7. Shutdown only when active work is terminal or the user wants an abort.
95
+
96
+ ## Closure Protocol
97
+
98
+ Use this exact closeout order with the current live `operator_team_*` MCP tools:
99
+
100
+ 1. Confirm no in-flight executor work:
101
+ - `operator_team_status`
102
+ 2. Verify task queue is terminal (no `queued` or `claimed` tasks remain):
103
+ - `operator_team_task_list`
104
+ 3. Ensure task completions and reviewer notes are persisted:
105
+ - `operator_team_complete`
106
+ - `operator_team_review`
107
+ 4. Run shutdown:
108
+ - `operator_team_shutdown`
109
+ 5. Re-check there is no active team:
110
+ - `operator_team_status`
111
+
112
+ Do not use non-existent shutdown lifecycle tools (for example `shutdown_request`, `shutdown_approve`, or `shutdown_delete`). The active shutdown surface is `operator_team_shutdown`.
113
+
114
+ ## Root semantics
115
+
116
+ When the task says “work inside `<path>`”, separate two concepts:
117
+
118
+ 1. **Operator root**
119
+ - the repository root that owns `.enact/operator`
120
+ - this is the value passed as `root` to `operator_team_*`
121
+ 2. **Task workspace**
122
+ - the subdirectory where code changes happen
123
+ - this is where file reads/edits and verification commands should run
124
+
125
+ Do not point `operator_team_status`, `operator_team_init`, or any other
126
+ `operator_team_*` call at the task subdirectory unless that subdirectory itself
127
+ owns a separate `.enact/operator`.
128
+
129
+ ## Degraded Mode
130
+
131
+ If tmux is missing, the runtime may fall back to mock mode. That is acceptable for state flow and testing, not as proof of real detached-executor behavior.
132
+
133
+ ## Rules
134
+
135
+ - no silent completions
136
+ - no review without a readable result note
137
+ - no shutdown while work is still active unless aborting
138
+ - no CLI fallback for lifecycle operations; use the `operator_team_*` MCP surface
139
+ - prefer runtime/state MCP tools over ad-hoc pane hacking
140
+
141
+ ## Activation
142
+
143
+ 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. When no external `taskId` exists, the injected note also means local Operator task discipline is mandatory: queue the first local task immediately and keep queue/review state authoritative in Operator. 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.
144
+
145
+ Team-driven activation is a separate path: observe/MCP should start the runtime directly with `operator_team_init`, not through `operator_operator_activate`.
146
+
147
+
148
+ # Executor (team-internal role)
149
+
150
+ This page captures the in-team **executor** semantics for the `team` runtime.
151
+ It is reference-only documentation and **not** a standalone callable skill.
152
+
153
+ Within `$team`, executor-capable work is carried by claimed executor lanes and
154
+ coordinated by team mechanics (spawn, claim, heartbeat, acknowledge, complete).
155
+
156
+ ## Purpose
157
+
158
+ An executor is the in-team assignee for a single task slice inside a team session.
159
+ The executor claims one task at a time, maintains heartbeat cadence, and
160
+ reports completion or explicit blockage.
161
+
162
+ ## Workflow
163
+
164
+ 1. Check available tasks:
165
+ - `operator_team_status`
166
+ 2. Claim a task:
167
+ - `operator_team_claim`
168
+ 3. Keep heartbeat cadence (typically every 60 seconds):
169
+ - `operator_team_heartbeat`
170
+ 4. Report for clarification or status updates:
171
+ - `operator_team_message`
172
+ 5. Acknowledge injected instructions after applying them:
173
+ - `operator_team_message_ack`
174
+ 6. Complete with summary:
175
+ - `operator_team_complete`
176
+ 7. Report blocked work explicitly:
177
+ - `operator_team_complete` with a `BLOCKED: ...` summary
178
+ 8. Check inbox for operator instructions:
179
+ - `operator_team_inbox`
180
+ 9. Check execution context:
181
+ - `operator_team_logs`
182
+
183
+ Example acknowledgement call:
184
+
185
+ ```json
186
+ {
187
+ "tool": "operator_team_message_ack",
188
+ "root": "/path/to/repo-root",
189
+ "executorId": "executor",
190
+ "messageId": "msg_123"
191
+ }
192
+ ```
193
+
194
+ ## Contract checks
195
+
196
+ - claimed tasks stay in claimed state only with recent heartbeat
197
+ - completed tasks include a non-empty summary
198
+ - blocked completions include a specific reason
199
+ - no second claim without completing or unblocking the first task
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: trace
3
+ description: "Execution-path mapping for entry points, data flow, side effects, and blast radius before risky work."
4
+ ---
5
+
6
+ # Trace
7
+
8
+ ## Purpose
9
+
10
+ Use `$trace` before a risky edit or review when you need to know what code path actually runs, what it touches, and what could break downstream.
11
+
12
+ ## Workflow
13
+
14
+ 1. Find the entry points.
15
+ 2. Follow data flow through the changed or targeted path.
16
+ 3. Map side effects:
17
+ - storage writes
18
+ - network calls
19
+ - UI state changes
20
+ - background work
21
+ 4. Identify risky branches and missing guards.
22
+ 5. Name the concrete files the next pass should touch.
23
+
24
+ ## Suggested Tools
25
+
26
+ - `ctx_search` for symbol and path discovery
27
+ - `ctx_read` for call-path confirmation
28
+ - `ctx_semantic_search` or `ctx_graph` when lexical search is not enough
29
+ - `operator_hud` when runtime state matters to the path
30
+
31
+ ## Output Standard
32
+
33
+ - entry points
34
+ - downstream side effects
35
+ - risky branches
36
+ - likely blast radius
37
+ - recommended edit boundary
38
+
39
+ ## Activation
40
+
41
+ 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,99 @@
1
+ ---
2
+ name: ultragoal
3
+ description: "Long-horizon goal mode that manages cross-session continuity for a durable objective, using ultrawork for each individual session."
4
+ lane: true
5
+ mcpToolPrefix: operator_ultragoal_
6
+ ---
7
+
8
+ # Ultragoal
9
+
10
+ ## Purpose
11
+
12
+ Wraps a multi-session, long-running objective that cannot be completed in a single context window. Ultragoal continuity lives in reviewable artifacts under `.enact/operator/ultragoal/`, while each individual execution burst is tracked through the real Operator runtime state (`$ultrawork`, and when needed `$autopilot`, `$ralph`, or `$team`).
13
+
14
+ ## Use When
15
+
16
+ - a goal spans multiple days or context-window boundaries
17
+ - you need cross-session continuity for a complex engineering objective
18
+ - individual `$ultrawork` sessions should contribute to a shared, durable goal artifact
19
+ - you need one authoritative goal artifact listing remaining vs completed slices across sessions
20
+
21
+ ## Workflow
22
+
23
+ 1. Define the goal and create or update the goal artifact in `.enact/operator/ultragoal/<goalId>.json`.
24
+ - Prefer MCP: `operator_ultragoal_update`
25
+ - Record at least: `title`, `goal`, `planPath`, `status`, `remainingPbis`, `completedPbis`, `updatedAt`
26
+ 2. Start or refresh the current session:
27
+ - MCP: `operator_session_start`
28
+ - CLI fallback: `enact-operator session start`
29
+ 3. Start ultrawork for the current execution burst:
30
+ - MCP: `operator_ultrawork_start`
31
+ - CLI fallback: `enact-operator ultrawork start "<goal>"`
32
+ - Do not depend on custom `activationMetadata` shapes for continuity.
33
+ Goal-level continuity belongs in the ultragoal artifact itself; runtime
34
+ activation metadata is only optional provenance.
35
+ 4. Link the relevant plan ids and external task ids into ultrawork state when those
36
+ concrete ids exist:
37
+ - MCP: `operator_ultrawork_link_plan`, `operator_ultrawork_link_task`
38
+ - CLI fallback: `enact-operator ultrawork link-plan <planId>`
39
+ - The linked external identifier parameter is `taskId`.
40
+ 5. Within each burst, run tasks using `$ultrawork` and keep the ultragoal
41
+ artifact updated as slices move from `remainingPbis` to `completedPbis`.
42
+ 6. At natural stopping points, record verified progress:
43
+ - MCP: `operator_ultrawork_verify`
44
+ - CLI fallback: `enact-operator ultrawork verify "<evidence>"`
45
+ 7. For closure-sensitive goals, also keep the real parity/hygiene surfaces in
46
+ view across sessions:
47
+ - `operator_contract_parity_run`
48
+ - `operator_operator_snapshot`
49
+ - `operator_hud`
50
+ - `operator_workflow_reconcile`
51
+ 8. On the next session, resume by reading:
52
+ - `.enact/operator/ultragoal/<goalId>.json`
53
+ - `operator_ultrawork_status`
54
+ - `operator_session_status`
55
+ - `operator_hud`
56
+ 9. When the goal is fully achieved:
57
+ - complete the active runtime burst (`operator_ultrawork_complete`)
58
+ - update the ultragoal artifact to `status: completed`
59
+ - ensure no dangling active runtime remains in HUD/state
60
+
61
+ ## State Contract
62
+
63
+ - reads:
64
+ - `.enact/operator/ultragoal/<goalId>.json`
65
+ - plan files
66
+ - session / ultrawork / HUD state
67
+ - writes:
68
+ - `.enact/operator/ultragoal/<goalId>.json`
69
+ - linked ultrawork state via `operator_ultrawork_*`
70
+ - optional parity evidence via `operator_contract_parity_run`
71
+
72
+ ## Commands
73
+
74
+ ```
75
+ enact-operator session start
76
+ enact-operator ultragoal status <goalId>
77
+ enact-operator ultragoal update <goalId>
78
+ enact-operator ultrawork start "<goal>"
79
+ enact-operator ultrawork status
80
+ enact-operator ultrawork verify "<evidence>"
81
+ enact-operator ultrawork link-plan <planId>
82
+ enact-operator ultrawork link-task <taskId>
83
+ enact-operator ultrawork complete "<summary>"
84
+ enact-operator ultrawork abort "<reason>"
85
+ enact-operator session status
86
+ ```
87
+
88
+ ## Activation
89
+
90
+ 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.
91
+ ## Final Check
92
+
93
+ - `.enact/operator/ultragoal/<goalId>.json` reflects current progress after each session
94
+ - `remainingPbis` and `completedPbis` stay truthful to the codebase
95
+ - no session ends without either verification evidence or a completion summary
96
+ - plan files stay in sync with actual completed work
97
+ - when the goal is done, ultrawork is completed and no dangling execution session remains
98
+ - if closure criteria exist, use the real `contract-parity` gate rather than a
99
+ purely narrative reviewer summary
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: ultraqa
3
+ description: "QA cycling workflow with hard-stop verification gates: tests, lint, doctor, smoke execution, and ralph persistence."
4
+ lane: true
5
+ mcpToolPrefix: operator_ultraqa_
6
+ ---
7
+
8
+ # UltraQA
9
+
10
+ ## Purpose
11
+ Combines `$ralph` (self-referential verification loop) with an explicit set of QA gates. Each gate must pass before the loop advances. The cycle is: implement a fix, run all gates, advance only when green, repeat until every gate is clean in a single run.
12
+
13
+ ## Use When
14
+ - Verification has failed and a structured fix-verify cycle is needed
15
+ - A feature must be proven working end-to-end before merging
16
+ - The operator needs a hard record of each verification pass and failure
17
+
18
+ ## Execution Policy
19
+
20
+ - start from the repo and `.enact/operator/` truth, not chat memory
21
+ - drive the QA loop through MCP tools when running inside Codex; CLI commands are the equivalent operator surface
22
+ - keep ralph and review state current as you go
23
+ - do not stop until all gates pass in a single clean run
24
+
25
+ ## Workflow
26
+ 1. Start a ralph loop scoped to the QA goal:
27
+ - MCP: `operator_ralph_start` with `goal`
28
+ - CLI: `enact-operator ralph start --goal "<what must be verified>"`
29
+ 2. Check current ralph status before each iteration:
30
+ - MCP: `operator_ralph_status`
31
+ - CLI: `enact-operator ralph status`
32
+ 3. Run each QA gate in sequence. All must pass before advancing:
33
+ - Unit and integration tests (run the project's test command)
34
+ - Lint and type checks (run the project's lint command)
35
+ - Operator doctor:
36
+ - MCP: `operator_doctor`
37
+ - CLI: `enact-operator doctor`
38
+ - Replacement-readiness audit:
39
+ - MCP: `operator_audit_replacement_readiness`
40
+ - CLI: `enact-operator audit replacement-readiness`
41
+ - Real-execution smoke test (invoke the primary feature with real inputs, not mocks)
42
+ 4. Check the HUD for a summary view of current mode state:
43
+ - MCP: `operator_hud`
44
+ - CLI: `enact-operator hud`
45
+ 5. After all gates pass in a single run, record the verification:
46
+ - MCP: `operator_ralph_verify` with `gateId` and `status=passed`
47
+ - CLI: `enact-operator ralph verify <loopId> pass`
48
+
49
+ If any gate fails, record and continue the loop:
50
+ - MCP: `operator_ralph_verify` with `gateId` and `status=failed`
51
+ - CLI: `enact-operator ralph verify <loopId> fail`
52
+ 6. Advance to the next iteration:
53
+ - MCP: `operator_ralph_advance` with `toPhase`
54
+ - CLI: `enact-operator ralph advance <loopId>`
55
+ 7. If a team review is required before completing, request it:
56
+ - MCP: `operator_team_review`
57
+ 8. When all gates have passed in a single clean run, complete the loop:
58
+ - MCP: `operator_ralph_complete` with `summary`
59
+ - CLI: `enact-operator ralph complete <loopId>`
60
+
61
+ ## Proof Path
62
+
63
+ - Use the real `contract-parity` and `state-hygiene` surfaces when QA is part
64
+ of closure, not just doctor/tests:
65
+ - `operator_contract_parity_run`
66
+ - `operator_workflow_reconcile`
67
+ - `operator_operator_snapshot`
68
+ - Provider note: Operator may use its adapter over the running `enact-context`
69
+ server for closure proof. That is expected and preferable to duplicate
70
+ QA-local analysis.
71
+
72
+ ## State Contract
73
+ - Reads: `.enact/operator/state/` (ralph loop state), test and lint output
74
+ - Writes: ralph loop iterations and verification records via MCP tools or CLI
75
+
76
+ ## MCP Tools
77
+
78
+ - `operator_ralph_start` — start a ralph loop scoped to the QA goal
79
+ - `operator_ralph_status` — read current ralph state
80
+ - `operator_ralph_advance` — transition to the next phase
81
+ - `operator_ralph_verify` — record a gate verdict with evidence
82
+ - `operator_ralph_pause` — pause the active loop
83
+ - `operator_ralph_resume` — resume a paused loop
84
+ - `operator_ralph_complete` — close the loop after all gates pass
85
+ - `operator_ralph_abort` — abort the loop with a reason
86
+ - `operator_doctor` — run the operator doctor gate
87
+ - `operator_audit_replacement_readiness` — run the replacement-readiness gate
88
+ - `operator_hud` — summary view of active mode state
89
+ - `operator_team_review` — request a team review before completing
90
+
91
+ ## Commands
92
+ ```
93
+ enact-operator ralph start
94
+ enact-operator ralph status
95
+ enact-operator ralph verify <loopId> pass|fail
96
+ enact-operator ralph advance <loopId>
97
+ enact-operator ralph pause <loopId>
98
+ enact-operator ralph resume <loopId>
99
+ enact-operator ralph complete <loopId>
100
+ enact-operator ralph abort <loopId>
101
+ enact-operator doctor
102
+ enact-operator audit replacement-readiness
103
+ enact-operator hud
104
+ ```
105
+
106
+ ## Activation
107
+
108
+ 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.
109
+ ## Final Check
110
+ - Every gate (tests, lint, doctor, audit, smoke) passed in a single iteration
111
+ - `ralph verify` recorded as `pass` before `ralph complete` was called
112
+ - No gate was skipped or bypassed
113
+ - `ralph complete` was called; no loop left in `running` or `paused` state
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: ultrawork
3
+ description: "Default Enact Operator flow for intent -> plan -> execute -> verify, with team escalation only when durable parallelism is justified."
4
+ lane: true
5
+ mcpToolPrefix: operator_ultrawork_
6
+ ---
7
+
8
+ # Ultrawork
9
+
10
+ ## Purpose
11
+
12
+ `$ultrawork` is the default Enact Operator operating mode. It is the wrapper that decides whether to clarify, plan, execute directly, or escalate to durable team mode. It exists to finish the job end to end without losing state.
13
+
14
+ ## Use When
15
+
16
+ - the user wants the work shipped, not just discussed
17
+ - the task is larger than a one-shot edit
18
+ - you need one sane default path instead of choosing skills manually
19
+
20
+ ## Routing Rules
21
+
22
+ - ambiguous intent -> `$deep-interview`
23
+ - clear but broad work -> `$plan`
24
+ - one focused slice with known files -> `$executor`
25
+ - parallel durable work -> `$team`
26
+ - uncertain implementation pattern -> `$research` or `$trace`
27
+
28
+ ## Intent Gate
29
+
30
+ Before the lane moves past startup, classify the session into one of:
31
+
32
+ - `research` -> `$trace`
33
+ - `implementation` -> `executor`
34
+ - `investigation` -> `explore`
35
+ - `evaluation` -> `code-reviewer`
36
+ - `fix` -> `executor`
37
+ - `open-ended` -> `$plan`
38
+
39
+ Record the chosen `intent` in ultrawork state and keep later verification aligned to that class.
40
+
41
+ ## Execution Policy
42
+
43
+ - start from the repo and `.enact/operator/` truth, not chat memory
44
+ - if `operator_*` tools are not visible yet, load/search the Enact Operator MCP namespace before doing ultrawork lifecycle actions
45
+ - prefer the smallest mode that can finish the job
46
+ - keep session, ultrawork, task, inbox, and review state current as you go
47
+ - when no external `taskId` is linked, local Operator task discipline is mandatory; ultrawork owns a local task and must keep it authoritative
48
+ - do not stop at a partial handoff unless the next owner is explicit
49
+
50
+ ## Workflow
51
+
52
+ 1. Start or refresh the session record:
53
+ - MCP: `operator_session_start`
54
+ - CLI fallback: `enact-operator session start`
55
+ 2. Read current runtime truth:
56
+ - MCP: `operator_hud`
57
+ - CLI fallback: `enact-operator hud`
58
+ 3. Start or inspect ultrawork state:
59
+ - MCP: `operator_ultrawork_start`
60
+ - CLI fallback: `enact-operator ultrawork start "<intent>"`
61
+ 4. Run the ambiguity gate:
62
+ - if intent is fuzzy, use `$deep-interview`
63
+ - if intent is clear, continue
64
+ 5. Build or refresh the durable plan:
65
+ - update `.enact/operator/plans/` and `.enact/operator/research/`
66
+ - link plan or research ids with `operator_ultrawork_link_plan` and `operator_ultrawork_link_research`
67
+ 6. Choose execution mode:
68
+ - direct slice -> `$executor`
69
+ - durable parallel slices -> `$team`
70
+ 7. Keep state current during execution:
71
+ - `operator_ultrawork_route`
72
+ - `operator_ultrawork_advance`
73
+ - `operator_ultrawork_verify`
74
+ - review-phase flow:
75
+ - advance into review with `operator_ultrawork_advance` and `toPhase: "review"`
76
+ - read review queue with `operator_reviews_list`
77
+ - if review work blocks completion, capture it with `operator_ultrawork_block`
78
+ - `operator_task_list`
79
+ - `operator_inbox_list`
80
+ - `operator_reviews_list`
81
+ - `operator_contract_parity_run` when closure criteria are declared
82
+ - `operator_workflow_reconcile` / `operator_operator_snapshot` when state drift is suspected
83
+ 8. Finish with explicit verification and a recorded verdict:
84
+ - MCP: `operator_ultrawork_complete`
85
+ - CLI fallback: `enact-operator ultrawork complete "<summary>"`
86
+
87
+ ## State Contract
88
+
89
+ Ultrawork should leave behind:
90
+
91
+ - a current session
92
+ - a live or intentionally cleared ultrawork state
93
+ - durable local tasks with real status
94
+ - linked plan or research ids where relevant
95
+ - optional external `assignmentId` plus a `subagents` array (empty on fresh sessions; reserved for delegated subagent tracking when that lane writes into ultrawork state)
96
+ - verification evidence in state or artifacts
97
+ - explicit parity/hygiene evidence when the session is being treated as a
98
+ closure-bearing run
99
+
100
+ ## TDD Mandate
101
+
102
+ Default sequence is RED -> GREEN -> SURFACE.
103
+
104
+ - RED: capture the failing proof first
105
+ - GREEN: implement the minimal correction
106
+ - SURFACE: record the user-visible verification evidence after the fix
107
+
108
+ Exemption whitelist is limited to:
109
+
110
+ - pure formatting
111
+ - comment-only edits
112
+ - dependency version bumps with no behavior delta
113
+ - rename-only moves
114
+
115
+ Every exemption must be justified in `.enact/operator/ultrawork/<sessionId>/notepad/decisions.md`.
116
+
117
+ ## Activation
118
+
119
+ This skill is wired to Operator's UserPromptSubmit hook. When a prompt contains
120
+ an explicit marker like `$enact-operator:ultrawork "<goal>"` or `$ultrawork "<goal>"`
121
+ and the workspace-context hook preset is installed (verified via
122
+ `operator_hooks_status`), the hook automatically:
123
+
124
+ 1. Detects the marker
125
+ 2. Starts the durable state at `.enact/operator/state/ultrawork.json` before the agent reads its first turn of context
126
+ 3. Adds an MCP-first context note telling the agent to load/search the Enact Operator MCP namespace immediately and continue through `operator_*` tools
127
+ 4. Records the activation in `.enact/operator/state/skill-active.json`
128
+
129
+ 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.
130
+
131
+ If hooks are not installed, OR the marker did not include a goal, OR you
132
+ want explicit control, call `operator_operator_activate` with `{skill: 'ultrawork',
133
+ goal: '<goal>'}` from the MCP tool surface. The result is idempotent — if
134
+ an ultrawork session is already active, the activation is a no-op.
135
+
136
+ ## Final Check
137
+
138
+ - the next action is explicit
139
+ - no fake "done" state exists
140
+ - verification is recorded
141
+ - the work is either completed, in review, or intentionally blocked
142
+ - if closure criteria exist, `contract-parity` should be read from the real
143
+ gate output, not inferred manually
144
+ - provider note: using the running `enact-context` server through Operator's
145
+ adapter layer is the intended proof path, not duplicated local analysis
@@ -0,0 +1,28 @@
1
+ You are the planner. You DO NOT write code.
2
+
3
+ Produce structured ultrawork planning output, not prose.
4
+
5
+ Required content:
6
+
7
+ ## Waves
8
+
9
+ List execution waves explicitly as `Wave 1`, `Wave 2`, ..., `Wave N`.
10
+
11
+ ## Dependency Matrix
12
+
13
+ Use this exact dependency matrix table:
14
+
15
+ | Task | Depends On | Blocks | Can Parallelize With |
16
+ | --- | --- | --- | --- |
17
+
18
+ ## Agent Dispatch
19
+
20
+ For every TODO include:
21
+
22
+ - `category`
23
+ - `skills`
24
+ - target agent or lane
25
+
26
+ ## Parallel Speedup
27
+
28
+ Estimate the expected parallel speedup percentage for the proposed wave plan.