Phase 0: scaffold tree + manifest
- README, .gitignore, CLAUDE.md (project conventions) - docs/PHASE0.md — full Phase 0 manifest (locked substrate) - 10 root .lua modules + 4 ffi/ bindings, all stubs raising NotImplemented with module-scoped responsibilities matching the manifest - config.lua wired to current dirac/hossenfelder endpoints (qwen-coder-7b snappy/32k + cloud via OpenRouter through hossenfelder) File names match docs/PHASE0.md §4 exactly. Module bodies fill in across later phases; the tree shape is locked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
-- executor.lua — command execution.
|
||||
-- Phase 0: io.popen with stderr merge. PTY (forkpty) lands in Phase 1.
|
||||
-- `cd` is intercepted before popen and routed through libc chdir so the
|
||||
-- working directory persists across calls. See docs/PHASE0.md §7.
|
||||
|
||||
local M = {}
|
||||
|
||||
-- Execute a shell command.
|
||||
-- Returns: (output_string, exit_code).
|
||||
function M.exec(cmd)
|
||||
error("executor.exec: not implemented (Phase 0 pending)")
|
||||
end
|
||||
|
||||
-- Intercept and apply `cd <path>` (or bare `cd` -> $HOME) without forking.
|
||||
function M.maybe_chdir(cmd)
|
||||
error("executor.maybe_chdir: not implemented (Phase 0 pending)")
|
||||
end
|
||||
|
||||
-- Extract `CMD: ...` lines from an assistant response per the broker
|
||||
-- contract (PHASE0.md §6 system prompt).
|
||||
function M.extract_cmd_lines(text)
|
||||
error("executor.extract_cmd_lines: not implemented (Phase 0 pending)")
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user