Skip to content

Commit 4fe4235

Browse files
committed
docs: public alpha onboarding improvements (slice #16)
Refactor README quickstart to lead with Makefile, use multiline CLI commands, show --html-output, and correct API entry point to wsgi.py. Expand CONTRIBUTING with prerequisites, clone-to-proof quickstart, formatting workflow, and where-to-start guidance for new contributors. Add `make proof` target running all 6 gates via .venv/bin/python without requiring uv on PATH. Add --html-output to Makefile analyze target and CI proof workflow. Update clean target for HTML output. Add checked-in HTML example at examples/python_org_homepage_report.html with deterministic contract test coverage. Link all three output formats in README examples section. 138 total tests passing across all 6 proof gates. Made-with: Cursor
1 parent 7c4cdfe commit 4fe4235

8 files changed

Lines changed: 280 additions & 45 deletions

File tree

.github/workflows/proof.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
--input examples/sample_ios_output.json \
6060
--app-id com.example.legacyapp \
6161
--json-output output/modernization_report.json \
62-
--md-output output/modernization_report.md | tee proof-output.txt
62+
--md-output output/modernization_report.md \
63+
--html-output output/modernization_report.html | tee proof-output.txt
6364
6465
- name: Publish proof summary
6566
run: |

CONTRIBUTING.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,38 @@
11
# Contributing
22

3+
## Prerequisites
4+
5+
- [uv](https://docs.astral.sh/uv/) (Python package manager)
6+
- Python 3.14.3 (pinned in `.python-version`)
7+
- Node 20.19.5 (pinned in `.node-version`)
8+
- [pnpm](https://pnpm.io/)
9+
10+
## Quickstart
11+
12+
```bash
13+
git clone https://github.com/buildrr89/rade-engine.git
14+
cd rade-engine
15+
make bootstrap
16+
make proof
17+
```
18+
19+
If all 6 gates pass, you are ready to contribute.
20+
321
## Scope rule
422

5-
Contributions must follow the canonical read order and scope controls in [AGENTS.md](AGENTS.md) and [docs/TRUTH_HIERARCHY.md](docs/TRUTH_HIERARCHY.md).
23+
Contributions must follow the canonical read order and scope controls in [AGENTS.md](AGENTS.md) and [docs/TRUTH_HIERARCHY.md](docs/TRUTH_HIERARCHY.md). Read [docs/APP_SCOPE.md](docs/APP_SCOPE.md) before proposing new features.
624

725
## Workflow
826

9-
1. Create a branch from `main`.
27+
1. Create a branch from `main` (`feat/`, `fix/`, or `docs/` prefix).
1028
2. Keep changes small, testable, and reversible.
11-
3. Update canonical docs in the same PR when behavior or contracts change.
12-
4. Open a PR using `.github/pull_request_template.md`.
29+
3. Update canonical docs and tests in the same PR when behavior or contracts change.
30+
4. Run `make proof` and include exact outputs.
31+
5. Open a PR using the [PR template](.github/pull_request_template.md).
1332

1433
## Proof required before review
1534

16-
Run and include exact outputs for:
35+
Run all gates with `make proof`, or individually:
1736

1837
```bash
1938
.venv/bin/python -m pytest -q
@@ -26,6 +45,20 @@ pnpm --dir web test
2645

2746
If a proof command was not run, mark the result as unverified.
2847

48+
## Formatting
49+
50+
Auto-fix formatting before committing:
51+
52+
```bash
53+
make format
54+
```
55+
56+
## Where to start
57+
58+
- Look at [docs/NEXT_EXECUTION_BACKLOG.md](docs/NEXT_EXECUTION_BACKLOG.md) for the current backlog.
59+
- Issues labeled `good first issue` are scoped for new contributors.
60+
- If you are unsure whether a change is in scope, open an issue first.
61+
2962
## Security
3063

3164
Do not report vulnerabilities in public issues. Use the process in [SECURITY.md](SECURITY.md).

Makefile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export UV_CACHE_DIR ?= .uv-cache
88
export UV_OFFLINE ?= 0
99
PY_SOURCES ?= src tests agent
1010

11-
.PHONY: bootstrap test lint format analyze api worker agent-scan web-install web-dev web-test clean
11+
.PHONY: bootstrap test proof lint format analyze api worker agent-scan web-install web-dev web-test clean
1212

1313
bootstrap:
1414
$(UV) sync --dev
@@ -17,9 +17,19 @@ bootstrap:
1717
test:
1818
./rade-proof
1919

20+
proof:
21+
.venv/bin/python -m pytest -q
22+
.venv/bin/python -m tests.runner
23+
.venv/bin/ruff check $(PY_SOURCES)
24+
.venv/bin/python -m black --check $(PY_SOURCES)
25+
pnpm --dir $(WEB_DIR) lint
26+
pnpm --dir $(WEB_DIR) test
27+
@echo "All proof gates passed."
28+
2029
lint:
2130
$(UV) run ruff check $(PY_SOURCES)
2231
$(UV) run black --check $(PY_SOURCES)
32+
pnpm --dir $(WEB_DIR) lint
2333

2434
format:
2535
$(UV) run ruff check --fix $(PY_SOURCES)
@@ -30,7 +40,8 @@ analyze:
3040
--input examples/sample_ios_output.json \
3141
--app-id com.example.legacyapp \
3242
--json-output $(OUTPUT_DIR)/modernization_report.json \
33-
--md-output $(OUTPUT_DIR)/modernization_report.md
43+
--md-output $(OUTPUT_DIR)/modernization_report.md \
44+
--html-output $(OUTPUT_DIR)/modernization_report.html
3445

3546
api:
3647
./rade-devserver src.api.wsgi:application --host 127.0.0.1 --port 8000
@@ -51,4 +62,4 @@ web-test:
5162
pnpm --dir $(WEB_DIR) test
5263

5364
clean:
54-
rm -rf $(OUTPUT_DIR)/*.json $(OUTPUT_DIR)/*.md .uv-cache .ruff_cache
65+
rm -rf $(OUTPUT_DIR)/*.json $(OUTPUT_DIR)/*.md $(OUTPUT_DIR)/*.html .uv-cache .ruff_cache

README.md

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,44 @@ RADE accepts a structured JSON payload or a public URL, runs deterministic struc
1717

1818
## Try It
1919

20-
Prerequisites: `uv`, Python `3.14.3`, Node `20.19.5`, and `pnpm`.
20+
Prerequisites: [uv](https://docs.astral.sh/uv/), Python 3.14.3, Node 20.19.5, and [pnpm](https://pnpm.io/).
2121

2222
```bash
23-
# Install
23+
# Install all dependencies
24+
make bootstrap
25+
# or manually:
2426
uv sync --dev
2527
.venv/bin/python -m playwright install chromium
2628
pnpm --dir web install
29+
```
2730

28-
# Analyze a public URL
29-
uv run python -m src.core.cli analyze --url https://example.com --json-output output/example_report.json --md-output output/example_report.md
31+
Run the sample analysis:
3032

31-
# Or analyze a local JSON fixture
32-
uv run python -m src.core.cli analyze --input examples/sample_ios_output.json --app-id com.example.legacyapp --json-output output/modernization_report.json --md-output output/modernization_report.md
33+
```bash
34+
make analyze
35+
# produces output/modernization_report.{json,md,html}
3336
```
3437

35-
See [examples/python_org_homepage_report.md](examples/python_org_homepage_report.md) for a checked-in report example.
38+
Or use the CLI directly:
39+
40+
```bash
41+
# Analyze a public URL
42+
uv run python -m src.core.cli analyze \
43+
--url https://example.com \
44+
--json-output output/example_report.json \
45+
--md-output output/example_report.md \
46+
--html-output output/example_report.html
47+
48+
# Analyze a local JSON fixture
49+
uv run python -m src.core.cli analyze \
50+
--input examples/sample_ios_output.json \
51+
--app-id com.example.legacyapp \
52+
--json-output output/modernization_report.json \
53+
--md-output output/modernization_report.md \
54+
--html-output output/modernization_report.html
55+
```
56+
57+
See [examples/](examples/) for checked-in report examples (JSON, Markdown, and HTML).
3658

3759
## How It Works
3860

@@ -44,7 +66,7 @@ Input (JSON or URL)
4466
-> Deduplication into ordered clusters
4567
-> Scoring (complexity, reusability, accessibility risk, migration risk)
4668
-> Standards-backed recommendations and roadmap
47-
-> Scrubbed JSON + Markdown report output
69+
-> Scrubbed JSON + Markdown + interactive HTML report output
4870
```
4971

5072
The analysis pipeline is fully deterministic: no LLM inference, no non-deterministic scoring, and no network calls during analysis itself.
@@ -76,12 +98,16 @@ See [docs/APP_SCOPE.md](docs/APP_SCOPE.md) for the current implementation bounda
7698
## Development Setup
7799

78100
```bash
79-
# Python + web dependencies
80-
uv sync --dev
81-
.venv/bin/python -m playwright install chromium
82-
pnpm --dir web install
101+
make bootstrap # install Python + web dependencies
102+
make proof # run all 6 proof gates
103+
make analyze # run sample analysis to output/
104+
make lint # ruff + black check
105+
make format # auto-fix formatting
106+
```
83107

84-
# Proof gates
108+
The individual proof gates (also run by `make proof` and CI):
109+
110+
```bash
85111
.venv/bin/python -m pytest -q
86112
.venv/bin/python -m tests.runner
87113
.venv/bin/ruff check src tests agent
@@ -90,15 +116,6 @@ pnpm --dir web lint
90116
pnpm --dir web test
91117
```
92118

93-
Or use the Makefile:
94-
95-
```bash
96-
make bootstrap
97-
make test
98-
make lint
99-
make analyze
100-
```
101-
102119
## Architecture
103120

104121
See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full architecture document.
@@ -108,7 +125,7 @@ See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full architecture docum
108125
| CLI | `src/core/cli.py` | Primary analysis command |
109126
| Web collector | `src/collectors/web_dom_adapter.py` | Playwright ARIA snapshot collection |
110127
| Report engine | `src/core/report_generator.py` | Validation, scoring, recommendations, output |
111-
| API | `src/api/app.py` | `POST /analyze` with API key auth |
128+
| API | `src/api/wsgi.py` | `POST /analyze` with API key auth |
112129
| Scrubber | `src/scrubber/pii_scrubber.py` | PII removal preserving stable identifiers |
113130
| Blueprint (exploratory) | `src/demo/run_raid_visualizer.py` | SVG blueprint from accessibility trees |
114131

@@ -127,9 +144,9 @@ See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full architecture docum
127144

128145
Real-world analysis outputs from public websites:
129146

130-
- [python.org homepage report](examples/python_org_homepage_report.md)
131-
- [MDN homepage report](examples/mdn_homepage_report.md)
132-
- [web.dev homepage report](examples/web_dev_homepage_report.md)
147+
- python.org: [Markdown](examples/python_org_homepage_report.md) · [JSON](examples/python_org_homepage_report.json) · [HTML](examples/python_org_homepage_report.html)
148+
- MDN: [Markdown](examples/mdn_homepage_report.md) · [JSON](examples/mdn_homepage_report.json)
149+
- web.dev: [Markdown](examples/web_dev_homepage_report.md) · [JSON](examples/web_dev_homepage_report.json)
133150

134151
## Legal
135152

docs/BUILD_SHEET.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ Accessibility-like tree -> construction graph -> deterministic SVG blueprint ->
3232
- Date: 2026-03-27
3333
- Status: Passed
3434
- Evidence:
35-
- `.venv/bin/python -m pytest -q` -> `137 passed in 0.41s`
36-
- `.venv/bin/python -m tests.runner` -> `137 passed, 0 failed`
35+
- `.venv/bin/python -m pytest -q` -> `138 passed in 0.41s`
36+
- `.venv/bin/python -m tests.runner` -> `138 passed, 0 failed`
3737
- `.venv/bin/ruff check src tests agent` -> `All checks passed!`
3838
- `.venv/bin/python -m black --check src tests agent` -> `84 files would be left unchanged.`
3939
- `pnpm --dir web lint` -> `RADE web shell lint passed`
40-
- `pnpm --dir web test` -> `RADE web shell smoke test passed against http://127.0.0.1:56187`
40+
- `pnpm --dir web test` -> `RADE web shell smoke test passed against http://127.0.0.1:56432`
41+
- `make proof` -> `All proof gates passed.`
42+
- `make analyze` -> produces `output/modernization_report.{json,md,html}`
4143

4244
### Milestone: Three real-world fixture pack
4345

@@ -97,10 +99,11 @@ The ignored `rade-repo/` subtree remains outside canonical repo truth and should
9799
- 2026-03-22 - Implement Playwright-backed `--url` collection with ARIA snapshot parsing, semantic DOM fallback, agent-shell forwarding, and real CLI proof against `https://example.com`. Full gates pass with 122 pytest cases and 122 custom-runner cases.
98100
- 2026-03-26 - public repo alignment: created `buildrr89/rade-engine`, switched repository posture to AGPL-3.0, updated public metadata/output wording, and re-generated checked-in proof artifacts to match the new public alpha story.
99101
- 2026-03-27 - interactive HTML report: `render_html_report()` produces self-contained HTML with score bars, expandable findings/recommendations, category filters, and priority badges. `--html-output` on CLI and agent CLI. Golden fixture and 15 new tests. 137 total tests passing.
102+
- 2026-03-27 - public alpha onboarding: improved README quickstart (Makefile-first, multiline commands, HTML output), expanded CONTRIBUTING with prerequisites/quickstart/formatting/where-to-start, added `make proof` target running all 6 gates via `.venv/bin/python`, added `--html-output` to Makefile analyze and CI workflow, added checked-in HTML example for python.org, fixed README API entry point to wsgi.py. 138 total tests passing.
100103

101104
## Next immediate action
102105

103-
Build slice #16: public alpha onboarding (tighten contributor experience).
106+
Build slice #17: GitHub Action for CI/CD integration.
104107

105108
## Stop conditions
106109

docs/NEXT_EXECUTION_BACKLOG.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,12 @@
8484
- Status: implemented 2026-03-27
8585
- Result: `render_html_report()` in `src/core/report_generator.py` produces a self-contained HTML report with score-bar visualizations, expandable finding and recommendation cards, category filter buttons, priority badges, and responsive layout. `--html-output` flag added to CLI (`src/core/cli.py`) and agent CLI (`agent/cli.py`). `write_report()` and `analyze_file()` accept `html_output`. Golden fixture at `tests/golden/sample_modernization_report.html`. 14 new tests in `tests/test_html_report.py` plus 1 golden contract test in `tests/test_report_generator.py`. 137 total tests passing.
8686

87-
## Backlog
88-
8987
### 16. Public alpha onboarding
9088

91-
- Risk reduced: repository approachability (proof exists, but public readers still need a cleaner starting path)
92-
- Scope: tighten contributor onboarding, sample commands, checked-in examples, and repo-facing docs so a new reviewer can understand the proof slice quickly
93-
- Acceptance: a first-time reader can bootstrap the repo, run the proof commands, and understand what is implemented vs deferred without outside context
94-
- Does NOT include: hosted signup flows or billing
89+
- Status: implemented 2026-03-27
90+
- Result: README refactored with Makefile-first quickstart, multiline CLI commands, HTML output coverage, and corrected API entry point (`wsgi.py`). CONTRIBUTING expanded with prerequisites, clone-to-proof quickstart, formatting instructions, and where-to-start guidance. Makefile gains `make proof` target (all 6 gates via `.venv/bin/python`), `--html-output` in `make analyze`, and `*.html` in `make clean`. CI workflow updated to produce HTML output. Checked-in HTML example at `examples/python_org_homepage_report.html` with contract test. Examples section in README now links all three output formats. 138 total tests passing.
91+
92+
## Backlog
9593

9694
### 17. GitHub Action
9795

0 commit comments

Comments
 (0)