Skip to content

Add standalone headless skill command - #1093

Merged
JacobStephens2 merged 9 commits into
mainfrom
issue-965
Oct 25, 2026
Merged

JacobStephens2 merged 9 commits into
mainfrom
issue-965

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

thirdshift skill <skill> [issue <issue>]
  resolve exact Factory/repository name, then Factory shorthand
  create temporary worktree at the checkout's committed HEAD
  link Factory skills; hand over the optional issue
  run one session on the default Harness, Model and Effort
  require terminal completion and a nonblank final message
  print final message; retain local work or remove the worktree

Adds CLI help and manual documentation. Repository skills resolve by directory
name under .agents/skills/ or .claude/skills/; unknown names list available
skills without starting a session. Uncommitted checkout changes stay outside the
session. Standalone skills create no Command record or Session log.

Closes #965.

Evidence

  • Before: the retained a_codex_stream_ending_before_turn_completion_is_not_success
    regression failed: a zero-exit Codex stream without turn.completed printed
    “I will run validation now.” and returned 0 despite unfinished work.
    After: the exact regression passes; partial Muse and OpenCode messages also
    fail with an early-ending cause and empty stdout.
  • The focused checks passed: 168 Harness unit tests, 47 CLI/Harness integration
    tests, and 11 release-summary tests. These cover exact-name/shorthand lookup,
    one-session execution, configured Harness settings, issue handoff, checkout
    isolation, worktree retention/removal, failure causes, and CLI help.
  • CARGO_TARGET_DIR=/home/jacob/repos/thirdshift/target /usr/bin/time -p scripts/affected-tests main
    passed on 29963ff6: 2,366 Rust tests (57 skipped) and 36 browser tests.
    Total wall time: 1,150.34s, including browser checks and 21.76s of incremental
    Rust compilation. Nextest was unavailable, so the selector used cargo test.
  • cargo clippy --all-targets -- -D warnings and cargo fmt --check passed.

Test seams

  • The thirdshift skill CLI with real Git repositories and fake Harness
    executables: skill lookup, prompts/final output, checkout isolation, worktree
    retention, session completion, and failures.
  • Existing CLI help, Harness selection/interpretation, worktree ownership and
    release-summary interfaces provide regression coverage.

Review

  • Standards: one possible Duplicated Code finding, fixed by sharing the
    read-only worktree cleanliness predicate while retaining caller-specific
    ownership checks and Git execution.
  • Spec: two P2 early-ending findings (Codex without a terminal event, and a
    resumed Claude root turn without its next result). Both exact
    regressions failed as reported, remain in the suite, and pass after the fixes.
  • Both reviewers read all 32 changed files, including generated
    site/docs/index.html. No changed file was left unread and no generated output
    was excluded. Standards covered the amendments through 9af4d969; the Spec
    reviewer also inspected the final Claude resume correction in 29963ff6.
    Reports and summary.json are retained with this Session trace.

Unaddressed findings

Standards

None.

Spec

None.

Security

None.

Security review outcome

No unaddressed introduced findings.

Merge Danger

Door: two-way

Blast Radius: CLI

Adds standalone skill execution through the existing Harness adapters. Terminal
completion checks also apply to release summaries; regular Run completion policy
is unchanged. Worktree cleanup shares the existing cleanliness and ownership
checks.

Built with codex codex-cli 0.164.0 · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 marked this pull request as ready for review October 22, 2026 20:16
Lookup follows a committed skill path and skips it when the file or its
skill directory resolves outside the worktree. An outside name no longer
shadows a Factory shorthand or starts a session.
A foreign Issue URL used to create the skill worktree and reach gh
before the command failed. The command now stops on the same Origin
match as a Run, before any work.
Preserve standalone skill execution alongside upstream CLI, Trial and sign-in changes. Adapt skill sessions to the streaming deadline interface and host resource admission, with regression coverage and regenerated documentation.
@JacobStephens2
JacobStephens2 merged commit 3915d2f into main Oct 25, 2026
6 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-965 branch October 25, 2026 18:22
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add thirdshift skill <skill> command

1 participant