@amsterdamdatalabs/enact-extensions 0.1.1 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +105 -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 +126 -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,126 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "enact-operator hook session-start",
10
+ "statusMessage": "Loading Operator workspace context"
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "UserPromptSubmit": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "enact-operator hook user-prompt-submit"
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "hooks": [
26
+ {
27
+ "type": "command",
28
+ "command": "enact-operator hook doom-loop-counter reset"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "hooks": [
34
+ {
35
+ "type": "command",
36
+ "command": "enact-operator hook doom-loop-search-guard reset"
37
+ }
38
+ ]
39
+ }
40
+ ],
41
+ "PreToolUse": [
42
+ {
43
+ "matcher": "Bash",
44
+ "hooks": [
45
+ {
46
+ "type": "command",
47
+ "command": "enact-operator hook pre-tool-use",
48
+ "statusMessage": "Checking Operator shell safety policy"
49
+ }
50
+ ]
51
+ }
52
+ ],
53
+ "PostToolUse": [
54
+ {
55
+ "matcher": "Bash",
56
+ "hooks": [
57
+ {
58
+ "type": "command",
59
+ "command": "enact-operator hook post-tool-use",
60
+ "statusMessage": "Reviewing Operator tool output"
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "hooks": [
66
+ {
67
+ "type": "command",
68
+ "command": "enact-operator hook doom-loop-counter",
69
+ "statusMessage": "Checking Operator tool-call budget"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "matcher": "Bash",
75
+ "hooks": [
76
+ {
77
+ "type": "command",
78
+ "command": "enact-operator hook doom-loop-search-guard",
79
+ "statusMessage": "Checking Operator search deduplication"
80
+ }
81
+ ]
82
+ }
83
+ ],
84
+ "Stop": [
85
+ {
86
+ "hooks": [
87
+ {
88
+ "type": "command",
89
+ "command": "enact-operator hook stop",
90
+ "timeout": 30
91
+ }
92
+ ]
93
+ }
94
+ ],
95
+ "PreCompact": [
96
+ {
97
+ "hooks": [
98
+ {
99
+ "type": "command",
100
+ "command": "enact-operator hook pre-compact"
101
+ }
102
+ ]
103
+ }
104
+ ],
105
+ "SubagentStart": [
106
+ {
107
+ "hooks": [
108
+ {
109
+ "type": "command",
110
+ "command": "enact-operator hook subagent-tracker start"
111
+ }
112
+ ]
113
+ }
114
+ ],
115
+ "SubagentStop": [
116
+ {
117
+ "hooks": [
118
+ {
119
+ "type": "command",
120
+ "command": "enact-operator hook subagent-tracker stop"
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ }
126
+ }
@@ -0,0 +1,44 @@
1
+ # Skill Variant Contract
2
+
3
+ Each skill directory may ship model-specific peer files alongside the default
4
+ `SKILL.md`.
5
+
6
+ ## File Names
7
+
8
+ - `SKILL.md` is the default prompt body and the required fallback.
9
+ - `gpt.md` is selected for GPT-family model identities.
10
+ - `gemini.md` is selected for Gemini-family model identities.
11
+ - `kimi.md` is selected for Kimi-family model identities.
12
+ - `opus-4-7.md` is selected for Claude Opus 4.7 model identities.
13
+
14
+ ## Selection Rule
15
+
16
+ The loader resolves variants in this order:
17
+
18
+ 1. first matching model-specific peer file
19
+ 2. `SKILL.md` when no model-specific peer matches or no model identity is available
20
+
21
+ ## Model Identity Header
22
+
23
+ The model identity is propagated through the `X-Model-Identity` header injected
24
+ by enact-gateway on routed requests. Variant selection reads that identity from
25
+ activation metadata. If the header is absent, the loader must fall back to
26
+ `SKILL.md` instead of guessing.
27
+
28
+ ## Testing Constraint
29
+
30
+ The default `auto` route does not expose a stable raw model identity for prompt
31
+ selection tests. For live gateway pass-through checks, use the confirmed model
32
+ IDs:
33
+
34
+ - `kimi-for-coding`
35
+ - `MiniMax-M2.7`
36
+
37
+ Do not use generic labels like `gpt-4` or `gemini` for integration checks.
38
+ Helper/unit tests should inject the model identity directly instead of depending
39
+ on a live gateway route.
40
+
41
+ ## Current Scope
42
+
43
+ This helper/documentation slice defines the variant selection contract and the
44
+ Ralph Gemini variant file. Full hook/prompt-loader wiring remains a later step.
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: ai-slop-cleaner
3
+ description: "Walk the diff for TODO/placeholder/silent-catch noise and replace each with a concrete implementation or remove it entirely."
4
+ ---
5
+
6
+ # AI Slop Cleaner
7
+
8
+ ## Purpose
9
+ Removes low-quality AI-generated residue from code produced in a Operator session: `// TODO`, "for now", "later", silent empty catch blocks, unreachable fallback layers, and placeholder strings. Each removal is replaced with a real implementation or an explicit compile-time error — never just deleted.
10
+
11
+ ## Use When
12
+ - After an implementation pass before the operator accepts the result
13
+ - Before running `$ultraqa` verification gates
14
+ - When a diff review reveals TODO comments, "for now" strings, or swallowed exceptions
15
+
16
+ ## Workflow
17
+ 1. Identify the files changed in the current session (operator-driven; use `git diff --name-only`).
18
+ 2. For each changed file, scan for these patterns:
19
+ - `// TODO`, `// FIXME`, `// HACK`, `// XXX`
20
+ - String literals containing "for now", "placeholder", "stub", "later", "not yet implemented"
21
+ - Empty catch blocks or catch blocks that only log without re-throwing or handling
22
+ - Fallback return values that hide real errors (e.g., `return null`, `return []` with no explanation)
23
+ - Dead code gated on `if (false)` or `if (process.env.NEVER)`
24
+ 3. For each hit, choose one action:
25
+ - Replace with a real implementation if the intent is clear
26
+ - Replace with an explicit thrown error if the path should never be reached
27
+ - Remove the dead code entirely if it adds no value
28
+ 4. After cleanup, re-run `enact-operator doctor` to confirm nothing broken:
29
+ ```
30
+ enact-operator doctor
31
+ ```
32
+ 5. Re-run the project's test suite to confirm no regressions.
33
+ 6. Run a second grep pass to confirm zero hits remain:
34
+ ```
35
+ grep -rE "TODO|FIXME|HACK|for now|placeholder|stub" <changed-files>
36
+ ```
37
+
38
+ ## State Contract
39
+ - Reads: changed files in the working tree
40
+ - Writes: same files (in-place edits only); no new files, no new state in `.enact/operator/`
41
+
42
+ ## Activation
43
+
44
+ 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.
45
+ ## Final Check
46
+ - Zero `TODO`, `FIXME`, `HACK`, or placeholder strings in changed files
47
+ - No empty or swallowed catch blocks remain
48
+ - `enact-operator doctor` still passes after cleanup
49
+ - Test suite still passes after cleanup
50
+ - No code was deleted without a replacement or explicit error
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: analyze
3
+ description: "Read-only analysis of a Operator repo, runtime, or codebase surface. No mutations; output is plain text findings."
4
+ ---
5
+
6
+ # Analyze
7
+
8
+ ## Purpose
9
+ Performs a structured, read-only investigation of Operator runtime state, plugin surfaces, provider boundaries, hooks, or codebase structure. Nothing is written or changed. Output is a structured findings report delivered as text. Use this skill before proposing changes so that recommendations are grounded in observed state.
10
+
11
+ ## Use When
12
+ - You need to understand what exists before planning a change
13
+ - Diagnosing why a Operator surface behaves unexpectedly
14
+ - Producing an audit report for operator review
15
+ - Checking provider boundary ownership before a team hand-off
16
+
17
+ ## Workflow
18
+ 1. Identify the target surface (codebase, runtime state, hooks, plugins, or provider boundaries).
19
+ 2. Run the relevant read-only commands in order:
20
+ - Operator health:
21
+ ```
22
+ enact-operator doctor
23
+ ```
24
+ - Plugin and hook inventory:
25
+ ```
26
+ enact-operator plugins status
27
+ enact-operator hooks status
28
+ ```
29
+ - Provider boundary audit:
30
+ ```
31
+ enact-operator audit provider-boundary
32
+ ```
33
+ - Replacement readiness:
34
+ ```
35
+ enact-operator audit replacement-readiness
36
+ ```
37
+ - Task and session state:
38
+ ```
39
+ enact-operator task list
40
+ enact-operator session status
41
+ ```
42
+ - For codebase-level exploration, use `enact-context` tools such as `ctx_search`, `ctx_semantic_search`, `ctx_graph`, and `ctx_tree`.
43
+ 3. Read relevant state files directly if CLI output is insufficient:
44
+ - `.enact/operator/state/`
45
+ - `.enact/operator/sessions/<id>/`
46
+ 4. Synthesize findings into a structured report with sections: Summary, Observations, Gaps, Recommendations.
47
+ 5. Deliver report as plain text. Do not write it to disk unless the operator explicitly requests an artifact.
48
+
49
+ ## Complex Investigation
50
+
51
+ If a single read pass cannot answer the question, escalate with a required two-call delegation pattern before concluding.
52
+
53
+ 1. Run one broad, repository-wide call to map candidate surfaces and narrow the search space.
54
+ 2. Run one targeted follow-up call scoped to the highest-signal surface from step 1.
55
+
56
+ Required 2-call escalation/delegation example:
57
+
58
+ ```bash
59
+ # Call 1: broad sweep to locate candidate ownership and state surfaces
60
+ ctx_search query="provider boundary hooks runtime state orchestration" path="."
61
+
62
+ # Call 2: delegated deep read on the most likely owner from call 1
63
+ ctx_read path="enact-factory/<resolved-file-or-dir>" mode="summary"
64
+ ```
65
+
66
+ Do not skip the second call when the first call returns multiple plausible surfaces.
67
+
68
+ ## State Contract
69
+ - Reads: all `.enact/operator/` state, CLI output from `doctor`, `audit`, `plugins status`, `hooks status`
70
+ - Writes: nothing (read-only mode)
71
+
72
+ ## Commands
73
+ ```
74
+ enact-operator doctor
75
+ enact-operator plugins status
76
+ enact-operator hooks status
77
+ enact-operator audit provider-boundary
78
+ enact-operator audit replacement-readiness
79
+ enact-operator task list
80
+ enact-operator session status
81
+ enact-operator hud
82
+ ```
83
+
84
+ ## Activation
85
+
86
+ 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.
87
+ ## Final Check
88
+ - No files were modified during this skill's execution
89
+ - Findings are grounded in actual CLI output, not assumptions
90
+ - Report includes a Gaps section if any expected surfaces are missing
91
+ - Recommendations are labeled as recommendations, not implemented changes
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: ask
3
+ description: "Narrow question-answer mode: answer a specific question about Operator state, behavior, or configuration without mutating anything."
4
+ ---
5
+
6
+ # Ask
7
+
8
+ ## Purpose
9
+ Handles a single, scoped question about Operator runtime state, CLI behavior, configuration, or codebase structure. No files are written, no sessions are started, and no state is mutated. If the question requires deep research, delegate to `$autoresearch-goal` rather than expanding scope here.
10
+
11
+ ## Use When
12
+ - The operator has a specific factual question about Operator behavior
13
+ - Clarifying what a CLI command does or what a state file contains
14
+ - Answering "what is the current value of X" without modifying anything
15
+
16
+ ## Workflow
17
+ 1. Read the question and determine the minimum set of sources needed to answer it.
18
+ 2. Consult available sources in this order:
19
+ - Operator CLI output (doctor, status, hooks status, plugins status)
20
+ - `.enact/operator/state/` files (read via `enact-operator state read <key>`)
21
+ - Source code or configuration files (read-only)
22
+ - Skill files in `enact-operator/extensions/skills/` for behavioral questions
23
+ 3. If the question requires more than a read pass (e.g., multi-file research or external docs), route to `$autoresearch-goal` and stop here.
24
+ 4. Compose a direct, specific answer. Include the exact CLI output or file excerpt that supports it.
25
+ 5. If the answer reveals a problem, flag it but do not fix it — report only.
26
+
27
+ ## State Contract
28
+ - Reads: CLI output, `.enact/operator/state/`, source and config files as needed
29
+ - Writes: nothing
30
+
31
+ ## Commands
32
+ ```
33
+ enact-operator state read <key>
34
+ enact-operator doctor
35
+ enact-operator plugins status
36
+ enact-operator hooks status
37
+ enact-operator session status
38
+ enact-operator task list
39
+ ```
40
+
41
+ ## Activation
42
+
43
+ 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.
44
+ ## Final Check
45
+ - Answer is specific and references the source (file path, CLI output, or line reference)
46
+ - No files were written or mutated
47
+ - If the answer cannot be determined from available sources, that is stated explicitly rather than guessed
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: autopilot
3
+ description: "Autonomous end-to-end Operator loop: classify intent, plan, execute, verify, and wrap until the requested outcome is complete."
4
+ lane: true
5
+ mcpToolPrefix: operator_autopilot_
6
+ ---
7
+
8
+ # Autopilot
9
+
10
+ ## Purpose
11
+
12
+ Use `$autopilot` when the user wants unattended end-to-end delivery rather than a single command. Autopilot classifies the incoming request, routes it through the appropriate sub-skills, and drives the work to a verified conclusion without requiring the user to advance each step manually.
13
+
14
+ Autopilot is not a single command. It is a routing and orchestration wrapper over `$plan`, `$ralph`, `$ultrawork`, and `$team`.
15
+
16
+ ## Use When
17
+
18
+ - The request is clear enough to execute but spans multiple steps or files
19
+ - The user wants delivery, not a plan to review before proceeding
20
+ - Work needs to continue across pauses without re-explanation
21
+ - Multiple agents or executors would benefit from a shared local task queue
22
+
23
+ ## Do Not Use When
24
+
25
+ - The request is ambiguous — route through `$deep-interview` first
26
+ - The user wants to review a plan before any execution begins — use `$ralplan`
27
+ - The change is a trivial single-file edit with obvious acceptance criteria
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 session, ralph, ultrawork, task, inbox, and review state current as you go
34
+ - when no external `taskId` is linked, local Operator task discipline is mandatory; autopilot owns a local task and must keep it authoritative
35
+ - do not stop at a partial handoff unless the next owner is explicit
36
+ - if closure criteria exist, resolve them through `operator_contract_parity_run`
37
+ before declaring success
38
+
39
+ ## Routing Rules
40
+
41
+ Classify the request before executing:
42
+
43
+ | Signal | Route |
44
+ |---|---|
45
+ | Ambiguous intent, unclear scope | `$deep-interview` → `$ralplan` |
46
+ | Clear intent, multi-step, single agent sufficient | `$ralph` |
47
+ | Clear intent, high-throughput or parallel work | `$ultrawork` |
48
+ | Clear intent, requires multiple executors or review gates | `$team` |
49
+ | Any route above, needs a durable plan artifact first | `$plan` before execution |
50
+
51
+ ## Workflow
52
+
53
+ 1. Read current Operator state to orient:
54
+ - MCP: `operator_session_status`, `operator_state_read`, `operator_task_list`
55
+ - CLI:
56
+ ```
57
+ enact-operator session status
58
+ enact-operator state read
59
+ enact-operator task list # local Task runtime state
60
+ ```
61
+ 2. Check the HUD for a summary view:
62
+ - MCP: `operator_hud`
63
+ - CLI: `enact-operator hud`
64
+ 3. Classify the request using the routing table above.
65
+ 4. If the request needs a plan artifact, write it to `.enact/operator/plans/` via `$plan` before advancing.
66
+ 5. Start the appropriate execution mode:
67
+ - Single-agent loop:
68
+ - MCP: `operator_ralph_start` with `goal`
69
+ - CLI: `enact-operator ralph start "<goal>"`
70
+ - High-throughput:
71
+ - MCP: `operator_ultrawork_start` with `goal`
72
+ - CLI: `enact-operator ultrawork start "<goal>"`
73
+ - Multi-executor:
74
+ - MCP: `operator_team_init`, then `operator_team_queue`
75
+ - CLI fallback: `enact-operator team init && enact-operator team queue "<title>"`
76
+ 6. Monitor progress:
77
+ - MCP: `operator_ralph_status`, `operator_ultrawork_status`, `operator_team_status`, `operator_inbox_list`
78
+ - CLI:
79
+ ```
80
+ enact-operator ralph status
81
+ enact-operator ultrawork status
82
+ enact-operator team status
83
+ enact-operator team inbox
84
+ ```
85
+ 7. Advance through verification gates:
86
+ - MCP: `operator_ralph_verify` with `gateId` and `status`, `operator_ralph_advance` with `toPhase`
87
+ - CLI:
88
+ ```
89
+ enact-operator ralph verify <gateId> passed --evidence "<text>"
90
+ enact-operator ralph advance verifying
91
+ enact-operator ralph advance completed
92
+ ```
93
+ 8. Run `$review` before declaring the work complete.
94
+ 9. Close the active mode on success:
95
+ - MCP: `operator_ralph_complete` with `summary`, `operator_ultrawork_complete`
96
+ - CLI:
97
+ ```
98
+ enact-operator ralph complete
99
+ enact-operator ultrawork complete
100
+ ```
101
+
102
+ ## Runtime Clarification
103
+
104
+ - `$autopilot` is a router/orchestrator with durable task, session, team, and
105
+ ultrawork state.
106
+ - It must record the concrete delegated runtime (`ralph`, `ultrawork`, `team`,
107
+ future runtimes) rather than claiming closure itself through narrative only.
108
+
109
+ ## State Contract
110
+
111
+ Reads:
112
+ - `.enact/operator/state/` (active mode state)
113
+ - `.enact/operator/plans/` (plan and verification map)
114
+ - `.enact/operator/state/tasks.json` (local task tracker and queue state)
115
+
116
+ Writes:
117
+ - `.enact/operator/plans/<phase>.md` (if plan is created inline)
118
+ - State transitions via ralph, ultrawork, and team MCP tools or CLI commands
119
+
120
+ ## MCP Tools
121
+
122
+ The full Autopilot lifecycle is driven through the `enact-operator` MCP server:
123
+
124
+ - `operator_session_start` — start or refresh the session record
125
+ - `operator_session_status` — read current session state
126
+ - `operator_session_resume` — resume an existing session
127
+ - `operator_state_read` — read active operator state
128
+ - `operator_task_list` — list current local tasks (current enumerated MCP surface)
129
+ - `operator_inbox_list` — read the inbox
130
+ - `operator_hud` — summary view of all active modes
131
+ - `operator_ralph_start` — start a ralph loop
132
+ - `operator_ralph_status` — read ralph state
133
+ - `operator_ralph_advance` — transition ralph to a new phase
134
+ - `operator_ralph_verify` — record a gate verdict with evidence
135
+ - `operator_ralph_pause` — pause an active loop
136
+ - `operator_ralph_resume` — resume a paused loop
137
+ - `operator_ralph_block` — mark ralph blocked with a reason
138
+ - `operator_ralph_complete` — close the ralph loop
139
+ - `operator_ralph_abort` — abort the ralph loop
140
+ - `operator_ultrawork_start` — start an ultrawork session
141
+ - `operator_ultrawork_status` — read ultrawork state
142
+ - `operator_ultrawork_advance` — advance the ultrawork session
143
+ - `operator_ultrawork_complete` — close the ultrawork session
144
+ - `operator_ultrawork_abort` — abort the ultrawork session
145
+ - `operator_team_status` — read team session state
146
+ - `operator_team_inbox` — read team inbox
147
+
148
+ ## Activation
149
+
150
+ When a prompt contains an explicit marker like `$enact-operator:autopilot "<goal>"`
151
+ or `$autopilot "<goal>"`, Operator's UserPromptSubmit hook can start the durable
152
+ Autopilot state before the agent reads its first turn of context. The hook also
153
+ records the invocation in `.enact/operator/state/skill-active.json` and adds an
154
+ MCP-first context note telling the agent to load/search the Enact Operator MCP
155
+ namespace immediately if `operator_*` tools are not visible yet, then prefer
156
+ `operator_*` tools over the `enact-operator` CLI. That injected startup note is
157
+ not AzDo-only: if no external `taskId` is linked, treat the local
158
+ lane task as mandatory runtime state and keep it current through
159
+ `operator_task_list`.
160
+
161
+ If hooks are unavailable or explicit control is preferred, use
162
+ `operator_operator_activate { skill: 'autopilot', goal: '<goal>' }` and follow the
163
+ returned required action (`operator_autopilot_start` or
164
+ `operator_autopilot_retarget`).
165
+ ## Final Check
166
+
167
+ - The active mode is closed (ralph, ultrawork, or team) — no dangling state
168
+ - Verification gates have evidence, not just a passed status
169
+ - `$review` verdict is approved before work is reported complete
170
+ - `.enact/operator/state/` contains no stale active-mode files
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: autoresearch-goal
3
+ description: "Autoresearch directed at a specific durable goal: findings persist to .enact/operator/research/ and can be linked into ultrawork state."
4
+ ---
5
+
6
+ # Autoresearch Goal
7
+
8
+ ## Purpose
9
+
10
+ Drives a research cycle that is anchored to a concrete, long-running goal rather than a one-off question. Findings are persisted to `.enact/operator/research/` and linked into ultrawork state so the next session can resume with full context. The research is complete only when the findings are specific enough to drive a concrete implementation or rollout decision.
11
+
12
+ ## Use When
13
+
14
+ - a goal requires understanding a codebase, API, or system before implementation can begin
15
+ - research must span multiple sessions and accumulate incrementally
16
+ - findings need to be accessible to future execution sessions without re-running the research
17
+
18
+ ## Workflow
19
+
20
+ 1. Define the research goal clearly. It must end in a concrete decision or artifact, not an open-ended survey.
21
+ 2. Start durable state for the research session:
22
+ - MCP: `operator_session_start`
23
+ - CLI fallback: `enact-operator session start`
24
+ 3. Start ultrawork to track the research lane:
25
+ - MCP: `operator_ultrawork_start`
26
+ - CLI fallback: `enact-operator ultrawork start "Research: <goal description>" --route plan-only`
27
+ 4. Link the research handle into ultrawork:
28
+ - MCP: `operator_ultrawork_link_research`
29
+ - CLI fallback: `enact-operator ultrawork link-research <goalId>`
30
+ 5. Conduct the research:
31
+ - use `ctx_search`, `ctx_semantic_search`, `ctx_graph`, and `ctx_tree` for codebase-level investigation
32
+ - use `operator_audit_provider_boundary` for boundary questions
33
+ - use external documentation tools for API or SDK questions
34
+ 6. Write incremental findings to `.enact/operator/research/<goalId>.md` as the research progresses. Each write appends a dated section.
35
+ 7. When findings are sufficient to drive a decision, summarize them in a Conclusion section in the research file.
36
+ 8. Record verification evidence for the research pass:
37
+ - MCP: `operator_ultrawork_verify`
38
+ - CLI fallback: `enact-operator ultrawork verify "<evidence>"`
39
+ 9. When the research goal is met, complete the ultrawork session:
40
+ - MCP: `operator_ultrawork_complete`
41
+ - CLI fallback: `enact-operator ultrawork complete "<summary>"`
42
+
43
+ ## Runtime Clarification
44
+
45
+ - `autoresearch` / `autoresearch-goal` remain future lane candidates, not
46
+ current exposed AzDo runtime values.
47
+ - If research is being used as closure evidence for a live task, prefer the
48
+ real parity/hygiene surfaces over narrative-only conclusions:
49
+ - `operator_contract_parity_run`
50
+ - `operator_workflow_reconcile`
51
+ - `operator_operator_snapshot`
52
+
53
+ ## State Contract
54
+
55
+ - reads: codebase files, CLI output, external docs
56
+ - writes:
57
+ - `.enact/operator/research/<goalId>.md`
58
+ - ultrawork session state via `operator_ultrawork_*`
59
+
60
+ ## Commands
61
+
62
+ ```
63
+ enact-operator session start
64
+ enact-operator ultrawork start "Research: <goal description>" --route plan-only
65
+ enact-operator ultrawork link-research <goalId>
66
+ enact-operator ultrawork verify "<evidence>"
67
+ enact-operator ultrawork complete "<summary>"
68
+ enact-operator audit provider-boundary
69
+ ```
70
+
71
+ ## Activation
72
+
73
+ 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.
74
+ ## Final Check
75
+
76
+ - `.enact/operator/research/<goalId>.md` contains a Conclusion section with a concrete decision or recommendation
77
+ - ultrawork session is verified or completed, not left dangling
78
+ - research artifact is linked to ultrawork state
79
+ - no research session is left active across context boundaries without recorded evidence