|
| 1 | +<!-- |
| 2 | +Sync Impact Report |
| 3 | +=================== |
| 4 | +Version change: N/A (initial) → 1.0.0 |
| 5 | +Modified principles: N/A (all new) |
| 6 | +Added sections: |
| 7 | + - I. User Experience Excellence |
| 8 | + - II. Attention to Detail |
| 9 | + - III. Living Documentation |
| 10 | + - IV. Repository Cleanliness |
| 11 | + - V. Cross-Repository Consistency |
| 12 | + - Cross-Repository Coordination (Section 2) |
| 13 | + - Development Workflow (Section 3) |
| 14 | + - Governance |
| 15 | +Removed sections: None |
| 16 | +Templates requiring updates: |
| 17 | + - .specify/templates/plan-template.md: ✅ No updates needed (Constitution Check |
| 18 | + section is dynamically filled from this file) |
| 19 | + - .specify/templates/spec-template.md: ✅ No updates needed (user stories and |
| 20 | + acceptance scenarios already support visual-check and documentation requirements) |
| 21 | + - .specify/templates/tasks-template.md: ✅ No updates needed (Polish phase already |
| 22 | + includes documentation updates; visual checks can be added per-feature) |
| 23 | +Follow-up TODOs: None |
| 24 | +--> |
| 25 | + |
| 26 | +# Context Lab Website Constitution |
| 27 | + |
| 28 | +## Core Principles |
| 29 | + |
| 30 | +### I. User Experience Excellence |
| 31 | + |
| 32 | +Every page MUST deliver a delightful, engaging, and visually cohesive |
| 33 | +experience. This is a public-facing academic lab site — first impressions |
| 34 | +shape how prospective students, collaborators, and funders perceive the lab. |
| 35 | + |
| 36 | +- All text MUST be clear, brief, and free of jargon unless the audience |
| 37 | + is explicitly technical. |
| 38 | +- Theming MUST remain cohesive: Dartmouth green palette, Nunito Sans |
| 39 | + typography, hand-drawn border aesthetic, lowercase headings. |
| 40 | +- All pages MUST render correctly on desktop, tablet (768px), and mobile |
| 41 | + (480px) breakpoints. Test on Chrome, Firefox, Safari, and Edge. |
| 42 | +- Interactive elements (modals, dropdowns, carousels, info panel) MUST |
| 43 | + feel responsive and smooth — no layout shifts, no broken animations. |
| 44 | +- New UI features MUST be evaluated for whether they genuinely improve |
| 45 | + the visitor experience, not just add complexity. |
| 46 | + |
| 47 | +### II. Attention to Detail |
| 48 | + |
| 49 | +Every substantive change MUST be verified through comprehensive testing, |
| 50 | +including visual checks. Bugs on a live academic website erode credibility. |
| 51 | + |
| 52 | +- All changes MUST pass `python -m pytest tests/ -v` before pushing. |
| 53 | +- Visual changes MUST be verified by screenshot or manual inspection on |
| 54 | + at least desktop and mobile viewports. |
| 55 | +- The full pre-push validation (`scripts/pre_push_check.py`) MUST pass |
| 56 | + before any push to `main`. |
| 57 | +- Build output MUST be inspected: auto-generated HTML pages should be |
| 58 | + spot-checked after spreadsheet or template changes. |
| 59 | +- Link integrity MUST be maintained: no broken internal links, no dead |
| 60 | + external URLs in publications or software listings. |
| 61 | + |
| 62 | +### III. Living Documentation |
| 63 | + |
| 64 | +Documentation MUST stay synchronized with the codebase at all times. |
| 65 | +Stale docs are worse than no docs — they actively mislead. |
| 66 | + |
| 67 | +- Any functional change MUST include corresponding updates to relevant |
| 68 | + documentation (CLAUDE.md, AGENTS.md, README.md, inline comments). |
| 69 | +- Changes to the build system, scripts, or templates MUST update |
| 70 | + `scripts/AGENTS.md` and the root `AGENTS.md`. |
| 71 | +- New scripts or commands MUST be documented in CLAUDE.md under Commands. |
| 72 | +- Spreadsheet schema changes (new columns, renamed fields) MUST update |
| 73 | + the field reference in README.md and relevant AGENTS.md files. |
| 74 | +- GitHub Actions workflow changes MUST be reflected in documentation. |
| 75 | + |
| 76 | +### IV. Repository Cleanliness |
| 77 | + |
| 78 | +The repository MUST remain clean and free of private, temporary, or |
| 79 | +extraneous files. This is a public GitHub Pages repo — everything |
| 80 | +committed is visible to the world. |
| 81 | + |
| 82 | +- Passwords, API keys, tokens, and personal information MUST NEVER be |
| 83 | + committed. Credentials belong in `~/.config/cdl/` or environment |
| 84 | + variables, never in the repo. |
| 85 | +- Temporary files (screenshots, scratch scripts, debug output) MUST be |
| 86 | + deleted after use or moved to `scripts/` if reusable. |
| 87 | +- `.gitignore` MUST be maintained to exclude OS artifacts, editor files, |
| 88 | + Python caches, and any generated files not needed for the live site. |
| 89 | +- Auto-generated root HTML files (`publications.html`, `people.html`, |
| 90 | + `software.html`, `news.html`) MUST NOT be hand-edited — changes will |
| 91 | + be overwritten by the build system. |
| 92 | +- No `!important` in CSS without explicit written justification. |
| 93 | +- No inline styles in templates — use CSS classes. |
| 94 | + |
| 95 | +### V. Cross-Repository Consistency |
| 96 | + |
| 97 | +This website MUST remain consistent with the |
| 98 | +[lab-manual](https://github.com/ContextLab/lab-manual) repository. |
| 99 | +These two repos together define the lab's public and internal identity. |
| 100 | + |
| 101 | +- Personnel information (current members, alumni, roles) MUST match |
| 102 | + across both repositories. When someone is onboarded or offboarded |
| 103 | + here, the lab-manual MUST be updated accordingly (and vice versa). |
| 104 | +- Lab policies, descriptions, and research summaries that appear on |
| 105 | + both the website and the lab manual MUST NOT contradict each other. |
| 106 | +- The lab-manual repository includes a Slack bot that may programmatically |
| 107 | + update this site. Changes made by the bot MUST follow the same build |
| 108 | + pipeline (edit data/templates, rebuild, test) rather than directly |
| 109 | + editing auto-generated HTML. |
| 110 | +- When reviewing PRs that touch shared content (people, lab description, |
| 111 | + research areas), cross-check the other repository for drift. |
| 112 | + |
| 113 | +## Cross-Repository Coordination |
| 114 | + |
| 115 | +The website and lab-manual share overlapping content. To prevent drift: |
| 116 | + |
| 117 | +- **People data**: The source of truth for the website is `data/people.xlsx`. |
| 118 | + The lab-manual maintains its own member records. After onboarding or |
| 119 | + offboarding, both repos MUST be updated in the same session or PR. |
| 120 | +- **Slack bot integration**: The lab-manual Slack bot has write access to |
| 121 | + trigger updates on this site. Bot-initiated changes MUST go through |
| 122 | + the standard `data/*.xlsx` → `scripts/build.py` → test pipeline. |
| 123 | + Direct HTML edits by the bot are prohibited. |
| 124 | +- **Conflict resolution**: If information conflicts between repos, resolve |
| 125 | + by checking the authoritative source (e.g., `people.xlsx` for member |
| 126 | + data, the lab-manual for policies) and updating the stale copy. |
| 127 | + |
| 128 | +## Development Workflow |
| 129 | + |
| 130 | +All changes to the website MUST follow this workflow: |
| 131 | + |
| 132 | +1. **Edit sources, not outputs**: Modify `data/*.xlsx`, `templates/*.html`, |
| 133 | + `css/style.css`, `js/main.js`, or `documents/JRM_CV.tex` — never |
| 134 | + auto-generated root HTML or `documents/JRM_CV.html`. |
| 135 | +2. **Validate**: Run `cd scripts && python validate_data.py`. |
| 136 | +3. **Build**: Run `cd scripts && python build.py` (and `build_cv.py` if |
| 137 | + CV was changed). |
| 138 | +4. **Test**: Run `python -m pytest tests/ -v` — all tests MUST pass. |
| 139 | +5. **Visual verify**: For UI changes, serve locally (`python3 -m http.server 8000`) |
| 140 | + and check desktop + mobile viewports. |
| 141 | +6. **Document**: Update CLAUDE.md, AGENTS.md, and/or README.md if the |
| 142 | + change affects commands, architecture, or conventions. |
| 143 | +7. **Push**: Only after all above steps pass. |
| 144 | + |
| 145 | +GitHub Actions (`build-content.yml`, `build-cv.yml`) provide a safety |
| 146 | +net but are not a substitute for local validation. |
| 147 | + |
| 148 | +## Governance |
| 149 | + |
| 150 | +This constitution defines the non-negotiable standards for the Context Lab |
| 151 | +website. All contributors (human and automated) MUST comply. |
| 152 | + |
| 153 | +- **Precedence**: This constitution supersedes ad-hoc practices. When in |
| 154 | + doubt, follow the principles above. |
| 155 | +- **Amendments**: Changes to this constitution require updating this file, |
| 156 | + incrementing the version (MAJOR for principle removals/redefinitions, |
| 157 | + MINOR for additions/expansions, PATCH for clarifications), and updating |
| 158 | + dependent artifacts if affected. |
| 159 | +- **Compliance review**: PRs SHOULD be checked against these principles |
| 160 | + before merging. The pre-push check script enforces the testable subset. |
| 161 | +- **Runtime guidance**: See `CLAUDE.md` for day-to-day development commands |
| 162 | + and conventions. This constitution governs *why*; CLAUDE.md governs *how*. |
| 163 | + |
| 164 | +**Version**: 1.0.0 | **Ratified**: 2026-03-23 | **Last Amended**: 2026-03-23 |
0 commit comments