thehood 0.1.0-preview.0
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/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +21 -0
- package/PRIVACY.md +49 -0
- package/README.md +264 -0
- package/SECURITY.md +31 -0
- package/dist/bridges/chatgptWebBridge.d.ts +2 -0
- package/dist/bridges/chatgptWebBridge.js +981 -0
- package/dist/bridges/chatgptWebBridge.js.map +1 -0
- package/dist/cli/args.d.ts +9 -0
- package/dist/cli/args.js +82 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/format.d.ts +56 -0
- package/dist/cli/format.js +752 -0
- package/dist/cli/format.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +996 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/mcpConfig.d.ts +36 -0
- package/dist/cli/mcpConfig.js +98 -0
- package/dist/cli/mcpConfig.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/protocol.d.ts +44 -0
- package/dist/mcp/protocol.js +33 -0
- package/dist/mcp/protocol.js.map +1 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.js +106 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools.d.ts +10 -0
- package/dist/mcp/tools.js +2200 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/validation.d.ts +8 -0
- package/dist/mcp/validation.js +67 -0
- package/dist/mcp/validation.js.map +1 -0
- package/dist/providers/chatgptWeb.d.ts +2 -0
- package/dist/providers/chatgptWeb.js +26 -0
- package/dist/providers/chatgptWeb.js.map +1 -0
- package/dist/providers/claudeCode.d.ts +4 -0
- package/dist/providers/claudeCode.js +32 -0
- package/dist/providers/claudeCode.js.map +1 -0
- package/dist/providers/codexCli.d.ts +6 -0
- package/dist/providers/codexCli.js +25 -0
- package/dist/providers/codexCli.js.map +1 -0
- package/dist/providers/codexCliModels.d.ts +23 -0
- package/dist/providers/codexCliModels.js +147 -0
- package/dist/providers/codexCliModels.js.map +1 -0
- package/dist/providers/localCommand.d.ts +26 -0
- package/dist/providers/localCommand.js +614 -0
- package/dist/providers/localCommand.js.map +1 -0
- package/dist/providers/markdownPayload.d.ts +7 -0
- package/dist/providers/markdownPayload.js +29 -0
- package/dist/providers/markdownPayload.js.map +1 -0
- package/dist/providers/responseSchema.d.ts +3 -0
- package/dist/providers/responseSchema.js +187 -0
- package/dist/providers/responseSchema.js.map +1 -0
- package/dist/providers/router.d.ts +3 -0
- package/dist/providers/router.js +21 -0
- package/dist/providers/router.js.map +1 -0
- package/dist/providers/stub.d.ts +2 -0
- package/dist/providers/stub.js +177 -0
- package/dist/providers/stub.js.map +1 -0
- package/dist/providers/types.d.ts +37 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/runtime/agentBoard.d.ts +79 -0
- package/dist/runtime/agentBoard.js +166 -0
- package/dist/runtime/agentBoard.js.map +1 -0
- package/dist/runtime/agentBoardArtifact.d.ts +9 -0
- package/dist/runtime/agentBoardArtifact.js +171 -0
- package/dist/runtime/agentBoardArtifact.js.map +1 -0
- package/dist/runtime/agentRunner.d.ts +17 -0
- package/dist/runtime/agentRunner.js +92 -0
- package/dist/runtime/agentRunner.js.map +1 -0
- package/dist/runtime/approvalInbox.d.ts +54 -0
- package/dist/runtime/approvalInbox.js +143 -0
- package/dist/runtime/approvalInbox.js.map +1 -0
- package/dist/runtime/approvalPolicy.d.ts +11 -0
- package/dist/runtime/approvalPolicy.js +58 -0
- package/dist/runtime/approvalPolicy.js.map +1 -0
- package/dist/runtime/artifacts.d.ts +23 -0
- package/dist/runtime/artifacts.js +48 -0
- package/dist/runtime/artifacts.js.map +1 -0
- package/dist/runtime/browserManager.d.ts +37 -0
- package/dist/runtime/browserManager.js +356 -0
- package/dist/runtime/browserManager.js.map +1 -0
- package/dist/runtime/canonicalMemory.d.ts +23 -0
- package/dist/runtime/canonicalMemory.js +134 -0
- package/dist/runtime/canonicalMemory.js.map +1 -0
- package/dist/runtime/chatGptPageReadiness.d.ts +16 -0
- package/dist/runtime/chatGptPageReadiness.js +74 -0
- package/dist/runtime/chatGptPageReadiness.js.map +1 -0
- package/dist/runtime/commandRunner.d.ts +18 -0
- package/dist/runtime/commandRunner.js +115 -0
- package/dist/runtime/commandRunner.js.map +1 -0
- package/dist/runtime/commandSafety.d.ts +7 -0
- package/dist/runtime/commandSafety.js +61 -0
- package/dist/runtime/commandSafety.js.map +1 -0
- package/dist/runtime/config.d.ts +10 -0
- package/dist/runtime/config.js +107 -0
- package/dist/runtime/config.js.map +1 -0
- package/dist/runtime/crewLanes.d.ts +2 -0
- package/dist/runtime/crewLanes.js +123 -0
- package/dist/runtime/crewLanes.js.map +1 -0
- package/dist/runtime/criticPolicy.d.ts +17 -0
- package/dist/runtime/criticPolicy.js +50 -0
- package/dist/runtime/criticPolicy.js.map +1 -0
- package/dist/runtime/defaults.d.ts +5 -0
- package/dist/runtime/defaults.js +100 -0
- package/dist/runtime/defaults.js.map +1 -0
- package/dist/runtime/directives.d.ts +3 -0
- package/dist/runtime/directives.js +218 -0
- package/dist/runtime/directives.js.map +1 -0
- package/dist/runtime/doctor.d.ts +36 -0
- package/dist/runtime/doctor.js +185 -0
- package/dist/runtime/doctor.js.map +1 -0
- package/dist/runtime/errors.d.ts +20 -0
- package/dist/runtime/errors.js +41 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/externalTransfer.d.ts +20 -0
- package/dist/runtime/externalTransfer.js +156 -0
- package/dist/runtime/externalTransfer.js.map +1 -0
- package/dist/runtime/fanout.d.ts +64 -0
- package/dist/runtime/fanout.js +263 -0
- package/dist/runtime/fanout.js.map +1 -0
- package/dist/runtime/gitEvidence.d.ts +10 -0
- package/dist/runtime/gitEvidence.js +80 -0
- package/dist/runtime/gitEvidence.js.map +1 -0
- package/dist/runtime/handoffs.d.ts +32 -0
- package/dist/runtime/handoffs.js +100 -0
- package/dist/runtime/handoffs.js.map +1 -0
- package/dist/runtime/ids.d.ts +2 -0
- package/dist/runtime/ids.js +4 -0
- package/dist/runtime/ids.js.map +1 -0
- package/dist/runtime/localStateIgnore.d.ts +9 -0
- package/dist/runtime/localStateIgnore.js +98 -0
- package/dist/runtime/localStateIgnore.js.map +1 -0
- package/dist/runtime/loop.d.ts +14 -0
- package/dist/runtime/loop.js +1863 -0
- package/dist/runtime/loop.js.map +1 -0
- package/dist/runtime/loopRecommendation.d.ts +109 -0
- package/dist/runtime/loopRecommendation.js +566 -0
- package/dist/runtime/loopRecommendation.js.map +1 -0
- package/dist/runtime/loopResponsibilities.d.ts +2 -0
- package/dist/runtime/loopResponsibilities.js +395 -0
- package/dist/runtime/loopResponsibilities.js.map +1 -0
- package/dist/runtime/loopRunner.d.ts +28 -0
- package/dist/runtime/loopRunner.js +81 -0
- package/dist/runtime/loopRunner.js.map +1 -0
- package/dist/runtime/operatorNextActions.d.ts +2 -0
- package/dist/runtime/operatorNextActions.js +344 -0
- package/dist/runtime/operatorNextActions.js.map +1 -0
- package/dist/runtime/paths.d.ts +9 -0
- package/dist/runtime/paths.js +14 -0
- package/dist/runtime/paths.js.map +1 -0
- package/dist/runtime/permissions.d.ts +9 -0
- package/dist/runtime/permissions.js +73 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/progressPacket.d.ts +12 -0
- package/dist/runtime/progressPacket.js +512 -0
- package/dist/runtime/progressPacket.js.map +1 -0
- package/dist/runtime/protectedPaths.d.ts +6 -0
- package/dist/runtime/protectedPaths.js +48 -0
- package/dist/runtime/protectedPaths.js.map +1 -0
- package/dist/runtime/providers.d.ts +13 -0
- package/dist/runtime/providers.js +60 -0
- package/dist/runtime/providers.js.map +1 -0
- package/dist/runtime/reconciliation.d.ts +17 -0
- package/dist/runtime/reconciliation.js +283 -0
- package/dist/runtime/reconciliation.js.map +1 -0
- package/dist/runtime/redaction.d.ts +1 -0
- package/dist/runtime/redaction.js +5 -0
- package/dist/runtime/redaction.js.map +1 -0
- package/dist/runtime/remoteRepoContext.d.ts +77 -0
- package/dist/runtime/remoteRepoContext.js +316 -0
- package/dist/runtime/remoteRepoContext.js.map +1 -0
- package/dist/runtime/repoContext.d.ts +50 -0
- package/dist/runtime/repoContext.js +399 -0
- package/dist/runtime/repoContext.js.map +1 -0
- package/dist/runtime/repoGateway.d.ts +64 -0
- package/dist/runtime/repoGateway.js +308 -0
- package/dist/runtime/repoGateway.js.map +1 -0
- package/dist/runtime/responseContracts.d.ts +3 -0
- package/dist/runtime/responseContracts.js +86 -0
- package/dist/runtime/responseContracts.js.map +1 -0
- package/dist/runtime/reviewLanes.d.ts +2 -0
- package/dist/runtime/reviewLanes.js +343 -0
- package/dist/runtime/reviewLanes.js.map +1 -0
- package/dist/runtime/reviewRouting.d.ts +51 -0
- package/dist/runtime/reviewRouting.js +152 -0
- package/dist/runtime/reviewRouting.js.map +1 -0
- package/dist/runtime/revisionPacket.d.ts +38 -0
- package/dist/runtime/revisionPacket.js +144 -0
- package/dist/runtime/revisionPacket.js.map +1 -0
- package/dist/runtime/revisionTrail.d.ts +2 -0
- package/dist/runtime/revisionTrail.js +162 -0
- package/dist/runtime/revisionTrail.js.map +1 -0
- package/dist/runtime/role-assignment.d.ts +4 -0
- package/dist/runtime/role-assignment.js +21 -0
- package/dist/runtime/role-assignment.js.map +1 -0
- package/dist/runtime/roleRoster.d.ts +28 -0
- package/dist/runtime/roleRoster.js +96 -0
- package/dist/runtime/roleRoster.js.map +1 -0
- package/dist/runtime/runInsights.d.ts +121 -0
- package/dist/runtime/runInsights.js +305 -0
- package/dist/runtime/runInsights.js.map +1 -0
- package/dist/runtime/runMonitor.d.ts +33 -0
- package/dist/runtime/runMonitor.js +143 -0
- package/dist/runtime/runMonitor.js.map +1 -0
- package/dist/runtime/runtime.d.ts +15 -0
- package/dist/runtime/runtime.js +199 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/runtime/runtimeInfo.d.ts +9 -0
- package/dist/runtime/runtimeInfo.js +76 -0
- package/dist/runtime/runtimeInfo.js.map +1 -0
- package/dist/runtime/store.d.ts +4 -0
- package/dist/runtime/store.js +48 -0
- package/dist/runtime/store.js.map +1 -0
- package/dist/runtime/summons.d.ts +25 -0
- package/dist/runtime/summons.js +403 -0
- package/dist/runtime/summons.js.map +1 -0
- package/dist/runtime/teamPresets.d.ts +14 -0
- package/dist/runtime/teamPresets.js +153 -0
- package/dist/runtime/teamPresets.js.map +1 -0
- package/dist/runtime/types.d.ts +505 -0
- package/dist/runtime/types.js +28 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/runtime/validationCommands.d.ts +18 -0
- package/dist/runtime/validationCommands.js +106 -0
- package/dist/runtime/validationCommands.js.map +1 -0
- package/dist/tui/dashboard.d.ts +41 -0
- package/dist/tui/dashboard.js +1115 -0
- package/dist/tui/dashboard.js.map +1 -0
- package/docs/ARCHITECTURE.md +277 -0
- package/docs/CLI_SPEC.md +396 -0
- package/docs/CODEX_SETUP.md +288 -0
- package/docs/COMPLETION_CONTRACT.md +52 -0
- package/docs/CONTRIBUTOR_GUIDE.md +70 -0
- package/docs/DEMO.md +62 -0
- package/docs/GLOSSARY.md +46 -0
- package/docs/GOAL_LOOP_SCHEDULE.md +50 -0
- package/docs/KNOWN_LIMITATIONS.md +29 -0
- package/docs/LICENSING.md +21 -0
- package/docs/LOOP_RECIPES.md +290 -0
- package/docs/LOOP_SELECTION_UX.md +118 -0
- package/docs/MCP_SPEC.md +689 -0
- package/docs/MEMORY_AND_RECONCILIATION.md +222 -0
- package/docs/NPM_PUBLISHING.md +51 -0
- package/docs/OPEN_DECISIONS.md +81 -0
- package/docs/PROMPT_SCHEMAS.md +411 -0
- package/docs/PROVIDER_ADAPTERS.md +323 -0
- package/docs/PROVIDER_MATRIX.md +21 -0
- package/docs/PUBLIC_REPO_READINESS.md +49 -0
- package/docs/RESEARCH_NOTES.md +92 -0
- package/docs/ROADMAP.md +94 -0
- package/docs/ROLE_CONTRACTS.md +252 -0
- package/docs/RUNTIME_LOOP.md +240 -0
- package/docs/SECURITY_AND_PRIVACY.md +161 -0
- package/docs/TESTING_AND_VERIFICATION.md +180 -0
- package/docs/TRUST_MODEL.md +65 -0
- package/docs/decisions/0001-runtime-first-cli-and-mcp.md +23 -0
- package/docs/decisions/0002-provider-neutral-role-mapping.md +43 -0
- package/docs/decisions/0003-separate-implementation-and-verification.md +27 -0
- package/docs/product/README.md +14 -0
- package/docs/product/model-selection.md +88 -0
- package/docs/product/positioning.md +37 -0
- package/docs/product/pro-usage-modes.md +70 -0
- package/docs/product/roadmap.md +57 -0
- package/docs/product/role-policy.md +89 -0
- package/docs/product/runtime-invariants.md +44 -0
- package/docs/release/v0.1.0-preview.0.md +48 -0
- package/examples/stub-demo/README.md +25 -0
- package/package.json +55 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Codex Setup
|
|
2
|
+
|
|
3
|
+
TheHood is exposed to Codex through its MCP server.
|
|
4
|
+
|
|
5
|
+
## Build
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install
|
|
9
|
+
npm run build
|
|
10
|
+
node dist/cli/main.js setup --repo .
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`setup` is read-only. It prints the local-build command, a temporary shell alias, optional `npm link` guidance, MCP config commands, and TUI launch commands for the current checkout.
|
|
14
|
+
|
|
15
|
+
## Get MCP Config
|
|
16
|
+
|
|
17
|
+
For an installed package:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
thehood mcp config
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For this local checkout:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
node dist/cli/main.js mcp config
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The command prints two TOML snippets:
|
|
30
|
+
|
|
31
|
+
- installed package: `command = "thehood"`
|
|
32
|
+
- local build: `command = "node"` with the absolute path to `dist/cli/main.js`
|
|
33
|
+
|
|
34
|
+
Use one snippet in Codex's MCP server configuration.
|
|
35
|
+
|
|
36
|
+
## ChatGPT MCP Connector Mode
|
|
37
|
+
|
|
38
|
+
This path is for ChatGPT Web/Pro acting as an MCP host. It is not the `chatgpt-web` browser bridge that Codex can ask TheHood to invoke.
|
|
39
|
+
|
|
40
|
+
Generate deterministic Secure MCP Tunnel guidance for both installed and local-build commands:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
thehood mcp tunnel --tunnel-id <tunnel-id> --profile thehood-local
|
|
44
|
+
node dist/cli/main.js mcp tunnel --tunnel-id <tunnel-id> --profile thehood-local
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Use the local-build command while developing this checkout so ChatGPT reaches the current `dist/cli/main.js`. The helper does not start the tunnel, install `tunnel-client`, configure ChatGPT, or contact OpenAI; it only prints the command shape TheHood expects.
|
|
48
|
+
|
|
49
|
+
After running `tunnel-client init`, `tunnel-client doctor --profile thehood-local --explain`, and `tunnel-client run --profile thehood-local`, create the ChatGPT connector from the tunnel connection and enable it in a new ChatGPT conversation.
|
|
50
|
+
|
|
51
|
+
First connector validation from ChatGPT:
|
|
52
|
+
|
|
53
|
+
1. Ask ChatGPT to call `thehood_doctor` for the target `repo_path`.
|
|
54
|
+
2. Ask ChatGPT to call `thehood_repo_tree` or `thehood_repo_read_file` for a harmless path.
|
|
55
|
+
3. Ask ChatGPT to call `thehood_pro_access` when it needs the Pro bridge readiness and connector-mode handoff options.
|
|
56
|
+
|
|
57
|
+
TheHood remains the local runtime and repo gateway in connector mode. ChatGPT receives only bounded tool results it calls, and private repos should use trusted MCP hosts because repo and run data can be disclosed through those results.
|
|
58
|
+
|
|
59
|
+
For ChatGPT Pro through the included browser bridge, start the TheHood-managed browser profile and select the intended model:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node dist/cli/main.js browser start
|
|
63
|
+
node dist/cli/main.js browser status
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The browser manager uses a persistent isolated Chrome profile under `~/Library/Application Support/TheHood/ChromeProfiles/chatgpt-web` on macOS. The user signs into ChatGPT in that profile once; TheHood does not copy cookies, local storage, or tokens.
|
|
67
|
+
|
|
68
|
+
Then use the opt-in config generator:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
node dist/cli/main.js mcp config --chatgpt-web
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This adds:
|
|
75
|
+
|
|
76
|
+
- `THEHOOD_CHATGPT_WEB_COMMAND`
|
|
77
|
+
- `THEHOOD_CHATGPT_WEB_MODEL_CONFIRMED=1`
|
|
78
|
+
- `THEHOOD_CHATGPT_WEB_CDP_URL=http://127.0.0.1:9222`
|
|
79
|
+
- `THEHOOD_CHATGPT_WEB_TIMEOUT_MS=600000`
|
|
80
|
+
- `THEHOOD_CHATGPT_WEB_KEEP_TARGET_ON_FAILURE=1`
|
|
81
|
+
|
|
82
|
+
Use `--cdp-url <url>` if Chrome is listening on a different DevTools endpoint.
|
|
83
|
+
|
|
84
|
+
Before starting the Codex app, check the local bridge readiness:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
node dist/cli/main.js doctor --repo /path/to/repo --json
|
|
88
|
+
npm run smoke:codex-config -- --config ~/.codex/config.toml --repo /path/to/repo
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
For `chatgpt-web`, `doctor` verifies that the bridge command is configured and executable, the model confirmation guard is enabled, Chrome DevTools is reachable, a ChatGPT tab is visible, the page is authenticated, and the composer is ready. Common issues are `bridge_command_not_configured`, `model_not_confirmed`, `cdp_unreachable`, `chatgpt_tab_not_found`, `chatgpt_auth_required`, `chatgpt_composer_not_ready`, and `chatgpt_page_uninspectable`.
|
|
92
|
+
|
|
93
|
+
For `codex-cli`, `doctor` asks the installed Codex CLI for its current model catalog with `codex debug models`. TheHood keeps only sanitized model metadata, resolves friendly assignments such as `codex-cli:spark` against that live catalog, and reports `model_not_available:<model>` when a custom role assignment is not supported by the current CLI/account.
|
|
94
|
+
|
|
95
|
+
## Actual Codex App Verification
|
|
96
|
+
|
|
97
|
+
Add one generated TOML snippet to Codex's `config.toml`, then restart Codex so the MCP server list is rebuilt. A running Codex session should not be treated as proof because MCP servers are loaded at app or session startup.
|
|
98
|
+
|
|
99
|
+
After restart, the TheHood server should expose these tools:
|
|
100
|
+
|
|
101
|
+
- `thehood_doctor`
|
|
102
|
+
- `thehood_roles`
|
|
103
|
+
- `thehood_model_access`
|
|
104
|
+
- `thehood_pro_access`
|
|
105
|
+
- `thehood_recommend_loop`
|
|
106
|
+
- `thehood_agent_board`
|
|
107
|
+
- `thehood_assign_roles`
|
|
108
|
+
- `thehood_plan`
|
|
109
|
+
- `thehood_orchestrate`
|
|
110
|
+
- `thehood_consult`
|
|
111
|
+
- `thehood_summon`
|
|
112
|
+
- `thehood_fanout`
|
|
113
|
+
- `thehood_continue`
|
|
114
|
+
- `thehood_loop`
|
|
115
|
+
- `thehood_reconcile`
|
|
116
|
+
- `thehood_status`
|
|
117
|
+
- `thehood_runs`
|
|
118
|
+
- `thehood_read_artifact`
|
|
119
|
+
- `thehood_capture_evidence`
|
|
120
|
+
- `thehood_abort`
|
|
121
|
+
|
|
122
|
+
When developing TheHood itself, rebuild and restart the Codex app or MCP session before validating newly changed tool output. Existing Codex chats can keep an already-started MCP server process alive, so code changes may pass `smoke:codex-config` while the current chat still shows the previous tool behavior.
|
|
123
|
+
|
|
124
|
+
Use `thehood_doctor` as the in-chat stale-server check. Current builds report `runtime.capabilities`; if Codex does not show expected capabilities such as `structured_mcp_next_actions`, `approval_artifact_next_actions`, `protected_integrated_patch_gate`, `cli_artifact_reads`, `approval_phrase_enforcement`, `final_report_artifacts`, `mcp_final_report_next_action`, `canonical_memory_rehydration`, `provider_directive_ack`, `local_agent_execution_artifacts`, `max_iteration_enforcement`, `validation_command_capture`, `review_routing_policy`, `chatgpt_browser_manager`, `chatgpt_web_bridge_fail_fast`, `chatgpt_web_session_isolation`, `chatgpt_web_auth_readiness`, `branded_tui_shell`, `operator_next_actions`, `loop_responsibility_schedule`, `crew_lane_trail`, `revision_trail`, `runtime_loop_runner`, `autopilot_approval_policy`, `mcp_autopilot_continue_guidance`, `run_status_insights`, `same_run_agent_summons`, `bounded_same_run_fanout`, `runtime_team_presets`, `multi_model_team_presets`, `loop_recommendation_router`, `codex_loop_plan_artifact`, `provider_model_passthrough`, `configurable_budget_envelopes`, `model_assisted_qa_tester`, `critic_trigger_artifacts`, `pro_access_preflight`, `model_access_preflight`, `codex_agent_board`, and `codex_agent_board_artifact`, the chat is still connected to an older MCP server process.
|
|
125
|
+
|
|
126
|
+
Codex can recommend a loop shape before starting work by calling `thehood_recommend_loop`. The tool is read-only and returns a recommended recipe, recommended stack, draft completion contract, alternatives, editable card actions, renderer-facing `card`, `runAction`, and dashboard payload for a loop-plan card. Recommendation does not call providers, edit files, approve gates, or start schedules; accepting the card should invoke the returned runtime action.
|
|
127
|
+
|
|
128
|
+
When developing locally, build the runtime and run `npm run smoke:codex-config` to verify a fresh MCP launch exposes current tools. Existing Codex conversations may keep a previously loaded tool schema; if the smoke passes but the current thread does not show `thehood_recommend_loop`, start a new Codex thread or reload the Codex app/session so it reconnects to TheHood.
|
|
129
|
+
|
|
130
|
+
Codex can request renderable agent visibility by calling `thehood_agent_board` with `include_artifact: true`. The returned `artifact.manifest` and `artifact.snapshot` are dashboard payloads derived from runtime state and can be passed to an available Codex artifact renderer. Rendering remains a display layer: it does not schedule agents, approve gates, or grant tools.
|
|
131
|
+
|
|
132
|
+
Codex can inspect the general model-access path by calling `thehood_model_access`. This is a local-only preflight: it does not call Claude, Codex CLI, ChatGPT, or API providers and does not send repo context externally. Use it before external model-backed consults or fan-outs that may disclose repo context, progress packets, memory, or runtime artifacts. Dirty or unpushed repos should show the user choices returned by the preflight: commit and push a checkpoint, approve bounded local context/diff transfer, use no-repo-context strategy, or cancel. Clean pushed GitHub repos should default to remote refs only when the preflight reports the provider route as confirmed; for `chatgpt-web`, unconfirmed bridge GitHub connector access still requires user choice. If host policy blocks the direct call, present the returned compact approval packet with `approval_packet.copyable_text_block` as a fenced `text` block, or switch to no-repo-context or connector mode.
|
|
133
|
+
|
|
134
|
+
Codex can inspect the Pro access path by calling `thehood_pro_access`. This is a local-only preflight: it does not call ChatGPT Pro and does not send repo context externally. Use it when a direct `chatgpt-web` consult is rejected by Codex host policy, when bridge readiness is unclear, or when the right answer is to switch to ChatGPT MCP connector mode instead of asking for the same approval again.
|
|
135
|
+
|
|
136
|
+
First verification sequence from a Codex chat:
|
|
137
|
+
|
|
138
|
+
1. Call `thehood_doctor` for the target repo and confirm active roles have no issues.
|
|
139
|
+
2. Call `thehood_roles` or `thehood_agent_board` and confirm the agent roster shows the intended orchestrator, implementer, QA, verifier, and critic owners.
|
|
140
|
+
3. Call `thehood_model_access` before external model-backed consults or fan-outs that may disclose repo context, progress packets, memory, or runtime artifacts. If the repo is dirty or unpushed, show the returned user choices. If the repo is clean and pushed, use the remote GitHub refs default only when the preflight reports the provider route as confirmed. If Codex host policy blocks external disclosure, use the returned compact approval packet and show `approval_packet.copyable_text_block` in a fenced `text` block, or switch to no-repo-context or connector mode.
|
|
141
|
+
4. Call `thehood_pro_access` before direct Pro consults from Codex when ChatGPT Web bridge readiness or connector-mode handoff details matter.
|
|
142
|
+
5. Call `thehood_plan` for a harmless read-only goal.
|
|
143
|
+
6. Call `thehood_continue` with `approval: "none"` for that run. In manual mode, confirm it stops for explicit approval before invoking the configured read-only provider, which is Codex CLI by default. In autopilot mode, confirm provider invocation is auto-approved and recorded as `approval_auto_approved`.
|
|
144
|
+
7. Approve a provider invocation only when a manual approval gate is active and the user accepts calling the configured provider for the repo, then continue the run and confirm it returns schema-valid JSON.
|
|
145
|
+
8. If a ChatGPT Web or API provider is configured and delegates repo inspection, confirm the runtime creates a bounded `context` artifact. In manual mode it should stop for explicit approval before sending that context back to the provider; in autopilot or auto-low-risk transfer mode it may auto-approve a bounded non-secret manifest and record the transfer approval.
|
|
146
|
+
9. Approve the context transfer only when a manual transfer gate is active and the user accepts sending bounded repo evidence, then continue the run.
|
|
147
|
+
10. For implementation testing, call `thehood_orchestrate` in `implement` mode and confirm it stops for approval before edit-capable execution.
|
|
148
|
+
|
|
149
|
+
## Optional Codex Plugin
|
|
150
|
+
|
|
151
|
+
The repo includes an optional Codex plugin scaffold at `plugins/thehood-codex` and a repo-local marketplace at `.agents/plugins/marketplace.json`.
|
|
152
|
+
|
|
153
|
+
Install it only when you want Codex to load TheHood-specific workflow guidance and MCP wiring:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
codex plugin marketplace add /path/to/the-hood
|
|
157
|
+
codex plugin add thehood-codex@thehood
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Start a new Codex thread after installing or updating the plugin so Codex reloads plugin skills and MCP configuration.
|
|
161
|
+
|
|
162
|
+
The plugin's MCP server config runs `thehood mcp`, so the `thehood` binary must be available on `PATH`. For local development, either link/install the package after `npm run build` or keep using the explicit local snippet from:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
node dist/cli/main.js mcp config
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Native Codex Subagents
|
|
169
|
+
|
|
170
|
+
Codex's native Subagents panel is owned by Codex subagent workflows, not by MCP tool output. TheHood cannot directly register an arbitrary running provider call into that panel through `thehood_agent_board` or another MCP tool.
|
|
171
|
+
|
|
172
|
+
This repository does not include repo-root `.codex/agents/` custom agents by default because those agents make Codex show a native Subagents surface even when the user did not ask for it.
|
|
173
|
+
|
|
174
|
+
If a future TheHood plugin version offers opt-in custom agents, use them only when the user explicitly wants Codex-native subagent threads. For example:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
Use TheHood native subagents for this review. Spawn thehood-qa and thehood-critic in parallel, wait for both, and summarize their findings with file references.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Those spawned Codex agents should appear in the native Codex Subagents panel. They inherit the parent session's model, MCP servers, sandbox, and approvals unless Codex is told otherwise. Any custom agents are presentation and delegation helpers for Codex-native workflows; TheHood runtime state, artifacts, approvals, and verifier separation remain authoritative.
|
|
181
|
+
|
|
182
|
+
Use `thehood_agent_board` with `include_artifact: true` when you want TheHood runtime-owned role visibility rendered as an in-chat dashboard instead of native Codex subagent threads.
|
|
183
|
+
|
|
184
|
+
## Recommended First Codex Chat
|
|
185
|
+
|
|
186
|
+
After Codex can see TheHood tools:
|
|
187
|
+
|
|
188
|
+
1. Ask Codex to call `thehood_doctor` for the repo.
|
|
189
|
+
2. Ask Codex to call `thehood_agent_board` and inspect the visible agent cards before changing any role owner.
|
|
190
|
+
3. Ask Codex to call `thehood_model_access` before Claude/Codex/GPT/Pro consults or fan-outs that may disclose repo context, progress packets, memory, or runtime artifacts. If the repo is dirty or unpushed, show the returned choices. If the repo is clean and pushed, use the remote GitHub refs default only when the preflight reports the provider route as confirmed. If Codex host policy rejects direct external disclosure, use the returned compact approval packet, show `approval_packet.copyable_text_block` in a fenced `text` block, or use no-repo-context fallback / connector-mode handoff instead of repeating a long custom approval sentence.
|
|
191
|
+
4. Ask Codex to call `thehood_pro_access` before direct ChatGPT Pro consults when you need ChatGPT Web bridge readiness or ChatGPT MCP connector handoff details.
|
|
192
|
+
5. Ask Codex to call `thehood_consult` or `thehood_fanout` with read-only guest roles. When no manual gate is active, Codex should continue with `approval: "none"` and let TheHood autopilot auto-approve bounded provider gates when policy allows.
|
|
193
|
+
6. Use `thehood_orchestrate` for implementation work.
|
|
194
|
+
7. Use `thehood_continue` with explicit approval only for active manual approval gates.
|
|
195
|
+
|
|
196
|
+
Example guest critic:
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"goal": "Critique this implementation plan before code changes.",
|
|
201
|
+
"repo_path": "/path/to/repo",
|
|
202
|
+
"role": "critic",
|
|
203
|
+
"agent": "codex-cli:spark"
|
|
204
|
+
}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Example QA tester:
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"goal": "Review the current evidence and suggest missing validation commands.",
|
|
212
|
+
"repo_path": "/path/to/repo",
|
|
213
|
+
"role": "qa",
|
|
214
|
+
"agent": "codex-cli:spark"
|
|
215
|
+
}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Example ChatGPT Pro orchestrator consult:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"goal": "Plan the safest implementation path before workers start.",
|
|
223
|
+
"repo_path": "/path/to/repo",
|
|
224
|
+
"role": "orchestrator",
|
|
225
|
+
"agent": "chatgpt-web:chatgpt-pro"
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
`chatgpt-web` requires a local bridge executable:
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
export THEHOOD_CHATGPT_WEB_COMMAND=/path/to/chatgpt-web-bridge
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The bridge receives the TheHood prompt on stdin, gets `--model <model>` and `--schema <schema-path>` arguments, uses the user's authenticated ChatGPT session, and prints the normalized `AgentResponse` JSON envelope to stdout. The JSON envelope is for mechanical fields; long plans, reports, and rationale should be returned as markdown in the role payload's `markdown` string. TheHood intentionally does not read ChatGPT cookies, browser local storage, or tokens.
|
|
236
|
+
|
|
237
|
+
This package includes an experimental Chrome DevTools bridge:
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
npm run build
|
|
241
|
+
export THEHOOD_CHATGPT_WEB_COMMAND=/path/to/thehood/dist/bridges/chatgptWebBridge.js
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Start the TheHood-managed browser profile, open ChatGPT, sign in if needed, and select the model you want the bridge to use:
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
node dist/cli/main.js browser start
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
After you have visibly selected the intended model in ChatGPT, enable the model confirmation guard:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
export THEHOOD_CHATGPT_WEB_MODEL_CONFIRMED=1
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Optional bridge settings:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
export THEHOOD_CHATGPT_WEB_CDP_URL=http://127.0.0.1:9222
|
|
260
|
+
export THEHOOD_CHATGPT_WEB_FRESH_URL=https://chatgpt.com/
|
|
261
|
+
export THEHOOD_CHATGPT_WEB_TIMEOUT_MS=600000
|
|
262
|
+
export THEHOOD_CHATGPT_WEB_PROMPT_SELECTOR="#prompt-textarea,[contenteditable='true'],textarea"
|
|
263
|
+
export THEHOOD_CHATGPT_WEB_SEND_SELECTOR="button[data-testid='send-button'],button[aria-label*='Send'],button[aria-label*='send']"
|
|
264
|
+
export THEHOOD_CHATGPT_WEB_RESPONSE_SELECTOR="[data-message-author-role='assistant']"
|
|
265
|
+
export THEHOOD_CHATGPT_WEB_NEW_CHAT_SELECTOR="a[href='/'],button[aria-label*='New chat']"
|
|
266
|
+
export THEHOOD_CHATGPT_WEB_RUN_SCOPED_TARGETS=1
|
|
267
|
+
# export THEHOOD_CHATGPT_WEB_REUSE_CHAT=1
|
|
268
|
+
# export THEHOOD_CHATGPT_WEB_KEEP_TARGET=1
|
|
269
|
+
# export THEHOOD_CHATGPT_WEB_KEEP_TARGET_ON_FAILURE=0
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
By default, TheHood runtime calls use one ChatGPT target per run. The first bridge call creates and verifies a fresh composer, then later ChatGPT Web calls in the same run reuse that target instead of opening a new chat after every Pro answer. The bridge still requires the visible response to echo the current `directiveAck` inside the role payload, so stale project or conversation context fails closed. Calls without a run id keep the older one-target-per-call lifecycle: close after a successfully parsed response, keep the target open when browser access, parsing, acknowledgement, or timeout handling fails. Set `THEHOOD_CHATGPT_WEB_REUSE_CHAT=1` only when intentionally debugging against the current conversation, set `THEHOOD_CHATGPT_WEB_RUN_SCOPED_TARGETS=0` to disable run-scoped target reuse, and set `THEHOOD_CHATGPT_WEB_KEEP_TARGET_ON_FAILURE=0` only when you want failed bridge calls to clean up their temporary tabs.
|
|
273
|
+
|
|
274
|
+
Example persistent role assignment:
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"repo_path": "/path/to/repo",
|
|
279
|
+
"role_mapping": {
|
|
280
|
+
"orchestrator": "codex-cli:default",
|
|
281
|
+
"qa": "codex-cli:spark",
|
|
282
|
+
"critic": "codex-cli:spark",
|
|
283
|
+
"verifier": "codex-cli:spark"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
The implementer and verifier must still be separate assignments.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Completion Contract
|
|
2
|
+
|
|
3
|
+
A completion contract is the pre-work definition of done for a TheHood goal loop. It turns "keep working until good" into a bounded, reviewable target.
|
|
4
|
+
|
|
5
|
+
## Contract Fields
|
|
6
|
+
|
|
7
|
+
| Field | Meaning |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Goal | The concrete outcome the run should achieve. |
|
|
10
|
+
| Acceptance criteria | Conditions that must be true before completion. |
|
|
11
|
+
| Allowed paths | Files or directories the implementer may change. |
|
|
12
|
+
| Forbidden changes | Changes that must stop the run or require separate approval. |
|
|
13
|
+
| Validation | Commands or evidence required before verifier review. |
|
|
14
|
+
| Stop condition | When the loop should stop even if the model wants to continue. |
|
|
15
|
+
| Iteration budget | Maximum provider/repair attempts before fail-closed behavior. |
|
|
16
|
+
| Required evidence | Artifact classes the final report must reference. |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
goal: Prepare npm preview package metadata.
|
|
22
|
+
allowed_paths:
|
|
23
|
+
- package.json
|
|
24
|
+
- package-lock.json
|
|
25
|
+
- docs/NPM_PUBLISHING.md
|
|
26
|
+
forbidden_changes:
|
|
27
|
+
- npm publish
|
|
28
|
+
- npm token or secret files
|
|
29
|
+
- hosted backend code
|
|
30
|
+
acceptance_criteria:
|
|
31
|
+
- package version is 0.1.0-preview.0
|
|
32
|
+
- release:check exists and uses existing smoke commands
|
|
33
|
+
- npm pack dry-run succeeds
|
|
34
|
+
validation:
|
|
35
|
+
- npm run typecheck
|
|
36
|
+
- npm run build
|
|
37
|
+
- npm run smoke:mcp
|
|
38
|
+
- npm run smoke:codex-config
|
|
39
|
+
- npm run smoke:runtime
|
|
40
|
+
- npm pack --dry-run --json
|
|
41
|
+
- git --no-pager diff --check
|
|
42
|
+
stop_condition: verifier approves or asks user to resolve a release boundary
|
|
43
|
+
iteration_budget: 5
|
|
44
|
+
required_evidence:
|
|
45
|
+
- package diff
|
|
46
|
+
- validation command logs
|
|
47
|
+
- final report
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Runtime Behavior
|
|
51
|
+
|
|
52
|
+
The implementer can produce changes, but it cannot accept its own work. Completion requires runtime-captured evidence and independent verifier review when the run is an implementation run.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Contributor Guide
|
|
2
|
+
|
|
3
|
+
TheHood is a local runtime for governed software agent loops. Public contributions should preserve the runtime trust model before adding new surfaces.
|
|
4
|
+
|
|
5
|
+
## Local Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm ci
|
|
9
|
+
npm run build
|
|
10
|
+
node dist/cli/main.js doctor --repo .
|
|
11
|
+
node dist/cli/main.js roster --repo .
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Validation
|
|
15
|
+
|
|
16
|
+
Run the smallest relevant checks while developing. Before release-sensitive changes, run:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm run typecheck
|
|
20
|
+
npm run build
|
|
21
|
+
npm run smoke:mcp
|
|
22
|
+
npm run smoke:codex-config
|
|
23
|
+
npm run smoke:runtime
|
|
24
|
+
git --no-pager diff --check
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Use `npm run release:check` before packaging or release changes.
|
|
28
|
+
|
|
29
|
+
## Forbidden Content
|
|
30
|
+
|
|
31
|
+
Do not commit:
|
|
32
|
+
|
|
33
|
+
- `.thehood/` runtime state
|
|
34
|
+
- provider transcripts
|
|
35
|
+
- browser profiles
|
|
36
|
+
- cookies or session tokens
|
|
37
|
+
- API keys
|
|
38
|
+
- local `.env` files
|
|
39
|
+
- private prompts
|
|
40
|
+
- private repo data
|
|
41
|
+
- generated package archives
|
|
42
|
+
- real customer or payment data
|
|
43
|
+
|
|
44
|
+
Examples, demos, fixtures, and screenshots must be synthetic or scrubbed.
|
|
45
|
+
|
|
46
|
+
## Runtime Boundaries
|
|
47
|
+
|
|
48
|
+
- Runtime logic belongs in `src/runtime`.
|
|
49
|
+
- Provider adapters normalize external behavior into TheHood schemas.
|
|
50
|
+
- CLI, MCP, TUI, website, and future app surfaces should trigger runtime actions, not duplicate orchestration policy.
|
|
51
|
+
- Implementer and verifier must stay separate for implementation work.
|
|
52
|
+
- Verifier, QA tester, critic, and researcher roles must not receive edit tools.
|
|
53
|
+
- Protected test, fixture, snapshot, and eval changes require explicit classification and review.
|
|
54
|
+
|
|
55
|
+
## Provider Changes
|
|
56
|
+
|
|
57
|
+
Provider adapter proposals should explain:
|
|
58
|
+
|
|
59
|
+
- provider mode
|
|
60
|
+
- auth and secret storage
|
|
61
|
+
- output schema mapping
|
|
62
|
+
- approval gates
|
|
63
|
+
- transfer manifests
|
|
64
|
+
- fail-closed behavior
|
|
65
|
+
- validation plan
|
|
66
|
+
- docs updates
|
|
67
|
+
|
|
68
|
+
## Docs Changes
|
|
69
|
+
|
|
70
|
+
Docs should describe current state, not aspirational behavior. When a feature is planned or experimental, say so directly.
|
package/docs/DEMO.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Synthetic Stub Demo
|
|
2
|
+
|
|
3
|
+
This demo proves the public-preview loop without sending code or artifacts to an external provider.
|
|
4
|
+
|
|
5
|
+
It uses only the deterministic `stub` provider, a temporary demo repository, local runtime state, and a package validation script that prints a fixed message.
|
|
6
|
+
|
|
7
|
+
## Run The Demo From This Checkout
|
|
8
|
+
|
|
9
|
+
Build TheHood first:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm run build
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Create a synthetic repository and give it a validation command:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
DEMO_REPO="$(mktemp -d)"
|
|
19
|
+
node dist/cli/main.js init --repo "$DEMO_REPO"
|
|
20
|
+
node dist/cli/main.js approvals policy set mode autopilot --repo "$DEMO_REPO"
|
|
21
|
+
cat > "$DEMO_REPO/package.json" <<'JSON'
|
|
22
|
+
{
|
|
23
|
+
"scripts": {
|
|
24
|
+
"typecheck": "node -e \"process.stdout.write('demo validation ok\\n')\""
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
JSON
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run a bounded goal loop with stub roles:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
node dist/cli/main.js goal "Synthetic demo: prove a governed local loop can complete" \
|
|
34
|
+
--repo "$DEMO_REPO" \
|
|
35
|
+
--orchestrator stub:orchestrator \
|
|
36
|
+
--implementer stub:implementer \
|
|
37
|
+
--qa stub:qa \
|
|
38
|
+
--verifier stub:verifier \
|
|
39
|
+
--critic stub:critic \
|
|
40
|
+
--max-iterations 5 \
|
|
41
|
+
--json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The run should complete locally and emit a JSON result with:
|
|
45
|
+
|
|
46
|
+
- `run.state` set to `completed`
|
|
47
|
+
- `run.mode` set to `implement`
|
|
48
|
+
- `run.maxIterations` set to `5`
|
|
49
|
+
- provider responses from the deterministic stub provider
|
|
50
|
+
- runtime-owned approval events showing autopilot decisions
|
|
51
|
+
|
|
52
|
+
Inspect the final state:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
node dist/cli/main.js status --repo "$DEMO_REPO"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Boundary
|
|
59
|
+
|
|
60
|
+
This demo does not use ChatGPT Pro, Claude Code, Codex CLI, OpenAI API, Anthropic API, browser automation, the ChatGPT MCP connector, a hosted queue, a timer, or a cloud service.
|
|
61
|
+
|
|
62
|
+
It is intentionally synthetic. Its purpose is to show the runtime loop, role separation, approval policy, artifacts, validation evidence, and terminal completion behavior without depending on external accounts or private repository contents.
|
package/docs/GLOSSARY.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Glossary
|
|
2
|
+
|
|
3
|
+
## Agent
|
|
4
|
+
|
|
5
|
+
A model-backed or tool-backed participant with a role contract, input schema, permissions, and output schema.
|
|
6
|
+
|
|
7
|
+
## Orchestrator
|
|
8
|
+
|
|
9
|
+
The role that plans, delegates, compares evidence, and controls the loop.
|
|
10
|
+
|
|
11
|
+
## Implementer
|
|
12
|
+
|
|
13
|
+
The role that makes scoped code changes.
|
|
14
|
+
|
|
15
|
+
## Verifier
|
|
16
|
+
|
|
17
|
+
The role that evaluates changes using runtime-captured evidence. It has no edit tools.
|
|
18
|
+
|
|
19
|
+
## Critic
|
|
20
|
+
|
|
21
|
+
The role that challenges a plan or patch and identifies risk.
|
|
22
|
+
|
|
23
|
+
## Runtime
|
|
24
|
+
|
|
25
|
+
The local deterministic system that owns state, permissions, command execution, logs, worktrees, approvals, and integration.
|
|
26
|
+
|
|
27
|
+
## Provider Adapter
|
|
28
|
+
|
|
29
|
+
An integration layer that lets TheHood use a model or agent system through a common interface.
|
|
30
|
+
|
|
31
|
+
## MCP Server
|
|
32
|
+
|
|
33
|
+
The server that exposes TheHood runtime tools to Codex and other MCP clients.
|
|
34
|
+
|
|
35
|
+
## Control Surface
|
|
36
|
+
|
|
37
|
+
A user-facing way to trigger or inspect runtime actions. The CLI, MCP server, and macOS app are control surfaces.
|
|
38
|
+
|
|
39
|
+
## Protected Path
|
|
40
|
+
|
|
41
|
+
A file path that requires special approval before modification, such as tests, fixtures, snapshots, or evaluation files.
|
|
42
|
+
|
|
43
|
+
## Evidence
|
|
44
|
+
|
|
45
|
+
Runtime-captured material used for decisions, such as diffs, logs, exit codes, and file reads.
|
|
46
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Goal, Loop, Schedule
|
|
2
|
+
|
|
3
|
+
TheHood `v0.1.0-preview.0` is about governed software goals and bounded local loops. It is not yet a scheduling product.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
A goal is a concrete software objective with a verifiable stop condition.
|
|
8
|
+
|
|
9
|
+
Examples:
|
|
10
|
+
|
|
11
|
+
- "Prepare npm preview release metadata and prove package dry-run succeeds."
|
|
12
|
+
- "Add a synthetic stub demo and verify it does not call external providers."
|
|
13
|
+
- "Fix a failing smoke test and capture validation evidence."
|
|
14
|
+
|
|
15
|
+
A good goal includes:
|
|
16
|
+
|
|
17
|
+
- acceptance criteria
|
|
18
|
+
- allowed paths
|
|
19
|
+
- forbidden changes
|
|
20
|
+
- validation commands
|
|
21
|
+
- iteration budget
|
|
22
|
+
- stop condition
|
|
23
|
+
|
|
24
|
+
## Loop
|
|
25
|
+
|
|
26
|
+
A loop is a runtime-owned sequence that keeps advancing a run until a terminal state, manual gate, no progress, or a budget cap.
|
|
27
|
+
|
|
28
|
+
Loops can plan, delegate, capture evidence, verify, revise, and stop. They are local-session workflows. If the local process stops, the run record remains, but TheHood is not a hosted daemon.
|
|
29
|
+
|
|
30
|
+
## Schedule
|
|
31
|
+
|
|
32
|
+
A schedule is a future routine that runs later or repeatedly from a daemon or hosted service.
|
|
33
|
+
|
|
34
|
+
Schedules are not part of `v0.1.0-preview.0`. The preview should not claim cloud routines, timer loops, overnight PR repair, or post-commit automation as current behavior.
|
|
35
|
+
|
|
36
|
+
## Product Boundary
|
|
37
|
+
|
|
38
|
+
For the preview:
|
|
39
|
+
|
|
40
|
+
- `goal` is in scope.
|
|
41
|
+
- `loop` is in scope while the local runtime is active.
|
|
42
|
+
- `schedule` is future work.
|
|
43
|
+
|
|
44
|
+
The CLI goal surface is intentionally thin:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
thehood goal "Prepare release metadata" --repo . --max-iterations 5
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
It creates a normal implementation run and drives the existing headless loop. It does not add timers, background daemons, cloud queues, or new approval semantics.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Known Limitations
|
|
2
|
+
|
|
3
|
+
TheHood `v0.1.0-preview.0` is a developer preview. It is meant to prove a local governed software goal-loop runtime, not the full long-term product.
|
|
4
|
+
|
|
5
|
+
## Not Built Yet
|
|
6
|
+
|
|
7
|
+
- No hosted runtime backend.
|
|
8
|
+
- No cloud routines, cron schedules, or overnight hosted automation.
|
|
9
|
+
- No timer-based `thehood schedule` surface.
|
|
10
|
+
- No full hosted web dashboard.
|
|
11
|
+
- No production OpenAI API adapter.
|
|
12
|
+
- No production Anthropic API adapter.
|
|
13
|
+
- No production local model adapter.
|
|
14
|
+
- No built-in TheHood loop preset marketplace. The preview can recommend local recipe shapes, but it does not yet import or publish third-party loop catalogs as executable runtime presets.
|
|
15
|
+
- No polished macOS menubar app.
|
|
16
|
+
- No automatic native Codex visual rendering beyond explicit agent-board or dashboard artifact payloads.
|
|
17
|
+
|
|
18
|
+
## Experimental Surfaces
|
|
19
|
+
|
|
20
|
+
- ChatGPT Web bridge depends on a user-authenticated browser session and can break when ChatGPT UI behavior changes.
|
|
21
|
+
- ChatGPT MCP connector mode depends on custom connector/tunnel availability in the user's ChatGPT workspace.
|
|
22
|
+
- Local Codex CLI and Claude Code adapters depend on locally installed tools and their own provider access.
|
|
23
|
+
- The optional Codex plugin is an opt-in workflow helper, not a runtime authority.
|
|
24
|
+
|
|
25
|
+
## Operational Limits
|
|
26
|
+
|
|
27
|
+
- The runtime is local-first. If the machine sleeps, network access disappears, or the terminal session stops, local runs can stop.
|
|
28
|
+
- TheHood preserves evidence and artifacts, but users must still review private data before publishing a repo.
|
|
29
|
+
- The deterministic runtime can enforce local gates, but it cannot bypass Codex, ChatGPT, Claude, tenant, GitHub, or npm policy gates.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Licensing
|
|
2
|
+
|
|
3
|
+
TheHood is licensed under the MIT License.
|
|
4
|
+
|
|
5
|
+
## Why MIT
|
|
6
|
+
|
|
7
|
+
MIT is the right fit for TheHood's current public posture:
|
|
8
|
+
|
|
9
|
+
- it is familiar to the JavaScript and developer-tooling ecosystem
|
|
10
|
+
- it is short, permissive, and easy to understand
|
|
11
|
+
- it lowers adoption friction for early users, forks, and experiments
|
|
12
|
+
- it gives the public repo a more approachable signal while the runtime is still young
|
|
13
|
+
|
|
14
|
+
## Tradeoff
|
|
15
|
+
|
|
16
|
+
Apache-2.0 remains a reasonable future option for projects that need an explicit patent grant and more formal contribution posture. TheHood is choosing MIT for reputation, simplicity, and adoption at this stage.
|
|
17
|
+
|
|
18
|
+
## Files
|
|
19
|
+
|
|
20
|
+
- Root license file: `LICENSE`
|
|
21
|
+
- Package metadata: `package.json` uses SPDX id `MIT`
|