Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
673a606
test(cli): Add Bubble Tea TUI state tests
andkirby Mar 12, 2026
80d0879
feat(DEVPT-001): Add multi-service batch commands with glob patterns …
andkirby Mar 12, 2026
667c874
feat(DEVPT-002): Add viewport mouse navigation and highlight cycling
andkirby Mar 17, 2026
18edc71
fix: invalidate table content hash when returning from logs to table …
andkirby Mar 26, 2026
467cbd0
fix: add cloudflared to dev process patterns
andkirby Mar 26, 2026
808b932
fix: never filter out processes belonging to managed services
andkirby Mar 26, 2026
fb2bedb
chore: update dependencies
andkirby Mar 26, 2026
8d4232b
fix: cherry-pick command/search mode input fix from origin/main
andkirby Mar 26, 2026
288820c
feat(UI): show inactive section selection in gray, active in purple
andkirby Mar 27, 2026
35eae29
refactor(cli): extract tui into subpackage, upgraded bubbles to v2.1
andkirby Mar 27, 2026
f72e3c1
fix(tui): stop ui corruption and repair mouse selection
andkirby Mar 27, 2026
63a64aa
fix(tui): stabilize process mapping and split table scrolling
andkirby Mar 27, 2026
0a4a478
feat(tui): add confirm modal overlay interactions
andkirby Mar 27, 2026
54a44d5
refactor(tui): consolidate modal help flow
andkirby Mar 27, 2026
5b09d53
refactor(tui): simplify table chrome
andkirby Mar 27, 2026
8ded121
fix(tui): restore enter actions and inline filter ux
andkirby Mar 27, 2026
953f0e2
feat(tui): use bubbles text input for filter
andkirby Mar 27, 2026
251e644
refactor(tui): polish table headers and filter chrome
andkirby Mar 27, 2026
c03c389
fix(tui): separate logs header and size viewport correctly
andkirby Mar 27, 2026
bd72e7a
fix(tui): remove stale table layout offsets
andkirby Mar 27, 2026
540cf9e
refactor(tui): simplify main header copy
andkirby Mar 27, 2026
49129ea
docs: tighten README and quickstart
andkirby Mar 27, 2026
2f930dc
Merge remote-tracking branch 'origin/main'
andkirby Mar 27, 2026
0c48a04
feat: bump version to 0.2.0
andkirby Mar 27, 2026
a0fa653
docs: add 0.2.0 changelog
andkirby Mar 27, 2026
4077e07
Add cross-platform release workflow for Linux/macOS/Windows
andkirby Mar 28, 2026
3c72878
feat(tui): add sorting controls for table view (DEVPT-003)
andkirby Mar 28, 2026
d87d2c5
Add devpt-release skill for changelog version bumps and commit grouping
andkirby Mar 28, 2026
7e1b1d8
Release 0.2.1
andkirby Mar 28, 2026
ec07f7c
Fix cross-platform build: separate Unix and Windows process control
andkirby Mar 28, 2026
4d8eee9
chore: bump version to 0.2.1
andkirby Mar 28, 2026
23a8a1c
chore: add lefthook pre-push validation and set-version script
andkirby Mar 28, 2026
f292126
fix: tolerate ErrNeedSudo in test cleanup
andkirby Mar 28, 2026
0c2a5f9
feat(DEVPT-003): Add Shift+S sort direction toggle
andkirby Mar 28, 2026
c376f11
fix(cli): validate managed service PID matches before binding or acting
andkirby Mar 29, 2026
0631768
docs: update changelog for 0.2.2
andkirby Mar 29, 2026
2fbce65
chore: bump version to 0.2.2
andkirby Mar 29, 2026
b1c4d11
Merge owner/main into codex/merge-owner-main
andkirby Mar 29, 2026
d954a56
feat(DEVPT-004): add managed split view to show status of process in …
andkirby Apr 2, 2026
f930305
docs: update changelog for 0.3.0
andkirby Apr 2, 2026
d23c2e2
chore: bump version to 0.3.0
andkirby Apr 2, 2026
d8e2494
feat(DEVPT-007): group management via namespace-based process clustering
andkirby Apr 3, 2026
a67bc42
feat(tui): add service metadata to managed details pane
andkirby Apr 3, 2026
84a859b
fix: ^C cancels command mode; independent managed list/details scrolling
andkirby Apr 4, 2026
2fecd27
feat(DEVPT-001): Add wildcard pattern support to status command
andkirby Apr 9, 2026
1b2e963
feat(DEVPT-008): Add OSC 8 clickable hyperlinks to TUI
andkirby Apr 9, 2026
94be775
test(DEVPT-002): Add regression test for command column truncation
andkirby Apr 9, 2026
e1969ea
style(tui): Align struct fields and fix formatting
andkirby Apr 9, 2026
49ab183
style(scanner, health): Standardize indentation
andkirby Apr 9, 2026
5f0d251
chore: Add Claude settings to gitignore
andkirby Apr 9, 2026
2559723
fix(DEVPT-007): Skip leading non-alphanumeric chars in namespace extr…
andkirby Apr 9, 2026
6714569
fix(DEVPT-007): Include leading underscore in namespace for grouping
andkirby Apr 9, 2026
0a161ae
docs: update changelog for 0.4.0
andkirby Apr 14, 2026
84d43fa
chore: bump version to 0.4.0
andkirby Apr 14, 2026
f5f734a
fix(scanner): Add friendly prereq check for lsof
andkirby Apr 14, 2026
90441b5
DEVPT-006 TASK-1: Delete dead code — BatchResult, FormatBatch*, comma…
andkirby Apr 14, 2026
5e89717
DEVPT-006 TASK-2/3/4: Extract display.go, process_ops.go, batch_execu…
andkirby Apr 14, 2026
b8084f7
DEVPT-006 TASK-5: Slim commands.go to thin orchestration (200 lines);…
andkirby Apr 14, 2026
3ce84f6
DEVPT-006 TASK-6: Rename TUI AppDeps interface methods to domain name…
andkirby Apr 14, 2026
a71d398
feat(DEVPT-009): Align process lifecycle with behavioral contract
andkirby Apr 15, 2026
f028e52
refactor(DEVPT-010): reduce tui render-path recomputation
andkirby Apr 15, 2026
a77da73
fix(DEVPT-011): add /proc/net/tcp fallback for Linux non-root users
andkirby Apr 20, 2026
5df2f89
chore: update CHANGELOG for 0.4.1
andkirby Apr 20, 2026
6103360
chore: bump version to 0.4.1
andkirby Apr 20, 2026
afa85bb
fix(DEVPT-011): fix Windows cross-compilation of lock.go
andkirby Apr 20, 2026
234eccc
fix(tui): Route managed details pane clicks to dedicated region handler
andkirby Apr 29, 2026
8dac593
refactor(tui): clean up table.go code review findings
andkirby Apr 29, 2026
80c4f58
fix(DEVPT-005): resolve code drift across pkg packages
andkirby Apr 29, 2026
dd1dc02
fix(DEVPT-013): skip port-uniquely-owned processes in ambiguity check
andkirby May 2, 2026
29b3ead
test(DEVPT-013): add ambiguity guard clause coverage
andkirby May 2, 2026
acbcdb7
fix(DEVPT-014): increase default port-bound readiness timeout to 20s
andkirby May 3, 2026
f3b07a5
chore: update CHANGELOG for 0.4.2
andkirby May 3, 2026
843b1ba
chore: bump version to 0.4.2
andkirby May 3, 2026
394e311
fix(tui): route restart/stop to managed service when focus is on mana…
andkirby May 3, 2026
2b84eeb
fix(scanner): recognize versioned python binaries in runtime command …
andkirby May 5, 2026
5722f63
refactor(tui): extract shared row color logic and unify group confirm…
andkirby May 14, 2026
0c31654
fix(DEVPT-016): add process start time identity checks
andkirby Jun 5, 2026
097772f
feat: make selected service details pane work for both running and ma…
andkirby Jun 7, 2026
87c5a11
docs: update DEVPT-004 tickets to reflect universal details pane impl…
andkirby Jun 7, 2026
1c70b6e
feat(tui): add copy-to-clipboard icon for command text in logs and de…
andkirby Jun 9, 2026
60bc8a8
feat(DEVPT-015): capture resolved command and restructure identity ch…
andkirby Jun 11, 2026
4db59e0
fix(DEVPT-017): TUI managed stop uses lifecycle layer instead of raw PID
andkirby Jun 11, 2026
96cc2f7
docs: update PROCESS_MANAGEMENT.md with identity architecture
andkirby Jun 11, 2026
5e73be0
feat(tui): add per-process memory display in service details pane
andkirby Jun 11, 2026
ec27f0b
docs: update durable docs for v0.5.0 release
andkirby Jun 12, 2026
560c32f
chore: bump version to 0.5.0
andkirby Jun 12, 2026
17b687c
fix(cli): wire remove/rm command and add to help text
andkirby Jun 18, 2026
02eeed4
docs: add 0.5.1 changelog entry
andkirby Jun 18, 2026
86b88e0
chore: bump version to 0.5.1
andkirby Jun 18, 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
68 changes: 68 additions & 0 deletions .agents/skills/devpt-release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: devpt-release
description: Increment version and update CHANGELOG.md from commits since last update. Use when making a release, bumping version, or updating changelog for dev-process-tracker.
---

# DevPT Release Skill

## Usage

```
<user asks: "make a patch release"> or "bump minor version" or "devpt release major"
```

## Workflow

1. **Read CHANGELOG.md** — extract current version from first `## X.Y.Z` header
2. **Find last update** — get SHA of the commit that last modified CHANGELOG.md
3. **Get commits since** — `git log <SHA>..HEAD --oneline --no-merges`
4. **Group & classify**:
- Parse commit messages for intent (add/fix/change/remove/refactor/docs)
- **Group related commits**: if a "fix" or "polish" follows a feature in time/subject, fold it into that feature line
- Prioritize user-facing changes over internal polish
5. **Determine bump**:
- `major` (0.x → 1.0 or breaking) / `minor` (features) / `patch` (fixes) — use user-specified if provided
6. **Generate entries** — write concise imperative-mood bullets:
- "Added X so Y" for features
- "Fixed Z so W" for bugs
- Group related fixes with their feature when they're clearly connected
7. **Update CHANGELOG.md** — prepend new version section
8. **Set version** — run `./scripts/set-version.sh <X.Y.Z>` to update version.go, commit, and tag
9. **Push** — `git push && git push origin v<X.Y.Z>`

## Version Management

- **Version file**: `pkg/buildinfo/version.go` (`const Version = "X.Y.Z"`)
- **Set version script**: `./scripts/set-version.sh <X.Y.Z>` — updates version.go, commits, creates tag
- **Tags use `v` prefix**: `v0.2.1`
- **Pre-push hook**: validates version.go matches latest tag (via lefthook)

## Grouping Heuristics

When classifying commits, apply these rules:

1. **Time proximity**: Fixes within 1-3 commits of a feature likely belong to it
2. **Subject overlap**: "fix search" after "add search input" → same entry
3. **Keyword clues**: "polish", "tweak", "adjust", "follow-up" often indicate related work
4. **When uncertain**: Keep separate rather than over-grouping

## Flags

- `--review` — show grouped commits and proposed entries before writing
- `--dry-run` — output the new section without modifying the file

## Example Output

```markdown
## 0.3.0

- Added dark mode toggle so users can switch themes without reloading
- Fixed theme persistence so preference survives across sessions
- Removed deprecated `/legacy` endpoint
```

## Edge Cases

- **No commits since last update**: Report "no changes since last release" and exit
- **Uncommitted changes**: Warn but proceed (commits are the source of truth)
- **Version is 0.x**: Treat as pre-release; minor bumps for features, patch for fixes
75 changes: 63 additions & 12 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DevPortTrack Copilot Instructions

A macOS CLI tool for discovering, tracking, and managing local development servers. ~3,900 lines of Go across 9 packages.
A macOS CLI tool for discovering, tracking, and managing local development servers. ~8,300 lines of Go across 10 packages.

## Quick Reference

Expand All @@ -27,12 +27,14 @@ go test -v ./pkg/cli -run TestWarnLegacyManagedCommands

### Key Directories
- **cmd/devpt/main.go** - CLI entry point (~170 lines). Routes commands and prints results to stdout/stderr.
- **pkg/cli/** - Command handlers (commands.go), TUI app controller (app.go), and Bubble Tea UI (tui.go). ~50KB of code.
- **pkg/cli/** - Command handlers (commands.go), TUI app controller (app.go), and Bubble Tea UI (pkg/cli/tui/). ~50KB of code.
- **pkg/scanner/** - Process discovery via `lsof`, project root detection, and AI agent detection.
- **pkg/registry/** - Service registry (JSON at ~/.config/devpt/registry.json). Thread-safe CRUD operations.
- **pkg/process/** - Process lifecycle management: spawning, log capture, graceful shutdown.
- **pkg/lifecycle/** - Service lifecycle orchestration: identity verification, reconciliation, readiness checks, per-service locking, start/stop/restart workflows. See PROCESS_MANAGEMENT.md for the behavioral contract.
- **pkg/models/** - Core data structures (ProcessRecord, ManagedService, AgentTag) and config paths.
- **pkg/health/** - Health check utilities (basic placeholder for future expansion).
- **pkg/resource/** - Runtime resource metrics (memory RSS) via batch `ps` calls.

## Architecture Overview

Expand All @@ -41,26 +43,43 @@ go test -v ./pkg/cli -run TestWarnLegacyManagedCommands
2. **Resolver** walks filesystem to find project roots (.git, go.mod, package.json, etc.)
3. **Detector** analyzes parent process/env to identify AI-agent-started servers
4. **Registry** (`pkg/registry`) manages user-registered managed services (JSON at ~/.config/devpt/registry.json)
5. **Process Manager** (`pkg/process`) handles spawning, stopping, and log capture
6. **CLI/TUI** presents the unified list and command interface
5. **Lifecycle Manager** (`pkg/lifecycle`) orchestrates start/stop/restart with identity verification, readiness, and per-service locking
6. **Process Manager** (`pkg/process`) handles spawning, stopping, and log capture
7. **Resource Collector** (`pkg/resource`) fetches runtime metrics (memory) via batch `ps` calls
8. **Health Checker** (`pkg/health`) probes ports for responsiveness
9. **CLI/TUI** presents the unified list and command interface

### Key Models
- **ProcessRecord**: Discovered listening process (PID, port, command, project root, agent detection)
- **ManagedService**: User-registered service (name, cwd, command, ports, timestamps)
- **AgentTag**: Detection result (source, agent name, confidence level)
- **Registry**: Container for all managed services (versioned JSON format)

### Runtime Observations
Memory and health are runtime observations, separate from discovery data:
- Fetched asynchronously in the TUI update loop (every 2s when idle)
- Stored in TUI model maps keyed by PID (memory) or port (health)
- Not persisted — they reflect current state only
- Batch collection via `ps -p <pids> -o pid=,rss=` — returns KB for each PID

### Command Routing
Entry point (cmd/devpt/main.go) routes commands:
- No args → `app.TopCmd()` (opens interactive TUI in pkg/cli/tui.go)
- `ls`, `add`, `start`, `stop`, `restart`, `logs`, `status` → handler functions

## Critical Implementation Details

### Service Identity and Lifecycle
The lifecycle layer (`pkg/lifecycle`) manages service identity using an ordered evidence chain:
1. PID + start time → 1b. Stored LastPID + path → 2. Declared port → 3. CWD + resolved command → 4. Exact CWD → 5. Project root

After spawn, the OS-resolved command is captured and stored for future identity matching.
See PROCESS_MANAGEMENT.md §1.3 and §3.4 for the full contract.

### ProcessRecord vs ManagedService Merging
When listing services:
1. Merge discovered processes with managed registry entries
2. Managed service appears as "running" if its PID is in discovered processes
1. Merge discovered processes with managed registry entries via the reconciler
2. Managed service appears as "running" if identity verification confirms ownership
3. Source field shows: "manual" (discovered but unmanaged), "managed" (registered), or "agent:xxx" (detected)

### Agent Detection Confidence
Expand All @@ -77,7 +96,8 @@ Returns confidence level: low, medium, or high. Code uses these intelligently fo
- Processes spawn in separate process groups (setpgid)
- stdout/stderr redirected to ~/.config/devpt/logs/{serviceName}/{timestamp}.log
- Graceful shutdown: SIGTERM with timeout, then SIGKILL
- PID and start time tracked in registry after spawn
- PID, start time, and resolved command tracked in registry after spawn
- TUI stop/restart routes through the lifecycle layer (not raw PID calls)

### Directory Caching
Project resolver caches directory → project root mappings.
Expand All @@ -97,18 +117,27 @@ Cache can be invalidated selectively. Important for performance (lsof calls are
## Testing

### Test Locations
- **pkg/cli/**: app_warning_test.go (TestWarnLegacyManagedCommands), command_validation_test.go (TestValidateManagedCommand, TestFirstBlockedShellPattern) - 3 tests total
- **pkg/process/**: manager_parse_test.go (TestParseCommandArgs, TestParseCommandArgs_UnterminatedQuote) - 2 tests total
- **pkg/cli/**: command validation, pattern matching, batch ops, status commands, display formatting — 10 test files
- **pkg/cli/tui/**: UI rendering, key input, state transitions, viewports, memory display, namespaces, OSC8, group color — 12 test files
- **pkg/lifecycle/**: identity, reconciliation, start/stop/restart flows, readiness, locking, outcomes — 11 test files
- **pkg/process/**: command parsing, start time — 2 test files
- **pkg/resource/**: memory formatting, color thresholds, collection — 1 test file
- **pkg/registry/**: CRUD operations — 1 test file
- **pkg/scanner/**: process discovery — 1 test file
- **pkg/models/**: lifecycle models — 1 test file

### Test Patterns
- Table-driven tests for command parsing and validation
- No external dependencies; tests use pure Go (no mocking framework)
- Run full suite: `go test ./...` (2 seconds)
- Run full suite: `go test ./...` (~20 seconds)
- Run single package: `go test -v ./pkg/cli`
- Run specific test: `go test -v ./pkg/cli -run TestWarnLegacyManagedCommands`

## Conventions

### Spec Updates
- Removed specs: delete cleanly, re-render. No ~~strikethrough~~, no **REMOVED** annotations, no tombstone rows.

### Naming
- Packages use lowercase, no underscores (Go convention)
- Function names: `CommandName()` pattern for exported, `helperName()` for unexported
Expand All @@ -133,12 +162,31 @@ Cache can be invalidated selectively. Important for performance (lsof calls are
- Create dirs if missing with MkdirAll (mode 0755)
- Log files timestamped as: ~/.config/devpt/logs/{serviceName}/{ISO8601}.log

### TUI-Specific (pkg/cli/tui.go)
### TUI-Specific (pkg/cli/tui/)
- Model-based architecture (Bubble Tea): Cmd returns effects, Model contains state
- Top-level ListModel has tabs for "Running" and "Managed" lists
- Split-view layout: running services table (top) + managed services list (bottom) + universal details pane (right)
- Details pane shows info for whichever service is currently selected (running or managed)
- Never mutate Model state directly—use Cmd/Update pattern
- Exit conditions: user presses 'q', or explicit quit() command
- Key handlers prioritized: modal state (logs/input) takes precedence over list navigation
- Async observation: memory collected every 2s via batch `ps`, health checked asynchronously

## Before Submitting Changes

Always run these checks before considering work complete:

```bash
# 1. Build succeeds
go build ./...

# 2. All tests pass
go test ./...

# 3. CLI runs without error
go build -o devpt ./cmd/devpt && ./devpt ls
```

If adding user-facing features, also update README.md and QUICKSTART.md.

## Common Tasks

Expand Down Expand Up @@ -173,8 +221,11 @@ Cache can be invalidated selectively. Important for performance (lsof calls are
## Documentation Files
- **README.md** - Full user documentation and CLI reference
- **QUICKSTART.md** - Getting started guide for new users
- **PROCESS_MANAGEMENT.md** - Behavioral contract for service lifecycle (identity, reconciliation, outcomes)
- **DEBUG.md** - Debug protocol with verified runtime workflows
- **IMPLEMENTATION_SUMMARY.md** - Architecture and feature overview (reference only)
- **techspec.md** - Original technical specification
- **.agents/skills/devpt-release/SKILL.md** - Release workflow (changelog + version bump)

Update README and QUICKSTART when adding user-facing features or commands.

Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.25'

- name: Build binaries
run: |
mkdir -p dist

# Linux
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/devpt-linux-x64 ./cmd/devpt
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/devpt-linux-arm64 ./cmd/devpt

# macOS
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/devpt-macos-x64 ./cmd/devpt
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/devpt-macos-arm64 ./cmd/devpt

# Windows
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o dist/devpt-windows-x64.exe ./cmd/devpt

- name: Generate checksums
run: |
cd dist
sha256sum * > checksums.txt

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
26 changes: 24 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@
/.tmp-home/
/.tmp-home*/


# Local draft/working docs
/docs
/docs
/coverage.out

# Go
*.exe
*.exe~
*.dll
*.so
*.dylib
*.test
*.out
go.work
vendor/

# Coverage
*.coverprofile
coverage.html

# Test fixture binaries (no extension on macOS)
/sandbox/servers/*/go-basic
/sandbox/servers/*/*/node
/sandbox/servers/*/*/server.js
/.claude/settings.local.json
wireframe*.*
Loading