|
| 1 | +<!-- @format --> |
| 2 | + |
| 3 | +# TCAT Wiki - AI Coding Agent Instructions |
| 4 | + |
| 5 | +## Project Overview |
| 6 | + |
| 7 | +**TCAT Wiki** is a Material for MkDocs-based documentation site for the Taskar Center for Accessible Technology (TCAT). It hosts information, guides, and resources related to TCAT's transportation accessibility projects: **OpenSidewalks** (OSW), **Transportation Data Exchange Initiative** (TDEI), and **AccessMap**. |
| 8 | + |
| 9 | +## Architecture & Key Concepts |
| 10 | + |
| 11 | +### Single-Source Documentation Site |
| 12 | + |
| 13 | +- **Framework**: Material for MkDocs (`mkdocs.yml` orchestrates everything) |
| 14 | +- **Content**: Markdown files in `/docs` structured by topic (opensidewalks, tdei, about, guides-list) |
| 15 | +- **Navigation**: Auto-generated from directory structure via PowerShell scripts |
| 16 | +- **Custom Extensions**: YAML frontmatter titles, abbreviations auto-linking, custom CSS theming |
| 17 | + |
| 18 | +### Directory Structure Pattern |
| 19 | + |
| 20 | +``` |
| 21 | +docs/ |
| 22 | + [topic]/ |
| 23 | + index.md # Topic overview |
| 24 | + guides/ |
| 25 | + index.md # Auto-generated guide index |
| 26 | + specific-guide.md # Actual guides |
| 27 | +``` |
| 28 | + |
| 29 | +**Key insight**: Directory hierarchy directly maps to navigation structure. Nested `guides/` directories are special - use `generate-guides-lists.ps1` to auto-generate index files listing all guides in that directory. |
| 30 | + |
| 31 | +### Abbreviations System |
| 32 | + |
| 33 | +- `/includes/abbreviations.md` auto-links acronyms site-wide (e.g., OSW, TDEI, JOSM) |
| 34 | +- Add new acronyms here; they're automatically inserted into all `.md` files via MkDocs snippets plugin |
| 35 | + |
| 36 | +## Critical Developer Workflows |
| 37 | + |
| 38 | +### Build & Preview Local Site |
| 39 | + |
| 40 | +```powershell |
| 41 | +pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 |
| 42 | +pip install "mkdocs-material[imaging]" # For image optimization |
| 43 | +mkdocs serve # http://localhost:8000 |
| 44 | +``` |
| 45 | + |
| 46 | +### Regenerate Navigation After Adding Files |
| 47 | + |
| 48 | +```powershell |
| 49 | +cd util |
| 50 | +.\generate-guides-lists.ps1 # Auto-generates index.md in guides/ directories |
| 51 | +.\generate-nav.ps1 -updateMkdocs # Updates mkdocs.yml nav section directly |
| 52 | +``` |
| 53 | + |
| 54 | +**Why**: Navigation structure and guide indices aren't hand-maintained. These scripts parse `/docs` structure, extract frontmatter titles, and generate the Markdown files accordingly. Generation of the nav section of `mkdocs.yml` is done afterwards to ensure all files are included. |
| 55 | + |
| 56 | +### Validate Links |
| 57 | + |
| 58 | +```powershell |
| 59 | +cd util |
| 60 | +.\check-links.ps1 # Check internal + external links |
| 61 | +.\check-links.ps1 -internal # Internal only |
| 62 | +.\check-links.ps1 -verboseOutput # Detailed output |
| 63 | +``` |
| 64 | + |
| 65 | +## Project-Specific Conventions |
| 66 | + |
| 67 | +### Frontmatter Title Pattern |
| 68 | + |
| 69 | +Always include frontmatter titles to override auto-generated names: |
| 70 | + |
| 71 | +```yaml |
| 72 | +--- |
| 73 | +title: Actual Display Title |
| 74 | +tags: |
| 75 | + - OSW 0.3 |
| 76 | +--- |
| 77 | +``` |
| 78 | + |
| 79 | +**Note**: The `" - Guide"` tag does not need to be added to guides, as that tag is inherited from the `.meta.yml` file in that directory. |
| 80 | + |
| 81 | +**Exception**: `docs/index.md` has title commented out to prevent "TCAT Wiki - TCAT Wiki" duplication. |
| 82 | + |
| 83 | +### Markdown Conventions |
| 84 | + |
| 85 | +1. **Guide Link**: Every guide should reference the [Guides List](../docs/guides-list/index.md) via a relative path |
| 86 | +2. **Tags**: Use `tags: [Guide, OSW 0.3]` for filtering; supported tags: "Guide", "OSW 0.2", "OSW 0.3", "OSW 0.4" |
| 87 | +3. **Abbreviations**: Wrap acronyms normally (e.g., "OSW", "TDEI"); abbreviations plugin auto-links them |
| 88 | + |
| 89 | +### Organization |
| 90 | + |
| 91 | +- **opensidewalks**: OpenSidewalks schema explorer and guides, Tasking Manager guides |
| 92 | +- **tdei/consumers**: Documentation and guides for data consumers, including AccessMap and the Walkshed tool |
| 93 | +- **tdei/producers**: Documentation and guides for data producers, including Workspaces editing tools such as AVIV ScoutRoute, Rapid, and JOSM |
| 94 | +- **resources**: No content - stores images and stylesheets |
| 95 | +- **local-storage/**: Directory ignored by git, used as a storage target for temporary local files |
| 96 | +- **util**: Utilities and scripts to make editing this Wiki easier |
| 97 | + |
| 98 | +## Integration Points & Dependencies |
| 99 | + |
| 100 | +### Material for MkDocs Plugins Active |
| 101 | + |
| 102 | +- `git-revision-date-localized`: Shows creation/modification dates (UTC-7) |
| 103 | +- `git-committers`: Displays last editor info |
| 104 | +- `social`: Tags for social sharing |
| 105 | +- `search`, `tags`, `meta`, `privacy` |
| 106 | +- Markdown extensions: `pymdownx.snippets`, `pymdownx.superfences`, `admonition`, `attr_list` |
| 107 | + |
| 108 | +### Customizations |
| 109 | + |
| 110 | +- **Theme**: Custom CSS in `/resources/stylesheets/` (ensure file exists before editing) |
| 111 | +- **Overrides**: `/overrides/partials/` extends Material defaults (head.html, extra.html) |
| 112 | + |
| 113 | +## When Adding New Content |
| 114 | + |
| 115 | +1. **Create**: Add `.md` file in appropriate `/docs/[topic]/` subtree |
| 116 | +2. **Frontmatter**: Include `title:` and `tags:` if it's a guide |
| 117 | +3. **Links**: Reference guides-list and use relative paths |
| 118 | +4. **Regenerate Navigation**: Run `.\generate-nav.ps1 -updateMkdocs` from `util/` |
| 119 | +5. **Verify Build**: Run `mkdocs serve` locally before committing |
| 120 | + |
| 121 | +## Key Files for Reference |
| 122 | + |
| 123 | +- `mkdocs.yml`: Main config; nav section auto-updated by scripts |
| 124 | +- `util/generate-nav.ps1`: Builds YAML navigation tree from file structure |
| 125 | +- `util/generate-guides-lists.ps1`: Creates guide index markdown files |
| 126 | +- `util/check-links.ps1`: PowerShell validation (not standard CI integration) |
| 127 | +- `/includes/abbreviations.md`: Global acronym definitions |
| 128 | +- `/resources/stylesheets/extra.css`: Theming |
0 commit comments