You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: consolidate contributor and architecture guidance (#897)
## Summary
- consolidate contributor, agent, and design guidance into a single
canonical docs structure
- slim down top-level entrypoints and redirect agent instructions to the
canonical docs set
- add architecture and request-lifecycle documentation for faster
onboarding
## Verification
- docker compose -f .devcontainer/docker-compose.yml run --rm app make
setup
- docker compose -f .devcontainer/docker-compose.yml run --rm app make
ready
This repository uses a centralized documentation structure. All AI agents (including Copilot, Gemini CLI, etc.) must follow the constraints and rules defined in the following files:
4
4
5
-
- Ruby web app that converts websites into RSS 2.0 feeds.
6
-
- Built with **Roda** backend + **Preact** frontend, using the **html2rss** gem (+ `html2rss-configs`).
7
-
-**Frontend:** Vite-built Preact UI, served alongside Ruby backend.
5
+
## Canonical Documentation
8
6
9
-
## Documentation website of core dependencies
7
+
-**Agent Constraints**: [AGENTS.md](../AGENTS.md) (Execution rules, verification, and UI principles)
8
+
-**Contributor Guide**: [docs/README.md](../docs/README.md) (Architecture, security, setup, and coding style)
9
+
-**Design System**: [docs/design-system.md](../docs/design-system.md) (Visual and CSS rules)
10
10
11
-
Search these pages before using them. Find examples, plugins, UI components, and configuration options.
11
+
## Quick Reference for Agents
12
12
13
-
### Roda
14
-
15
-
1.https://roda.jeremyevans.net/documentation.html
16
-
17
-
### Preact & Vite
18
-
19
-
1.https://preactjs.com/guide/v10/getting-started/
20
-
2.https://vite.dev/guide/
21
-
22
-
### html2rss
23
-
24
-
1. If available, find source locally in: `../html2rss`.
25
-
2. source code on github: https://github.com/html2rss/html2rss
This document defines execution constraints for AI agents. For general contributor rules, setup commands, architectural constraints, and security policies, see [docs/README.md](docs/README.md).
**DoD:**`make ready` in Dev Container; if applicable, user completes manual smoke test with agent-provided steps.
44
-
**Verification:** Always smoke Dev Container + `make ready`.
45
-
**Commits:** Group by logical unit after smoke-tested (feature / improvement / refactor).
46
-
**Responses:** Changes → Commands → Results → Next steps, ending with a concise one-line summary.
47
-
**KISS vs Refactor:** KISS by default; boy-scout refactors allowed if low-risk and simplifying.
48
-
**Ambiguity:** Proceed with safest assumption, then confirm.
49
-
**Non-negotiables:** Dev Container only; security first.
50
-
51
-
Expert recommendation: keep workflows terminal-first and keyboard-focused (clear commands, no GUI-only steps).
7
+
-**DoD:**`make ready` in Dev Container; if applicable, user completes manual smoke test with agent-provided steps.
8
+
-**Verification:** Always smoke Dev Container + `make ready`.
9
+
-**Commits:** Group by logical unit after smoke-tested (feature / improvement / refactor).
10
+
-**Responses:** Changes → Commands → Results → Next steps, ending with a concise one-line summary.
11
+
-**KISS vs Refactor:** KISS by default; boy-scout refactors allowed if low-risk and simplifying.
12
+
-**Ambiguity:** Proceed with safest assumption, then confirm.
13
+
-**Non-negotiables:** Dev Container only; security first.
52
14
53
-
## Definition of Done
54
-
55
-
- Run `make ready` inside the Dev Container.
56
-
- If applicable, user completes manual smoke test; agent provides clear instructions.
57
-
58
-
## Verification Rules
15
+
## Agent-Specific Verification Rules
59
16
60
17
- Always run Dev Container smoke + `make ready` for changes.
18
+
- For frontend changes, also verify in `chrome-devtools` MCP at `http://127.0.0.1:4001/` while the Dev Container is running.
19
+
- Capture a quick state check for all affected UI states (e.g., guest/member/result) to enforce state parity and avoid duplicate actions.
61
20
62
-
##Commit Granularity
21
+
### Frontend Smoke Checklist
63
22
64
-
- Group commits by logical units after they have grown and been smoke-tested (feature / improvement / refactor).
23
+
- Start the Dev Container and app (`make dev`).
24
+
- Open `http://127.0.0.1:4001/` with `chrome-devtools` MCP.
25
+
- Validate the primary user path touched by the change.
26
+
- Verify all affected states (e.g., guest/member/result) keep the same layout grammar.
27
+
- Confirm action uniqueness: one canonical control per outcome in each state.
65
28
66
-
## Response Format
29
+
## UI Execution Principles
67
30
68
-
- Default: Changes → Commands → Results → Next steps.
69
-
- End with a concise one-line summary.
31
+
See [docs/design-system.md](docs/design-system.md) for visual rules.
70
32
71
-
## KISS vs Refactor
33
+
-**Task Dominance:** Each UI state should make one user objective obvious and primary. Supporting surfaces and links must yield priority.
34
+
-**Copy Minimalism:** Remove text that repeats what the interface already communicates. Prefer action-oriented wording.
35
+
-**State Skeleton:** Adjacent UI states should read as the same frame with content changes, not as separate pages.
36
+
-**Focus Contract:** Verify browser autofocus and return-focus behavior on initial load and after transitions.
37
+
-**Support Compression:** When a user has advanced past setup, reduce the visual weight of support content.
72
38
73
-
- KISS by default.
74
-
- Boy-scout refactors are allowed when they reduce complexity and are low-risk.
75
-
76
-
## Ambiguity Handling
39
+
## Response Format
77
40
78
-
- Proceed with the safest assumption, then confirm.
41
+
1.**Changes:** Briefly list files/symbols modified.
42
+
2.**Commands:** Show the verification commands run.
43
+
3.**Results:** Summarize the outcome.
44
+
4.**Next steps:** Propose the immediate follow-up.
45
+
5.**One-line Summary:** End with a concise summary.
79
46
80
47
## Non-Negotiables
81
48
82
-
- Security first.
83
-
- YARD docs are strict for public Ruby methods in `app/`: every public method must have a YARD docstring with typed `@param`tags (for all params) and typed `@return`.
84
-
-When touching non-public methods, add YARD docs when it improves maintenance or clarifies invariants/edge handling.
49
+
-**Security first:** No leaking secrets or insecure patterns. See [Security & Safety Rules](docs/README.md#security--safety-rules).
50
+
-**YARD docs:** Strict for public Ruby methods in `app/`. Every public method must have a YARD docstring with typed `@param` and `@return`. See [Architectural Constraints](docs/README.md#architectural-constraints).
51
+
-**No host execution:** All commands MUST run inside the Dev Container via `make` or `bundle exec`.
-`http://localhost:4000/microsoft.com/azure-products.rss` for a built-in Azure updates feed
45
+
46
+
This trial run is intentionally minimal. Use Docker Compose for Browserless, auto-updates, or local feed overrides.
47
+
41
48
## Deploy (Docker Compose)
42
49
43
50
1. Generate a key: `openssl rand -hex 32`.
@@ -46,73 +53,12 @@ curl -X POST "https://your-domain.com/api/v1/feeds" \
46
53
47
54
UI + API run on `http://localhost:4000`. The app exits if the secret key is missing.
48
55
49
-
## Development (Dev Container)
56
+
## Development
50
57
51
58
Use the repository's [Dev Container](.devcontainer/README.md) for all local development and tests.
52
59
Running the app directly on the host is not supported.
53
60
54
-
Quick start inside the Dev Container:
55
-
56
-
```
57
-
make setup
58
-
make dev
59
-
make test
60
-
make ready
61
-
make yard-verify-public-docs
62
-
bundle exec rubocop -F
63
-
bundle exec rspec
64
-
make openapi
65
-
```
66
-
67
-
Dev URLs: Ruby app at `http://localhost:4000`, frontend dev server at `http://localhost:4001`.
68
-
69
-
Backend code under the `Html2rss::Web` namespace now lives under `app/web/**`, so Zeitwerk can mirror constant paths directly instead of relying on directory-specific namespace wiring.
70
-
`make ready` also runs `rake zeitwerk:verify`, which eager-loads the app and fails on loader drift early.
71
-
For contributors and AI agents changing backend structure, follow the rules in [docs/README.md](docs/README.md).
0 commit comments