Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3847e57
chore(v0.5): roadmap section + ship gh auth token fallback (#281) (#289)
erishforG May 6, 2026
02cb26d
[245] feat(smartlog): skeleton — DAG data model + ASCII tree + JSON o…
erishforG May 13, 2026
66d560b
[303] refactor(errors): adopt 3-line standard (error / caused by / he…
erishforG May 13, 2026
fb68e03
ci(windows): add VS2026 pre-validation job (#307) (#311)
erishforG May 18, 2026
0aa2c0a
feat(completion): hidden __complete subcommand foundation (#291) (#312)
erishforG May 24, 2026
8fb0e07
test(cli): compress / config schema / log --export 통합 테스트 추가 (#315)
erishforG May 24, 2026
757e927
docs(changelog): [Unreleased]에 smartlog·complete·errors·win-ci 항목 추가 …
erishforG May 25, 2026
5bd889a
test(cli): parsec smartlog / sl 통합 테스트 추가 (#318) (#319)
erishforG May 26, 2026
ff122c0
docs(commands): diff·history 모듈 RustDoc 추가 (#321)
erishforG May 27, 2026
9366df5
docs(commands): stack·ci 모듈 RustDoc 추가 (#323)
erishforG May 28, 2026
65b4fd1
feat(health): parsec health Phase 1 — lock/uncommitted/stale check sk…
erishforG May 29, 2026
a991520
test(health): parsec health CLI 통합 테스트 5개 추가 (#324) (#326)
erishforG May 30, 2026
6701447
feat(smartlog): Phase 2 — PR/CI status overlay (#327)
erishforG May 30, 2026
714c34d
feat(completion): Phase 2 — dynamic zsh/bash/fish shell scripts (Refs…
erishforG May 30, 2026
4fb915f
feat(health): Phase 2 — CI status overlay + configurable stale thresh…
erishforG May 31, 2026
d6a96c4
Merge pull request #330 from erishforG/feat/auto-health-phase2
erishforG May 31, 2026
e293878
feat(reviews): Phase 1 — unified PR review table across worktrees (Re…
erishforG Jun 1, 2026
8f408a7
feat(sync): stale-threshold filter, dry-run behind-count, conflict hi…
erishforG Jun 1, 2026
6878de9
feat(smartlog): Phase 3 — worktree filter, ANSI color, stack indicato…
erishforG Jun 2, 2026
2d66eb6
feat(reviews): Phase 2 — --requested flag via GitHub Search API (Refs…
erishforG Jun 3, 2026
e18f90f
feat(conflicts): --simulate flag for line-level speculative merge (Cl…
erishforG Jun 3, 2026
0cfc888
feat(test): parsec test — parallel test runner with tree-hash caching…
erishforG Jun 3, 2026
ba181c2
feat(dashboard): interactive TUI dashboard for worktrees, CI, and PRs…
erishforG Jun 3, 2026
9c1305f
release-prep: bump version + CHANGELOG + README for v0.5.0 (#339)
erishforG Jun 3, 2026
216b1ff
chore: back-merge main into develop (sync for release PR #340) (#341)
erishforG Jun 3, 2026
f51acd8
docs: snapshot versioned docs for v0.5.0 (manual replay of failed rel…
erishforG Jun 3, 2026
61b40da
fix(release): snapshot-docs via PR (peter-evans) instead of direct pu…
erishforG Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Windows-only: bump the binary's main-thread stack to 16 MB.
# Default on Windows (1 MB) overflows after the v0.5 TUI dashboard added
# ratatui + crossterm on top of tokio + reqwest — bitbucket integration tests
# that spawn parsec.exe as a subprocess panicked with "thread 'main' has
# overflowed its stack" on windows-latest runners.
#
# RUST_MIN_STACK only affects Rust-spawned threads, so it can't fix the OS-level
# main-thread stack. The /STACK linker flag does. macOS / Linux already use an
# 8 MB default and are unaffected.
[target.'cfg(windows)']
rustflags = ["-C", "link-arg=/STACK:16777216"]
39 changes: 35 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,35 @@ on:

env:
CARGO_TERM_COLOR: always
# 8 MB main-thread stack — Windows default (1 MB) overflows when ratatui +
# crossterm + tokio + reqwest are linked into the test binary (issue #248
# follow-up: bitbucket integration tests OOM'd on windows-latest after the
# TUI dashboard landed).
RUST_MIN_STACK: "8388608"

jobs:
branch-policy:
name: Branch Policy
if: github.event_name == 'pull_request' && github.base_ref == 'main'
runs-on: ubuntu-latest
steps:
- name: Only develop can merge into main
- name: Only develop or auto-snapshot branches can merge into main
run: |
if [ "${{ github.head_ref }}" != "develop" ]; then
echo "::error::Only the 'develop' branch can be merged into 'main'. Got '${{ github.head_ref }}'."
exit 1
HEAD='${{ github.head_ref }}'
if [ "$HEAD" = "develop" ]; then
echo "OK — develop → main"
exit 0
fi
# release.yml's snapshot-docs job opens PRs from docs/snapshot-vX.Y.Z
# because direct push to protected main is blocked. These are
# data-only changes (docs/v/, docs/versions.json, docs/sitemap.xml).
case "$HEAD" in
docs/snapshot-v*)
echo "OK — auto-snapshot branch (release docs versioning)"
exit 0 ;;
esac
echo "::error::Only 'develop' or 'docs/snapshot-v*' branches can be merged into 'main'. Got '$HEAD'."
exit 1

check:
name: Check
Expand Down Expand Up @@ -96,3 +112,18 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo install cargo-audit --locked
- run: cargo audit

# Pre-validation for GitHub Actions Windows runner migration to VS 2026
# (windows-latest / windows-2025 labels move to VS2026 default between
# 2026-06-08 and 2026-06-15). Informational until migration completes.
# Tracked in issue #307 — remove after migration window closes.
windows-vs2026-prevalidation:
name: Windows VS2026 Pre-Validation
runs-on: windows-2025-vs2026
continue-on-error: true
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo build --release
- run: cargo test
32 changes: 25 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
Expand Down Expand Up @@ -162,10 +163,27 @@ jobs:
sed -i '/<\/urlset>/i \
<url>\n <loc>https://erishforg.github.io/git-parsec/v/'"${VERSION}"'/</loc>\n <lastmod>'"${DATE}"'</lastmod>\n <changefreq>never</changefreq>\n <priority>0.3</priority>\n </url>\n <url>\n <loc>https://erishforg.github.io/git-parsec/v/'"${VERSION}"'/guide/</loc>\n <lastmod>'"${DATE}"'</lastmod>\n <changefreq>never</changefreq>\n <priority>0.3</priority>\n </url>\n <url>\n <loc>https://erishforg.github.io/git-parsec/v/'"${VERSION}"'/reference/</loc>\n <lastmod>'"${DATE}"'</lastmod>\n <changefreq>never</changefreq>\n <priority>0.3</priority>\n </url>' docs/sitemap.xml

- name: Commit and push versioned docs
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/v/ docs/versions.json docs/sitemap.xml
git commit -m "docs: snapshot versioned docs for v${VERSION}"
git push origin main
- name: Open snapshot PR (main is protected — push direct is blocked)
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
base: main
branch: docs/snapshot-v${{ needs.release.outputs.version }}
commit-message: "docs: snapshot versioned docs for v${{ needs.release.outputs.version }}"
title: "docs: snapshot versioned docs for v${{ needs.release.outputs.version }}"
body: |
Automated docs snapshot for **v${{ needs.release.outputs.version }}** (release run #${{ github.run_id }}).

Produced by `.github/workflows/release.yml` → `snapshot-docs` job.

## Files
- `docs/v/${{ needs.release.outputs.version }}/{index,guide/index,reference/index}.html` — versioned docs (with `noindex` meta)
- `docs/versions.json` — `latest` bump + history entry
- `docs/sitemap.xml` — versioned URLs added

Safe to merge. No code change, only doc data.
labels: |
release
auto-snapshot
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
delete-branch: true
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.0] - 2026-06-03 — _The visualization release_

v0.5 마일스톤 **16/16 완료**. Polish & Power-User UX: 워크트리/PR/CI를 하나의
시야에 모아주는 시각화·자동화 명령 6개 신규.

### Added
- **`parsec smartlog` (alias `sl`)** — 모든 활성 워크트리를 commit DAG로 시각화.
ASCII 트리가 base branch별로 워크트리를 묶고 merge-base 이후 커밋을 표시.
Phase 2 PR/CI status overlay (`#327`), Phase 3 worktree filter + ANSI 색상 +
stack indicator (`#333`). `--json` 출력 지원. (`#245`, `#305`, `#318`, `#319`)
- **`parsec dashboard` (alias `dash`)** — 실시간 터미널 TUI 대시보드. 워크트리 /
CI 상태 / GitHub PR을 3-pane 레이아웃으로 한 화면에. ratatui + crossterm 기반,
키바인딩 `q` (종료) / `r` (즉시 새로고침) / `?` (도움말), `--refresh N` 인터벌,
`--no-overlay` 오프라인 모드. (`#248`, `#337`)
- **`parsec test`** — 워크트리 병렬 테스트 러너 + tree-hash 결과 캐싱.
`--all`로 모든 활성 워크트리 일괄 실행, `--jobs N` 병렬, `--cache`로 동일 tree
재실행 시 즉시 스킵. `[test]` 설정 섹션(`command`, `jobs`, `cache`). 인간/JSON
출력. (`#247`, `#336`)
- **`parsec health`** — 모든 활성 워크트리 헬스 체크. Phase 1: lock(`.git/index.lock`)
· uncommitted 파일 수 · stale(7일 초과) 검사 (`#324`, `#325`). Phase 2: CI 상태
overlay + configurable stale threshold (`#330`). CLI 통합 테스트 5개 (`#326`).
- **`parsec reviews`** — 워크트리별 받은/요청한 PR 리뷰를 한 표로. Phase 1 (`#301`,
`#331`) + Phase 2 `--requested` (GitHub Search API) (`#334`).
- **`parsec conflicts --simulate`** — 기존 filename overlap 휴리스틱을 보완하는
line-level 충돌 시뮬레이션. `git merge-tree --write-tree`로 워크트리 vs base +
워크트리 페어 cross-simulate 두 패스. 머지 전 실제 충돌 파일을 read-only로 노출.
(`#246`, `#335`)
- **`parsec commit`** — AI 커밋 메시지 생성 (OpenAI / Anthropic). staged diff 분석
후 자동 prefix + Conventional Commits 포맷(`--conventional`). 수동 메시지
override(`--message`). (`#274`)
- **`parsec sync`** — auto-sync `main`/`develop` into stale worktrees (rebase 또는
merge 전략, `--all` 일괄, `--dry-run` behind 카운트, conflict hint). (`#290`)
- **AI-generated PR descriptions** — `parsec ship`이 OpenAI / Anthropic / Ollama
공급자로 PR 본문 자동 작성. `[ai]` 설정. (`#242`, `#275`)
- **`parsec __complete` shell-completion 헬퍼** — 숨김 subcommand가 워크트리 / branch
완성 후보를 newline-separated로 출력. zsh / bash / fish 동적 탭 완성 지원
(`#291`, `#312`). Phase 2 dynamic 쉘 스크립트 (`#328`).
- **`parsec agent` mode (PARSEC_AGENT=1)** — non-interactive JSON 출력 모드, AI
에이전트 호출용. (`#272`)

### Changed
- **Error messages standardized to 3-line format** — 모든 사용자 대상 에러가
`error: <summary> / caused by: <root cause> / help: <action>` 포맷으로 통일
(`#303`, `#306`).

### Fixed
- `parsec ship` falls back to `gh auth token` when `PARSEC_GITHUB_TOKEN` /
`GITHUB_TOKEN` / `GH_TOKEN` env vars are absent — parity with `parsec doctor`
and the tracker layer. GitHub host에만 한정해 Bitbucket / GitLab remote는 영향
없음 (`#281`).

### CI
- Windows VS2026 (Visual Studio 2026 runner) pre-validation 잡 — MSVC toolchain
회귀 사전 차단 (`#307`, `#311`).
- `parsec test`의 shell invocation을 cross-platform화 (sh -c / cmd /C),
Windows test가 WSL을 호출하지 않도록 수정.

### Docs
- 모듈별 RustDoc 보강 — `diff` / `history` (`#321`), `stack` / `ci` (`#323`).
- CHANGELOG `[Unreleased]` 섹션 누락 항목 보완 (smartlog / complete / errors /
win-ci) (`#316`, `#317`).

### Tests
- CLI 통합 테스트 대폭 추가 — `compress` / `config schema` / `log --export`
(`#314`, `#315`), `smartlog` / `sl` (`#318`, `#319`), `health` (`#324`, `#326`),
`parsec test` (5 신규), `parsec dashboard` (4 신규), `conflicts --simulate`
(4 신규).

## [0.4.0] - 2026-05-04

### Added
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "git-parsec"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
authors = ["erishforG"]
description = "Git worktree lifecycle manager — ticket to PR in one command. Parallel AI agent workflows with Jira & GitHub Issues integration."
Expand Down Expand Up @@ -35,6 +35,8 @@ clap_mangen = "0.3"
clap_complete = "4"
dunce = "1"
uuid = { version = "1", features = ["v4"] }
ratatui = "0.28"
crossterm = "0.28"

[dev-dependencies]
assert_cmd = "2"
Expand Down
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ That's the whole loop. Plain `git worktree` doesn't track state, doesn't talk to

---

## Roadmap

> **Vision**: parsec = AI agents + human devs both — worktree-native git CLI.

| Milestone | Status | Theme |
|---|---|---|
| **v0.4.0** | ✅ Released (2026-05-04) | Multi-forge + multi-tracker foundation (GitHub / GitLab / Bitbucket; Jira / Linear) |
| **v0.5.0** — _The visualization release_ | ✅ Released (2026-06-03) | smartlog · TUI dashboard · speculative merge · `parsec test` · health · reviews · AI PR descriptions |
| **v1.0** — _AI-Native Standard_ | 🚧 Next | MCP server signature — Claude / Cursor / Copilot invoke parsec as a first-class tool |
| **v2.0+** — _Ecosystem Hub_ | 🔮 | Plugins · VS Code extension · Linear-native tracker · org-scale workflows |

v1.0 work is tracked under the [`v1.0` milestone](https://github.com/erishforG/git-parsec/milestone/4); see the [CHANGELOG](./CHANGELOG.md) for the full v0.5.0 release notes.

---

## Install

```bash
Expand All @@ -42,6 +57,23 @@ cargo install git-parsec

Other targets (macOS arm64/x86_64, Windows x86_64) ship on every release — see [Releases](https://github.com/erishforG/git-parsec/releases). After install, run `parsec config init` for the interactive first-time setup, then `parsec doctor` to validate.

### Shell completion

`parsec` ships dynamic completion scripts that suggest **live worktrees and branches** as you type (e.g. `parsec switch <Tab>` lists your active tickets).

```bash
# zsh — copy to a site fpath dir, or add the repo path to fpath:
cp completions/_parsec ~/.zsh/completions/ # then: fpath=(~/.zsh/completions $fpath)

# bash:
source completions/parsec.bash # or symlink into /etc/bash_completion.d/

# fish:
cp completions/parsec.fish ~/.config/fish/completions/
```

A purely static fallback (no live candidates) is also available via `parsec config completions <shell>` if you'd rather not source the dynamic scripts.

---

## 60-second tour
Expand Down Expand Up @@ -108,7 +140,17 @@ Every command has `--json`. Errors emit structured codes (E001…E013). `parsec
### 📋 Sprint board + issue creation
`parsec board` turns your active sprint into a Kanban board in the terminal. `parsec create` and `parsec new-issue` open issues in your tracker without leaving the shell.

> 27 commands total — see the [full command reference](https://erishforg.github.io/git-parsec/reference/) for every flag and example.
### 🌌 Visualization & power-user tools _(new in v0.5)_
- **`parsec smartlog`** (alias `sl`) — ASCII commit DAG of every active worktree with PR / CI overlay.
- **`parsec dashboard`** (alias `dash`) — real-time TUI panel showing worktrees, CI, and PRs in one screen (ratatui + crossterm).
- **`parsec health`** — lock / uncommitted / stale / CI checks across every worktree, with a configurable stale threshold.
- **`parsec reviews`** — open PR reviews you've received vs. requested, unified across worktrees.
- **`parsec conflicts --simulate`** — in-memory three-way merge to surface real *line-level* conflicts before you push (worktree-vs-base + cross-worktree pairs, read-only).
- **`parsec test`** — run tests in parallel across worktrees with tree-hash result caching (`--all --jobs N --cache`).
- **`parsec commit`** — AI-generated commit messages from staged diff (OpenAI / Anthropic, `--conventional` for Conventional Commits).
- **`parsec sync`** — fast-forward stale worktrees against `origin/<base>` (rebase or merge, `--all`, `--dry-run`).

> 33+ commands total — see the [full command reference](https://erishforg.github.io/git-parsec/reference/) for every flag and example.

Each PR body includes a stack navigation table:

Expand Down
111 changes: 111 additions & 0 deletions completions/_parsec
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#compdef parsec
# zsh completion for git-parsec — dynamic worktree/branch candidates.
#
# Issue #291 Phase 2. Source this file from ~/.zshrc:
#
# fpath=(/path/to/git-parsec/completions $fpath)
# autoload -U compinit && compinit
#
# Or run once to install into a site fpath dir:
#
# cp completions/_parsec /usr/local/share/zsh/site-functions/
#
# Companion to the static structure emitted by `parsec config completions zsh`;
# this file replaces it with dynamic completion that calls
# `parsec __complete worktrees|branches` for ticket and branch arguments.

# -- Dynamic candidate fetchers ------------------------------------------------
_parsec_worktrees() {
local -a tickets
tickets=("${(@f)$(parsec __complete worktrees 2>/dev/null)}")
_describe -t tickets 'parsec worktree' tickets
}

_parsec_branches() {
local -a branches
branches=("${(@f)$(parsec __complete branches 2>/dev/null)}")
_describe -t branches 'git branch' branches
}

# -- Top-level subcommand list -------------------------------------------------
_parsec_subcommands() {
local -a subs
subs=(
'start:Create new worktree for ticket'
'switch:Print path to a worktree'
'ship:Open or update PR for current worktree'
'open:Open ticket/PR in browser'
'list:List all active worktrees'
'status:Show ticket status'
'ticket:Show current ticket'
'clean:Remove merged worktree'
'pr-status:Show PR status'
'ci:Show CI status'
'merge:Merge one or more PRs'
'diff:Diff against base'
'sync:Rebase/merge from base'
'log:Audit log of recent ops'
'compress:Squash worktree commits'
'rename:Rename a ticket'
'adopt:Adopt existing branch as ticket'
'smartlog:Visualize worktrees as DAG'
'sl:Alias of smartlog'
'config:Configuration commands'
'doctor:Diagnose environment'
'health:Check worktree health'
'conflicts:Detect file overlap'
'history:Show command history'
'stack:Stack-aware operations'
'release:Cut a release'
)
_describe -t commands 'parsec subcommand' subs
}

# -- Main dispatcher -----------------------------------------------------------
_parsec() {
local context state state_descr line
typeset -A opt_args

_arguments -C \
'1: :_parsec_subcommands' \
'*::arg:->args' \
'--json[Emit JSON output]' \
'--quiet[Suppress output]'

case $state in
(args)
case $line[1] in
start)
_arguments \
'1:ticket:_parsec_worktrees' \
'--base[Base branch]:branch:_parsec_branches' \
'--on[Stack on ticket]:ticket:_parsec_worktrees' \
'--branch[Use existing branch]:branch:_parsec_branches' \
'--title[Title for PR]:title:'
;;
switch|ship|open|clean|status|ticket|pr-status|diff|sync|compress|log|adopt)
_arguments '1:ticket:_parsec_worktrees'
;;
merge|ci)
_arguments '*:ticket:_parsec_worktrees'
;;
rename)
_arguments \
'1:old-ticket:_parsec_worktrees' \
'2:new-ticket:'
;;
smartlog|sl)
_arguments \
'--depth[Max commits per worktree]:n:' \
'--no-overlay[Skip GitHub PR/CI lookup]'
;;
*)
# Defer to default file completion for unknown commands.
_default
;;
esac
;;
esac
}

_parsec "$@"
Loading
Loading