init: git all the things!
This commit is contained in:
@@ -0,0 +1,310 @@
|
||||
# AGENTS.md
|
||||
|
||||
## Project
|
||||
|
||||
This repository contains a mirrored copy of the Arizona Institute for Autism website.
|
||||
|
||||
Raw mirror source:
|
||||
|
||||
```txt
|
||||
./www.azinstitute4autism.com
|
||||
```
|
||||
|
||||
New Astro site target:
|
||||
|
||||
```txt
|
||||
./www
|
||||
```
|
||||
|
||||
The mirror was created with:
|
||||
|
||||
```sh
|
||||
wget --mirror --page-requisites --adjust-extension --convert-links --no-parent https://www.azinstitute4autism.com
|
||||
```
|
||||
|
||||
Do not modify, move, rename, or delete `./www.azinstitute4autism.com`.
|
||||
|
||||
Treat the mirror as read-only raw source material.
|
||||
|
||||
## Primary goal
|
||||
|
||||
Create a clean, maintainable Astro + TypeScript site in `./www` that reproduces the current public site as faithfully as practical while replacing HubSpot-generated structure with a future-friendly static site architecture.
|
||||
|
||||
The new site should be suitable for:
|
||||
|
||||
- static hosting
|
||||
- file-based editing
|
||||
- Front Matter CMS in VS Code
|
||||
- future blog posting
|
||||
- future Spanish and Arabic publishing
|
||||
- future Netlify, nginx, Cloudflare Pages, or Vercel deployment
|
||||
|
||||
## Stack
|
||||
|
||||
Use:
|
||||
|
||||
- Astro
|
||||
- TypeScript
|
||||
- npm
|
||||
- Markdown-first content
|
||||
- MDX only when embedded Astro/React-style components are genuinely needed
|
||||
- Astro content collections
|
||||
- Zod frontmatter validation
|
||||
- plain CSS with design tokens
|
||||
- Astro image optimization where appropriate
|
||||
|
||||
Do not use:
|
||||
|
||||
- Tailwind
|
||||
- a database
|
||||
- a headless CMS
|
||||
- HubSpot APIs
|
||||
- HubSpot CLI
|
||||
- HubSpot-hosted production assets unless unavoidable
|
||||
- a form backend
|
||||
- deployment-specific config unless explicitly requested
|
||||
|
||||
## Content strategy
|
||||
|
||||
Use file-based Markdown as the default content format.
|
||||
|
||||
Use `.md` for:
|
||||
|
||||
- normal blog posts
|
||||
- normal service pages
|
||||
- informational pages
|
||||
- author profiles
|
||||
|
||||
Use `.mdx` only for pages or posts that need embedded components.
|
||||
|
||||
The content should be structured to work well with Front Matter CMS in VS Code.
|
||||
|
||||
Use these content folders:
|
||||
|
||||
```txt
|
||||
src/content/pages/en
|
||||
src/content/pages/ar
|
||||
src/content/pages/es
|
||||
src/content/blog/en
|
||||
src/content/blog/ar
|
||||
src/content/blog/es
|
||||
src/content/authors/en
|
||||
src/content/authors/ar
|
||||
src/content/authors/es
|
||||
```
|
||||
|
||||
## Multilingual requirements
|
||||
|
||||
Support:
|
||||
|
||||
- English
|
||||
- Arabic
|
||||
- Spanish
|
||||
|
||||
English is the default language.
|
||||
|
||||
URL patterns:
|
||||
|
||||
```txt
|
||||
English:
|
||||
/
|
||||
/aba
|
||||
/autismevaluations
|
||||
/library/post-slug
|
||||
|
||||
Arabic:
|
||||
/ar
|
||||
/ar/aba
|
||||
/ar/autismevaluations
|
||||
/ar/library/post-slug
|
||||
|
||||
Spanish:
|
||||
/es
|
||||
/es/aba
|
||||
/es/autismevaluations
|
||||
/es/library/post-slug
|
||||
```
|
||||
|
||||
Arabic pages must use:
|
||||
|
||||
```html
|
||||
<html lang="ar" dir="rtl">
|
||||
```
|
||||
|
||||
English pages must use:
|
||||
|
||||
```html
|
||||
<html lang="en" dir="ltr">
|
||||
```
|
||||
|
||||
Spanish pages must use:
|
||||
|
||||
```html
|
||||
<html lang="es" dir="ltr">
|
||||
```
|
||||
|
||||
Add RTL CSS support for Arabic.
|
||||
|
||||
Do not invent large Arabic or Spanish translations unless source content is available. Use clearly marked placeholders when needed.
|
||||
|
||||
## Design rules
|
||||
|
||||
The new design should be mostly faithful to the current site while becoming more maintainable.
|
||||
|
||||
Use plain CSS with design tokens.
|
||||
|
||||
Create reusable Astro components for repeated layout sections.
|
||||
|
||||
Do not create a messy page-by-page clone of HubSpot output.
|
||||
|
||||
Favor:
|
||||
|
||||
- semantic HTML
|
||||
- reusable components
|
||||
- organized CSS
|
||||
- clear data files
|
||||
- consistent spacing
|
||||
- accessible markup
|
||||
- predictable file structure
|
||||
|
||||
## URL and SEO rules
|
||||
|
||||
Preserve existing public URL paths whenever possible.
|
||||
|
||||
Preserve or document:
|
||||
|
||||
- page title
|
||||
- meta description
|
||||
- canonical URL
|
||||
- Open Graph tags
|
||||
- Twitter card tags
|
||||
- JSON-LD/schema
|
||||
- H1
|
||||
- image alt text
|
||||
- internal links
|
||||
|
||||
Generate nginx rewrite rules only for paths that must change.
|
||||
|
||||
Do not create unnecessary redirects for paths that are preserved.
|
||||
|
||||
## Assets
|
||||
|
||||
Self-host assets wherever practical.
|
||||
|
||||
Extract and organize:
|
||||
|
||||
- images
|
||||
- SVGs
|
||||
- icons
|
||||
- fonts
|
||||
- PDFs
|
||||
- media files
|
||||
- downloads
|
||||
|
||||
Use:
|
||||
|
||||
```txt
|
||||
public/assets/images
|
||||
public/assets/fonts
|
||||
public/assets/media
|
||||
public/assets/downloads
|
||||
src/assets/images
|
||||
```
|
||||
|
||||
Use `public/assets` for content/frontmatter references.
|
||||
|
||||
Use `src/assets` for images imported into Astro components and optimized by Astro.
|
||||
|
||||
Document any remaining external asset dependencies.
|
||||
|
||||
## Forms
|
||||
|
||||
Recreate visible forms as styled static HTML.
|
||||
|
||||
Do not implement backend submission.
|
||||
|
||||
Every form must include TODO comments, for example:
|
||||
|
||||
```html
|
||||
<!-- TODO: Wire this form to Netlify Forms, a custom API endpoint, or another backend service. -->
|
||||
<!-- TODO: Add spam protection before production launch. -->
|
||||
```
|
||||
|
||||
## Likes and views
|
||||
|
||||
Preserve the AIA like/view counter conceptually.
|
||||
|
||||
Use this API base URL as the default:
|
||||
|
||||
```txt
|
||||
https://api.azinstitute4autism.com
|
||||
```
|
||||
|
||||
Do not hardcode it throughout the app.
|
||||
|
||||
Use:
|
||||
|
||||
```txt
|
||||
PUBLIC_AIA_API_BASE=https://api.azinstitute4autism.com
|
||||
```
|
||||
|
||||
Add it to `.env.example`.
|
||||
|
||||
The component must degrade gracefully when the API is unavailable.
|
||||
|
||||
## Validation
|
||||
|
||||
After meaningful changes, run:
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
When available, also run:
|
||||
|
||||
```sh
|
||||
npm run audit:links
|
||||
```
|
||||
|
||||
If a command fails, diagnose and fix it when practical.
|
||||
|
||||
If it cannot be fixed, document the issue in:
|
||||
|
||||
```txt
|
||||
reports/migration-summary.md
|
||||
```
|
||||
|
||||
## Required reports
|
||||
|
||||
Create:
|
||||
|
||||
```txt
|
||||
reports/url-inventory.csv
|
||||
reports/asset-inventory.csv
|
||||
reports/seo-audit.md
|
||||
reports/accessibility-audit.md
|
||||
reports/broken-links.md
|
||||
reports/cleanup-log.md
|
||||
reports/redirect-map.csv
|
||||
reports/nginx-rewrites.conf
|
||||
reports/migration-summary.md
|
||||
```
|
||||
|
||||
## Working style
|
||||
|
||||
Before large filesystem changes:
|
||||
|
||||
1. Inspect the mirror.
|
||||
2. Summarize the implementation plan.
|
||||
3. Proceed methodically.
|
||||
|
||||
At the end of a task, summarize:
|
||||
|
||||
- what changed
|
||||
- what works
|
||||
- what needs manual review
|
||||
- build results
|
||||
- audit results
|
||||
- unresolved issues
|
||||
|
||||
Prioritize a clean, maintainable foundation over a pixel-perfect but messy clone.
|
||||
@@ -0,0 +1,52 @@
|
||||
# Autonomous Codex
|
||||
|
||||
Use the project launcher to run Codex with the `azi4a2-autonomous` permission
|
||||
profile:
|
||||
|
||||
```sh
|
||||
./codex-auto
|
||||
```
|
||||
|
||||
For a non-interactive task:
|
||||
|
||||
```sh
|
||||
./codex-auto exec "Continue the Astro migration, verify the build and audits, and document unresolved issues."
|
||||
```
|
||||
|
||||
The launcher automatically permits non-interactive runs in this mounted
|
||||
workspace even when Codex cannot discover its Git metadata.
|
||||
|
||||
The profile:
|
||||
|
||||
- never pauses for approval
|
||||
- limits filesystem access to minimal runtime files plus this project
|
||||
- allows writes in this project
|
||||
- keeps `.codex` and `www.azinstitute4autism.com` read-only
|
||||
- permits normal Git operations, including staging and committing
|
||||
- enables live web search and outbound network retrievals
|
||||
|
||||
Outbound network access is domain-unrestricted because package installation and
|
||||
retrieval sources vary. The sandbox cannot distinguish a retrieval from another
|
||||
outbound request, so do not place secrets in project files or task prompts.
|
||||
|
||||
The profile is stored outside the workspace at:
|
||||
|
||||
```txt
|
||||
~/.codex/azi4a2-autonomous.config.toml
|
||||
```
|
||||
|
||||
Do not add `--sandbox`; legacy sandbox flags override the custom permission
|
||||
profile. Do not use `--dangerously-bypass-approvals-and-sandbox`.
|
||||
|
||||
## Verification
|
||||
|
||||
The nested setup smoke test confirmed that the project is readable and
|
||||
`~/.codex/auth.json` is not readable. In the current host session, sandboxed
|
||||
shell retrievals resolved domains but were reset by the beta network proxy.
|
||||
After launching `./codex-auto` directly, verify shell retrievals with:
|
||||
|
||||
```sh
|
||||
curl -fsS https://registry.npmjs.org/astro >/dev/null
|
||||
```
|
||||
|
||||
Live web search is separate from shell network access and remains enabled.
|
||||
@@ -0,0 +1,108 @@
|
||||
@AGENTS.md
|
||||
|
||||
# CLAUDE.md
|
||||
|
||||
## Claude Code instructions
|
||||
|
||||
This project is intended to be worked on with Claude Code.
|
||||
|
||||
Before starting the HubSpot-to-Astro migration, read:
|
||||
|
||||
```txt
|
||||
MIGRATION_BRIEF.md
|
||||
```
|
||||
|
||||
Then inspect:
|
||||
|
||||
```txt
|
||||
./www.azinstitute4autism.com
|
||||
```
|
||||
|
||||
and create the new Astro site in:
|
||||
|
||||
```txt
|
||||
./www
|
||||
```
|
||||
|
||||
Do not modify or delete:
|
||||
|
||||
```txt
|
||||
./www.azinstitute4autism.com
|
||||
```
|
||||
|
||||
## Expected workflow
|
||||
|
||||
For the migration task:
|
||||
|
||||
1. Read `AGENTS.md`.
|
||||
2. Read `MIGRATION_BRIEF.md`.
|
||||
3. Inspect the local mirror.
|
||||
4. Provide a concise implementation plan.
|
||||
5. Scaffold or update the Astro project in `./www`.
|
||||
6. Build extraction, crawl, audit, sitemap, and redirect tools.
|
||||
7. Extract content, media, metadata, navigation, and forms.
|
||||
8. Refactor into reusable Astro components.
|
||||
9. Configure Astro content collections and Front Matter CMS.
|
||||
10. Add English, Arabic, and Spanish structure.
|
||||
11. Add RTL CSS for Arabic.
|
||||
12. Add SEO, sitemap, robots, redirects, and reports.
|
||||
13. Run build and audits.
|
||||
14. Fix practical errors.
|
||||
15. Document incomplete items in `reports/migration-summary.md`.
|
||||
|
||||
## Important Claude-specific behavior
|
||||
|
||||
Do not rely on a single massive prompt if the same information already exists in `MIGRATION_BRIEF.md`.
|
||||
|
||||
When asked to begin migration, first read the relevant project files, then work from the files.
|
||||
|
||||
## Safety and preservation
|
||||
|
||||
Treat `./www.azinstitute4autism.com` as read-only source material.
|
||||
|
||||
Do not delete or overwrite raw source assets.
|
||||
|
||||
Do not remove files unless you are certain they are generated output in `./www`.
|
||||
|
||||
Do not make assumptions about form backend behavior. Forms must remain static with TODO comments.
|
||||
|
||||
Do not invent large Spanish or Arabic translations. Create placeholders only when source content does not exist.
|
||||
|
||||
## Commands
|
||||
|
||||
Use npm.
|
||||
|
||||
Expected commands after setup:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
npm run dev
|
||||
npm run build
|
||||
npm run preview
|
||||
npm run audit:links
|
||||
```
|
||||
|
||||
If any command fails, investigate and fix when practical.
|
||||
|
||||
If unresolved, document the issue in:
|
||||
|
||||
```txt
|
||||
www/reports/migration-summary.md
|
||||
```
|
||||
|
||||
## Completion summary
|
||||
|
||||
When finished, report:
|
||||
|
||||
- files and folders created
|
||||
- content migrated
|
||||
- pages and posts extracted
|
||||
- assets copied or converted
|
||||
- forms recreated
|
||||
- multilingual structure status
|
||||
- like/view counter status
|
||||
- SEO status
|
||||
- redirect status
|
||||
- build status
|
||||
- audit status
|
||||
- manual review items
|
||||
+1208
File diff suppressed because it is too large
Load Diff
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
if [[ "${1:-}" == "exec" ]]; then
|
||||
shift
|
||||
set -- exec --skip-git-repo-check "$@"
|
||||
fi
|
||||
|
||||
exec codex \
|
||||
--profile-v2 azi4a2-autonomous \
|
||||
--strict-config \
|
||||
--cd "$repo_root" \
|
||||
"$@"
|
||||
Reference in New Issue
Block a user