5.2 KiB
Cangjie Skill Website MVP Implementation Plan
For Claude: REQUIRED SUB-SKILL: Use executing-plans to implement this plan task-by-task.
Goal: Build a minimal, functional static website that teaches Skill usage, exposes the current Skill Pack registry, supports search and filtering, and generates GitHub-native submissions for external repositories or local Skill folders.
Architecture: Add an Astro static site under website/ and keep structured catalog data under the repository-level registry/. Build-time Node scripts validate YAML entries with JSON Schema and generate all pages without a runtime database. Client JavaScript is limited to search, copy actions, form persistence, local folder validation, and submission bundle generation.
Tech Stack: Astro 7, TypeScript, Vitest, js-yaml, Ajv, Fuse.js, JSZip, GitHub Actions, GitHub Pages.
Task 1: Scaffold the Astro application and test harness
Files:
- Create:
website/package.json - Create:
website/astro.config.mjs - Create:
website/tsconfig.json - Create:
website/vitest.config.ts - Create:
website/src/env.d.ts
Steps:
- Define production and development scripts for registry validation, tests, Astro checks, builds, and preview.
- Install pinned dependencies and generate
website/package-lock.json. - Add a smoke unit test proving Vitest is operational.
- Run
npm testand confirm PASS.
Task 2: Define and seed the Registry
Files:
- Create:
schemas/registry-entry.schema.json - Create:
registry/<slug>/entry.yamlfor all 22 current Packs. - Create:
website/scripts/validate-registry.mjs - Create:
website/src/lib/catalog.ts - Test:
website/src/lib/catalog.test.ts
Steps:
- Write tests for loading entries, rejecting duplicate slugs, and computing 22 Packs / 300 Skills.
- Run the tests and confirm they fail before the loader exists.
- Implement the schema, YAML loader, validation script, and catalog statistics.
- Seed the 22 entries currently listed in
README.md. - Run
npm run validate:registryandnpm test; both must pass.
Task 3: Build shared layout and the homepage
Files:
- Create:
website/src/layouts/BaseLayout.astro - Create:
website/src/components/Header.astro - Create:
website/src/components/Footer.astro - Create:
website/src/components/PackCard.astro - Create:
website/src/styles/global.css - Create:
website/src/pages/index.astro
Steps:
- Implement accessible header, footer, skip link, buttons, cards, and responsive content container.
- Render Hero, computed stats, three-step usage explanation, six featured Packs, and submission CTA.
- Use restrained white/ink styling with one accent and no visual dependencies.
- Run Astro checks and build.
Task 4: Build tutorial, library, and Pack detail pages
Files:
- Create:
website/src/data/platforms.ts - Create:
website/src/pages/learn.astro - Create:
website/src/pages/skills/index.astro - Create:
website/src/pages/skills/[slug].astro
Steps:
- Implement verified/experimental platform guidance and copyable install paths.
- Render the complete Pack list with search text and filter metadata.
- Add client-side search, source filter, domain filter, quality filter, reset, count, and empty state.
- Generate one static detail page per Pack with metadata, use cases, install guidance, and GitHub link.
- Run tests, Astro checks, and build.
Task 5: Implement submission generation and local validation
Files:
- Create:
website/src/lib/submission.ts - Test:
website/src/lib/submission.test.ts - Create:
website/src/pages/submit.astro
Steps:
- Write tests for slug normalization, YAML generation, missing fields, frontmatter parsing, and secret detection.
- Implement pure submission utilities until tests pass.
- Build a five-step form supporting
externalandbundledmodes. - Persist form values locally, preview generated YAML, and provide copy/download actions.
- For local folders, validate client-side and generate a ZIP containing
entry.yamlplus the Skill folder. - Provide GitHub create-file/fork instructions without storing credentials.
- Run tests, Astro checks, and build.
Task 6: Add contribution guidance and CI
Files:
- Create:
CONTRIBUTING.md - Create:
.github/PULL_REQUEST_TEMPLATE.md - Create:
.github/workflows/website-ci.yml - Create:
.github/workflows/deploy-pages.yml
Steps:
- Document external and bundled submission structures.
- Add a PR checklist for provenance, license, tests, and secrets.
- Add read-only pull request CI that validates Registry data, runs tests/checks, and builds the site without executing contributed scripts.
- Add GitHub Pages deployment from
mainwith the repository base path. - Validate workflow YAML structure by inspection and run the same CI commands locally.
Task 7: End-to-end verification
Files:
- Modify only files required to fix verification findings.
Steps:
- Run
npm run validate:registry. - Run
npm test. - Run
npm run check. - Run
npm run build. - Start the local site and verify every route returns 200.
- Capture desktop and mobile screenshots, inspect hierarchy, overflow, form states, and empty search state.
- Fix all visible or functional defects and rerun the complete verification set.