Skip to content

Releases: jorge-aranda/doscode

Serial bring-up & DOSBox workflow 📟

Choose a tag to compare

@jorge-aranda jorge-aranda released this 18 May 21:52
cab8d01

DOSCODE 0.1.0 — Serial bring-up & DOSBox workflow 📟

Second release of DOSCODE. This version focuses on getting the DOS
client to actually talk
to the Python proxy over COM1, stabilizing the
serial protocol under QuickBasic 4.5, and documenting a reproducible
workflow with DOSBox + socat.

Architecture:
MS-DOS client ⇄ plain-text serial ⇄ Python proxy ⇄ HTTPS ⇄ LLM provider

✨ Highlights

  • 🔌 Reliable serial in QuickBasic 4.5: byte-by-byte reads, PROMPT sent
    with explicit CRLF, and robust detection of the END marker.
  • 🛠️ Safe RUN: confirmation prompt before executing any command and
    support for inline <RUN>...</RUN>, with control returning to the user
    after execution.
  • 🖥️ Documented DOSBox workflow: nullmodem TCP ↔ PTY via socat, plus
    monitoring and symlink helper scripts for the mounted DOSBox folder.
  • 🧠 More usable proxy: valid default models, fixed Claude auth header,
    and LLM line logging to stderr.
  • 📚 Instruction bridges for AI agents: Cursor, Windsurf, Aider, Devin,
    OpenHands, Amazon Q, GitHub Copilot, Gemini, Claude, Junie…

🖥️ DOS client (client/)

  • serial.bas: byte-by-byte reads with CR/LF trimming, reliable END
    detection, and better COM1 error handling.
  • doscode.bas: byte-by-byte PROMPT send with explicit CRLF, improved
    status bar, and a sensible default model.
  • parser.bas: support for inline <RUN>...</RUN>, confirmation prompt
    before execution, and TurnDone bridges that return control to the user
    after RUN.
  • files.bas / ui.bas: cleanup and QB4.5 compatibility improvements.
  • BUILD.BAT, RUN.BAT, DOSCODE.MAK: build and CRLF adjustments.

🐍 Python proxy (proxy/)

  • llm.py: valid default model names for the different backends and a fix
    for Claude's authentication header.
  • server.py: LLM line logging to stderr to help debug the stream.

🧰 Scripts and tooling (scripts/)

  • scripts/monitor_serial.sh: socat -v tap that bridges
    TCP-LISTEN:2323 ↔ /tmp/pty_proxy and prints every byte in each
    direction, labelled [proxy->dos] / [dos->proxy], with per-direction
    log files.
  • scripts/link_dosbox_project.sh: creates symlinks from the DOSBox-mounted
    directory back to client/, avoiding manual copies while editing.

📚 Documentation

  • docs/build.md: validated setup using DOSBox nullmodem + socat
    PTY/TCP, plus a new section on the proxy's environment variables
    (API keys).
  • docs/scripts.md (new): full guide for monitor_serial.sh and
    link_dosbox_project.sh, including the recommended DOSBox workflow.
  • AGENTS.md: explicit rules for MS-DOS files (ASCII, CRLF, Ctrl+Z
    EOF, avoiding CONST / COMMON SHARED / ON ERROR GOTO).
  • Bridges to several agents/IDEs: .cursorrules, .cursor/rules/,
    .windsurfrules, .openhands/microagents/, .amazonq/rules,
    .github/copilot-instructions.md, CLAUDE.md, GEMINI.md, DEVIN.md,
    CONVENTIONS.md, .junie/guidelines.md.
  • .gitattributes: line-ending normalization (CRLF for DOS client files,
    LF for everything else).

✅ What works end-to-end in 0.1.0

  • DOSBox boots the DOS client, opens COM1 against the PTY exposed by
    socat, sends PROMPT to the proxy, and receives streamed LINE ...
    responses until END.
  • The user can confirm or cancel RUN actions before they execute.
  • After a RUN, control always returns to the user prompt.

🛣️ Next milestones (not included in this release)

  • Richer chat history and diff navigation.
  • Undo state.
  • File browser navigation.
  • Automated application of multi-line <WRITE> blocks.

📦 Main changes (19 commits)

  • fix(build): CRLF fixes and COM1 error handling.
  • fix(client): QB4.5 compatibility, byte-by-byte reads, PROMPT with
    CRLF, reliable END detection, control return after RUN.
  • feat(client): RUN confirmation and inline <RUN>...</RUN> support.
  • feat(proxy): LLM line logging to stderr.
  • fix(proxy): valid default models and Claude auth header fix.
  • feat(scripts) + docs(scripts): monitor_serial.sh,
    link_dosbox_project.sh and their documentation.
  • docs(build): validated socat PTY+TCP / DOSBox nullmodem setup and
    guide to proxy environment variables.
  • docs(agents): rules for MS-DOS files and bridges for Cursor, Windsurf,
    Aider, Devin, OpenHands, Amazon Q and others.

🔧 Requirements

  • DOS: QuickBasic 4.5 (BC.EXE, LINK.EXE) — see docs/build.md.
  • Host: Python 3 with proxy/requirements.txt, socat for the PTY↔TCP
    bridge, and (optionally) DOSBox / DOSBox Staging.

Full changelog: 0.0.0...0.1.0

Initial commit

Choose a tag to compare

@jorge-aranda jorge-aranda released this 18 May 21:45
85e9acd

DOSCODE 0.0.0 — Initial release 🕹️

First public snapshot of DOSCODE, a retro AI coding agent for real DOS
machines (MS-DOS, FreeDOS, DOSBox, 8086/286/386/486/Pentium-era hardware) that
talks to modern LLMs through a serial cable and a Python proxy.

Architecture:
MS-DOS client ⇄ plain-text serial ⇄ Python proxy ⇄ HTTPS ⇄ LLM provider

✨ Highlights

  • Retro 80×25 text UI (SCREEN 0, CP437 boxes, ANSI-era colors).
  • Plain-text serial protocol between the DOS client and the modern proxy — no
    TLS, no heavy JSON on the DOS side.
  • Python 3 proxy with support for multiple LLM providers and progressive
    line-by-line streaming back to DOS.

🖥️ DOS client (client/)

Written in QuickBasic 4.5-compatible BASIC.

  • TUI with fixed input line at the bottom and streamed chat area above.
  • Serial I/O over COM1 / COM2 (serial.bas).
  • Local commands: /read, /run, /model, /clear, /help, /exit.
  • File read/write helpers (files.bas).
  • Parser hooks for <READ>, <WRITE> and <RUN> tool actions (parser.bas).
  • Confirmation prompt before executing any RUN action.
  • Build helpers: BUILD.BAT, RUN.BAT.

🐍 Python proxy (proxy/)

  • Serial transport via pyserial, plus stdio mode for local development.
  • Plain-text line protocol (protocol.py) matching the DOS client.
  • LLM backends (llm.py):
    • OpenAI-compatible chat completions
    • Claude Messages API
    • OpenRouter
    • Ollama
  • Progressive LINE ... streaming to the DOS side.
  • Launch helpers: run_proxy.sh, RUN_PROXY.BAT, requirements.txt.

📚 Documentation

  • README.md — project overview, architecture and MVP scope.
  • docs/build.md — QuickBasic 4.5 build notes and DOSBox setup.
  • docs/protocol.md — serial wire protocol reference.
  • AGENTS.md — contribution rules for AI agents working on the repo.
  • LICENSE — project license.

✅ MVP scope covered in 0.0.0

  • Opens the DOS TUI and draws the retro 80×25 frame.
  • Connects to COM1 and sends prompts to the proxy.
  • Receives streamed LINE ... responses and renders them progressively.
  • Supports the full set of local slash commands listed above.
  • Includes tool-action parser hooks with confirmation for RUN.

🛣️ Next milestones (not in this release)

  • Richer chat history and diff navigation.
  • Undo state.
  • File browser navigation.
  • Fully automated multi-line <WRITE> application.

📦 Contents

Initial commit 85e9acd — 19 files, ~1369 lines:

  • client/: doscode.bas, ui.bas, serial.bas, parser.bas, files.bas,
    BUILD.BAT, RUN.BAT
  • proxy/: server.py, llm.py, protocol.py, requirements.txt,
    run_proxy.sh, RUN_PROXY.BAT
  • docs/: build.md, protocol.md
  • Root: README.md, AGENTS.md, LICENSE, .gitignore

🔧 Requirements

  • DOS side: QuickBasic 4.5 tools (BC.EXE, LINK.EXE) — not bundled.
    See docs/build.md.
  • Modern side: Python 3 with the dependencies listed in
    proxy/requirements.txt.

Full changelog: initial commit (85e9acd) — there is no previous tag to
compare against.