Skip to content

Feature: support PowerShell as a runtime target and a Windows platform for the CLI #332

Open

Description

@barbatdev

Context

Cortex today installs capabilities into three runtimes (Pi, OpenCode, Claude Code) and ships binaries for darwin_arm64 and linux_amd64. Two related gaps block a whole class of agents:

  1. Runtime target. PowerShell-based agent surfaces cannot receive skills/actors: there is no projection, no runtime-compatibility policy, and no QA backend binding for them. Add a Hermes Agent runtime target for skill and QA actor installs #303 (Hermes Agent runtime target) establishes the pattern this would follow.
  2. Platform. The CLI has no Windows support: no releases, unverified path/mode semantics (canonical file modes, shadow-root validation, install state), and runtime probes designed around POSIX.

Desired outcome

Two phases, each independently valuable:

  • Phase A — PowerShell runtime target. A capability projection for a PowerShell runtime (where skills/actors land, what the install plan looks like), runtime-compatibility admission, and a QA route/backend binding — following the runtime-target precedent of Add a Hermes Agent runtime target for skill and QA actor installs #303 and the QA binding contract used for pi/claude/opencode.
  • Phase B — Windows platform. Release binaries for windows_amd64, verified install/update/uninstall semantics on Windows (path canonicality, file modes, backup/state layout), and runtime probes validated on PowerShell.

Scope and sequencing

  • Phase A does not require Phase B; a PowerShell target can land while the CLI remains POSIX-only.
  • Each phase needs its own scoped plan and readiness gate before implementation (roadmap policy: new directions become milestones only through a maintainer-approved revision appended to the index Roadmap ODD index for Cortex #288).

Non-goals

  • No promise of dates or versions (roadmap rule).
  • No QA lifecycle changes beyond the backend binding each phase needs.

Refs #78 #303

Activity

  1. barbatdev commented on Oct 19, 2026

    @barbatdev
    ContributorAuthor

    Maintainer-approved scoped plan for both phases: docs/design/issue-332-powershell-windows.md (branch design/issue-332-powershell). Roadmap index revision appended in #288 (comment); milestones created: PowerShell runtime target (milestone 4), Windows platform (milestone 5). Work-unit issues are created only when each phase's readiness gate resolves — Phase A needs destination evidence and the open decisions in the plan resolved; Phase B needs a real Windows verification environment and the mode/backup semantics design.

  2. barbatdev commented on Oct 19, 2026

    @barbatdev
    ContributorAuthor

    Phase A readiness gate resolved (maintainer decision, 2026-10-19): the target is a directory projection mode (cortex install --target-dir <path>), not a new runtime family.

    Evidence and rationale in the revised scoped plan (docs/design/issue-332-powershell-windows.md, Phase A revision v2, merged to main):

    • Surface research found no dominant PowerShell-native agent runtime with its own skills directory (AIShell archived since January 2026); agents on Windows reuse the same destinations as their POSIX RuntimeIDs.
    • The open consumption contract is the Agent Skills specification (agentskills.io / Microsoft Agent Framework): a directory of SKILL.md files with compatible frontmatter; Cortex's projection (metadata.cortex-*) passes through.
    • QA actors render as skills (self-contained, proven by the TARS vendoring); no QA backend binding is added.
    • The directory target is OS-agnostic and lands on POSIX first; it is the install-mode prerequisite for Phase B (Windows platform).

    Milestone "PowerShell runtime target" (milestone 4) keeps its outcome name with this revised scope. Work-unit issues for the directory mode follow.

  3. barbatdev commented on Oct 23, 2026

    @barbatdev
    ContributorAuthor

    I ran a targeted Windows compatibility check against main. Evidence supporting the Phase B scope, all verifiable on main today:

    Build blocker (tracked in #370). internal/filetxn/directories.go:258 and internal/filetxn/restart.go:406 type-assert info.Sys().(*syscall.Stat_t), which does not compile on Windows. docs/verification.md:16 already states Windows "does not currently build".

    CI has no Windows coverage. .github/workflows/ci.yml and pr-validation.yml run only on ubuntu-latest. There is no windows-latest job, so Windows behavior of filetxn and atomicfile is unverified on every commit.

    Release targets. Published prereleases are darwin_arm64 and linux_amd64 only (README.md install instructions, docs/verification.md); no windows_amd64 archive exists.

    Existing Windows-awareness worth preserving. internal/atomicfile/create.go already branches on GOOS for mode checks (rootedCreateModeOK treats the Windows mode comparison as write-bit only), and internal/qapi/runner.go:96 has a runtime.GOOS == "windows" branch. The atomic-file layer is closer to Windows-ready than the filetxn layer.

    Suggested readiness inputs for the Phase B gate. (1) A windows-latest CI job running go build ./... and go vet ./... would catch compile regressions like #370 early, even before full verification exists. (2) The mode/backup semantics design the gate already requires. The dominant gate condition (a real Windows verification environment) remains unchanged.

    Refs #370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions