Skip to content

Commit 3d91a84

Browse files
author
Matthew
committed
Merge branch 'docs/story-11-3-done' into 'main'
docs(standards): mark story 11.2 as done See merge request orgdocs/development-standards!33
2 parents e2df659 + f161db4 commit 3d91a84

3 files changed

Lines changed: 73 additions & 27 deletions

File tree

_bmad-output/implementation-artifacts/11-2-implement-devrail-init-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Story 11.2: Implement `devrail init` Core Script
22

3-
Status: review
3+
Status: done
44

55
## Story
66

Lines changed: 69 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Story 11.3: Distribute and Document `devrail init`
22

3-
Status: backlog
3+
Status: done
44

55
## Story
66

@@ -10,47 +10,93 @@ so that I can adopt DevRail in my project without reading the full standards fir
1010

1111
## Acceptance Criteria
1212

13-
1. The `devrail init` script is available via a simple install command (curl, npm, pip, or similar)
13+
1. `curl -fsSL https://devrail.dev/init.sh | bash` downloads and runs `devrail init`
1414
2. Installation instructions are documented on devrail.dev
15-
3. A getting-started guide walks through the full adoption flow
16-
4. The devrail.dev site includes a "Quick Start" page with `devrail init` as the entry point
17-
5. `make check` passes on all updated repos
15+
3. The existing getting-started guides are updated to reference `devrail init` as the primary adoption path
16+
4. The devrail.dev Getting Started index page leads with `devrail init` as the entry point
17+
5. CLI reference documentation exists for all `devrail init` options
18+
6. `make check` passes on all updated repos
1819

1920
## Tasks / Subtasks
2021

21-
- [ ] Task 1: Set up distribution (AC: 1)
22-
- [ ] 1.1 Choose distribution mechanism based on 11.1 design
23-
- [ ] 1.2 Publish the script/package to the chosen registry
24-
- [ ] 1.3 Test installation from scratch on a clean system
22+
- [x] Task 1: Set up curl-pipe-bash distribution via devrail.dev (AC: 1)
23+
- [x] 1.1 Add `static/_redirects` file to `devrail.dev` Hugo site with redirect: `/init.sh``https://raw.githubusercontent.com/devrail-dev/dev-toolchain/main/scripts/devrail-init.sh 302`
24+
- [x] 1.2 Deploy and verify `curl -fsSL https://devrail.dev/init.sh | bash -- --help` works
25+
- [x] 1.3 Test in a fresh temp directory: `curl -fsSL https://devrail.dev/init.sh | bash -- --all --languages python --ci github --yes`
2526

26-
- [ ] Task 2: Write documentation (AC: 2, 3, 4)
27-
- [ ] 2.1 Add install instructions to devrail.dev
28-
- [ ] 2.2 Write getting-started guide covering all three adoption paths
29-
- [ ] 2.3 Update the devrail.dev Quick Start page
30-
- [ ] 2.4 Add CLI reference documentation
27+
- [x] Task 2: Update existing documentation on devrail.dev (AC: 2, 3, 4, 5)
28+
- [x] 2.1 Update `content/docs/getting-started/_index.md` — lead with `devrail init` one-liner, reframe template/manual paths as alternatives
29+
- [x] 2.2 Update `content/docs/getting-started/new-project.md` — add `devrail init` section as the recommended path before template instructions
30+
- [x] 2.3 Update `content/docs/getting-started/retrofit.md` — replace manual file-copying steps with `devrail init` commands, keep manual steps as fallback
31+
- [x] 2.4 Create `content/docs/getting-started/cli-reference.md` — document all CLI options (`--languages`, `--ci`, `--all`, `--agents-only`, `--yes`, `--force`, `--dry-run`, `--version`), 4-layer adoption model, `.devrail.yml` configuration, conflict resolution behavior
3132

32-
- [ ] Task 3: Validate end-to-end (AC: 5)
33-
- [ ] 3.1 Test full flow: install → initmake check (greenfield)
34-
- [ ] 3.2 Test full flow: install → init → make check (retrofit)
35-
- [ ] 3.3 Run `make check` on all updated repos
33+
- [x] Task 3: Validate end-to-end (AC: 6)
34+
- [x] 3.1 Greenfield test: `mktemp -d`, `git init`, `curl | bash -- --all --languages python --ci github --yes`, then `docker run ... make check` — verify all files created and checks pass
35+
- [x] 3.2 Retrofit test: clone an existing repo, run `devrail init --all --languages <lang> --ci <platform> --yes`, verify Makefile backup, .gitignore append, no file conflicts
36+
- [x] 3.3 Run `make check` on the devrail.dev repo to validate documentation changes
3637

3738
## Dev Notes
3839

39-
- Blocked by Story 11.2 (implementation must be completed first)
40-
- Distribution options to consider: GitHub releases (curl-pipe-bash), npm package, pip package, Homebrew tap
41-
- The devrail.dev site currently has Getting Started docs — these need updating, not replacing
40+
- Story 11.2 is done (PR #11 merged on dev-toolchain, 16/16 bats tests pass)
41+
- The script is 1107 lines of POSIX-compatible bash at `dev-toolchain/scripts/devrail-init.sh`
42+
- Script implements 4-layer progressive adoption: Layer 1 (agent files), Layer 2 (pre-commit), Layer 3 (Makefile + container), Layer 4 (CI pipelines)
43+
- CLI flags: `--languages`, `--ci`, `--all`, `--agents-only`, `--yes`, `--force`, `--dry-run`, `--version`
44+
- Small files embedded as heredocs; Makefile and DEVELOPMENT.md downloaded at runtime from `raw.githubusercontent.com/devrail-dev/github-repo-template/main/`
45+
- The script header already references `curl -fsSL https://devrail.dev/init.sh | bash` — this URL doesn't work yet (primary deliverable of this story)
46+
47+
### Distribution Mechanism
48+
49+
Cloudflare Pages (which hosts devrail.dev) supports a `_redirects` file in the site root. Hugo serves static files from the `static/` directory. Add `static/_redirects` to redirect `/init.sh` to the raw GitHub script URL. This keeps a single source of truth (the script in dev-toolchain) without manual sync.
50+
51+
### Devrail.dev Site Context
52+
53+
- Hugo site with Docsy theme, repo at `github.com/devrail-dev/devrail.dev`
54+
- Deploys via GitHub Actions to Cloudflare Pages
55+
- Hugo URL pattern: `/:year/:month/:title/` (not filename-based) — important for blog post links
56+
- PRs required for changes; merge triggers deploy
57+
- Org secrets: `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`
58+
59+
### Existing Documentation Files to Update
60+
61+
- `content/docs/getting-started/_index.md` — main entry point (prerequisites, path selection)
62+
- `content/docs/getting-started/new-project.md` — template-based project creation
63+
- `content/docs/getting-started/retrofit.md` — adding DevRail to existing repos
64+
- `content/docs/getting-started/agents.md` — AI agent setup (no changes needed — agents-only is already a path)
65+
- `content/docs/getting-started/badge.md` — compliance badge (no changes needed)
4266

4367
### References
4468

45-
- [Source: devrail.dev/content/docs/] — existing documentation
46-
- [Source: Story 11.2] — implementation to distribute
69+
- [Source: dev-toolchain/scripts/devrail-init.sh] — the script to distribute (PR #11, merged)
70+
- [Source: dev-toolchain/tests/test-devrail-init.sh] — 16 bats tests (all passing)
71+
- [Source: devrail.dev/content/docs/getting-started/] — existing docs to update
72+
- [Source: _bmad-output/planning-artifacts/devrail-init-design.md] — CLI design specification
4773

4874
## Dev Agent Record
4975

5076
### Agent Model Used
5177

78+
Claude Opus 4.6
79+
5280
### Debug Log References
5381

82+
- `curl -fsSL https://devrail.dev/init.sh | bash -s -- --help` — returns full usage text
83+
- Greenfield test: 19 files created, `make _check` passes (5 pass, 1 skip for tests)
84+
- Retrofit test: existing Makefile skipped, .gitignore appended with marker, GitLab CI generated
85+
- `make check` passes on devrail.dev repo
86+
5487
### Completion Notes List
5588

89+
- `static/_redirects` uses Cloudflare Pages 302 redirect to raw.githubusercontent.com — single source of truth, no manual sync
90+
- Getting Started index now leads with `curl -fsSL https://devrail.dev/init.sh | bash` one-liner
91+
- New Project page recommends `devrail init` first, templates as alternative
92+
- Retrofit page recommends `devrail init` first, manual curl commands as fallback
93+
- CLI Reference page covers all options, 4 adoption layers, conflict resolution, examples
94+
- PR: https://github.com/devrail-dev/devrail.dev/pull/15
95+
5696
### File List
97+
98+
- `devrail.dev/static/_redirects` — new (Cloudflare Pages redirect for /init.sh)
99+
- `devrail.dev/content/docs/getting-started/_index.md` — modified (lead with devrail init)
100+
- `devrail.dev/content/docs/getting-started/new-project.md` — modified (add devrail init section)
101+
- `devrail.dev/content/docs/getting-started/retrofit.md` — modified (replace manual steps with devrail init)
102+
- `devrail.dev/content/docs/getting-started/cli-reference.md` — new (CLI reference page)

_bmad-output/implementation-artifacts/sprint-status.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ development_status:
117117
10-3-write-v160-release-blog-post: done
118118
epic-10-retrospective: optional
119119

120-
epic-11: in-progress
120+
epic-11: done
121121
11-1-design-devrail-init-cli: done
122-
11-2-implement-devrail-init-core: review
123-
11-3-distribute-and-document-devrail-init: backlog
122+
11-2-implement-devrail-init-core: done
123+
11-3-distribute-and-document-devrail-init: done
124124
epic-11-retrospective: optional
125125

126126
epic-12: backlog

0 commit comments

Comments
 (0)