Skip to content

Add stop.sh script and improve dev lifecycle management - #1

Merged
natepixel merged 1 commit into
mainfrom
claude/review-memory-files-VhNv0
Apr 27, 2026
Merged

natepixel merged 1 commit into
mainfrom
claude/review-memory-files-VhNv0

Conversation

@natepixel

@natepixel natepixel commented Apr 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

This PR adds a new ./scripts/stop.sh script to cleanly shut down development servers started by ./scripts/dev.sh, along with supporting documentation and CI improvements.

Key Changes

  • New scripts/stop.sh: Provides a clean shutdown mechanism for dev servers

    • Calls repo_dev_stop() from scripts/dev.repo.sh if defined
    • Falls back to killing PIDs listed in DEV_PIDS from the branch state file
    • Removes branch state file after cleanup
  • Enhanced dev lifecycle:

    • Updated scripts/dev.sh to track DEV_PIDS instead of PID_FILE
    • Updated scripts/dev.repo.sh with examples and documentation for exporting DEV_PIDS
    • Added optional repo_dev_stop() hook pattern for custom shutdown logic
    • Updated scripts/status.sh to display DEV_PIDS when available
  • New working/memory/ directory: Designated location for agent-managed memory

    • Gitignored except for README.md
    • Provides agents a legitimate place for working notes without polluting repo root
    • Includes promotion path guidance for elevating notes to skills/, STATUS.md, or docs/
  • New CLAUDE.md: Thin entrypoint that imports AGENTS.md for Claude Code

    • Follows the pattern of tool-specific guidance files pointing to a single source of truth
  • CI improvements:

    • Split monolithic ci job into focused lint-scripts and check-env jobs
    • Added bash syntax checking and ShellCheck linting for shell scripts
    • Added validation tests for check-env.sh behavior
  • Documentation updates:

    • Updated AGENTS.md to clarify DEV_PIDS persistence and stop.sh integration
    • Updated README.md to document ./scripts/stop.sh as a standard entrypoint
    • Clarified working directory structure and agent memory conventions

Implementation Details

  • stop.sh uses the same branch-safe naming convention as dev.sh for state files
  • State file sourcing allows repo_dev_start() to export DEV_PIDS for later consumption
  • Graceful fallback: if no hook or PIDs exist, script exits cleanly with informative message
  • All shell scripts follow strict mode (set -euo pipefail) and include ShellCheck directives

- working/memory/ as gitignored agent-memory location with promotion rules,
  so agents stop inventing memory.md/notes.md at the repo root
- CLAUDE.md as a thin pointer that imports AGENTS.md (keeps AGENTS.md the
  single source of truth across tools)
- scripts/stop.sh paired with dev.sh; dev.repo.sh now documents DEV_PIDS
  and the optional repo_dev_stop() hook
- dev.sh persists DEV_PIDS; status.sh surfaces them
- CI runs bash -n + shellcheck on scripts and exercises check-env.sh
- Dedupe branch-filename rule in AGENTS.md; link to working/status/README.md
@natepixel
natepixel merged commit c399f9e into main Apr 27, 2026
4 checks passed
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.

2 participants