Skip to content

feat(container): add devrail-init.sh progressive adoption script#11

Merged
matthew-on-git merged 1 commit intomainfrom
feat/devrail-init
Mar 10, 2026
Merged

feat(container): add devrail-init.sh progressive adoption script#11
matthew-on-git merged 1 commit intomainfrom
feat/devrail-init

Conversation

@matthew-on-git
Copy link
Contributor

Summary

  • Add scripts/devrail-init.sh — standalone shell script for progressive DevRail adoption
  • 4-layer model: agent files → pre-commit hooks → Makefile+container → CI pipeline
  • Language-aware config generation, Makefile merge strategy, idempotent re-runs
  • 16 bats tests covering greenfield, retrofit, dry-run, agents-only, and idempotency

Test plan

  • CI passes
  • bats tests/test-devrail-init.sh — 16 tests pass
  • Manual test: ./scripts/devrail-init.sh --all --languages python,bash --ci github --yes in empty dir
  • Manual test: re-run in same dir (idempotent — all skipped)
  • Manual test: --dry-run writes no files
  • Manual test: --agents-only creates only Layer 1 files

🤖 Generated with Claude Code

Standalone shell script that scaffolds DevRail configuration files
in any project through 4 progressive layers:

1. Agent instruction files (CLAUDE.md, AGENTS.md, .cursorrules, .opencode/)
2. Pre-commit hooks (language-aware .pre-commit-config.yaml)
3. Makefile + container (.devrail.yml, Makefile, DEVELOPMENT.md)
4. CI pipeline (GitHub Actions or GitLab CI)

Features:
- Interactive and non-interactive modes (--yes, --force)
- Dry-run support (--dry-run)
- Language-aware config generation from .devrail.yml
- Makefile merge strategy (backup + include for existing Makefiles)
- .gitignore append-with-marker pattern
- Idempotent — safe to re-run
- 16 bats tests covering all modes and edge cases

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matthew-on-git matthew-on-git merged commit 501e3b5 into main Mar 10, 2026
3 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.

1 participant