Website skill: procedure
This skill makes one client website from one brief. Each client gets one approved plan, one code base and one check script. The approved plan controls the routes, the titles, the descriptions, the headings and the sitemap.
In this document, <skill-dir> is the folder that contains this file, and <client-folder> is the folder for this client. If the user has no folder convention, use clients/<client>/.
Preliminary requirements
- Read the notes for this client, if they exist. Give the user the rules that apply, in 2 or 3 lines.
- Find the brief, the company profile, the logo and the photos.
- Make sure that Node.js, Python 3 and
rsyncare available.
WARNING: DO NOT PUT A FACT ON THE SITE IF THE BRIEF DOES NOT GIVE IT. AN INVENTED CERTIFICATE, CLIENT NAME, FIGURE OR TESTIMONIAL IS A LEGAL AND TRUST RISK FOR THE CLIENT.
Phase 1: Facts
- Read
references/brief-intake.md. - Read each source file in full.
- Write
<client-folder>/site-brief/facts.md. - Crawl the current site if the client has one. Record each URL for the redirect map.
- Write
<client-folder>/site-brief/questions-for-client.mdif facts are missing.
GATE 1. Show the user the facts sheet summary and the list of gaps. Stop until the user replies. Continue with gaps only if the user agrees. A page that needs a missing fact stays out of the plan, or it stays without that fact.
Phase 2: Site plan
- Read
references/site-plan.md. - Do the keyword research for the market of the client.
- Copy
<skill-dir>/assets/site-plan.template.jsonto<client-folder>/site-brief/site-plan.json. - Fill in one entry for each page.
- Compare the plan with the proposal, if one exists. Each item in the scope must have a page or a feature. A form in the scope needs
serverhosting, or an agreed replacement. - Run the plan gate. Correct each FAIL.
python3 <skill-dir>/scripts/site_gate.py plan <client-folder>/site-brief/site-plan.json
GATE 2. Show the user a table with these columns: URL, primary keyword, monthly volume, title. Also state the hosting choice. Stop until the user approves. Then write the approval in the plan as "approved_by" and "approved_on". The build gate fails without these fields.
Phase 3: Scaffold
- Select the folder
<client-folder>/website/. - Run the scaffold script. The script works with spaces and capital letters in the path.
bash <skill-dir>/scripts/scaffold.sh "<client-folder>/website" static
- Use
serverin place ofstaticonly if the plan needs a server feature (seereferences/launch.md). - Copy the approved
site-plan.jsontosrc/lib/site-plan.json. - Replace each
__FILLvalue insrc/lib/site.tswith a value from the facts sheet. - Read the guides for metadata, images, fonts and static exports in
node_modules/next/dist/docs/01-app/.
NOTE: Next.js changes between major versions. The guides in node_modules match the installed version. Your training data does not.
Phase 4: Design direction
- Read
references/design-and-copy.md. - Make the color and type tokens from the logo. Put them in
globals.css. - Make
public/logo.webp,public/og.webp(1200 by 630 pixels) andsrc/app/icon.pngfrom the logo. - Build the header, the footer and the home page only.
- Start the preview. Use
npx serve out -l 3210for a static site, after a build. Usenpm run devfor a server site. - Open
http://127.0.0.1:3210in a browser. Check the page at 375, 768 and 1280 pixels.
NOTE: An embedded browser can return HTTP 431 for localhost. The address 127.0.0.1 does not have this fault.
GATE 3. Show the user the home page. Stop until the user approves the design. All other pages use this design.
CAUTION: DO NOT BUILD THE OTHER PAGES BEFORE GATE 3. A LATE DESIGN CHANGE CAUSES A MIGRATION OF ALL PAGES.
Phase 5: Pages
- Read
references/seo-build-spec.md. - Put content in typed data files in
src/lib/(for exampleservices.ts). Keep the page files thin. - Use one dynamic route with
generateStaticParamsfor each repeated page type. - Get each title, description and H1 from the plan with
pageMetadata()andgetPage(). - Write the copy for the buyer, in the voice of the client. Use only facts from
facts.md. - Add internal links as the spec gives.
- Build the site.
npm run build
- Run the build gate. Correct each FAIL at its cause. Do not change the gate to get a pass.
python3 <skill-dir>/scripts/site_gate.py build <client-folder>/website
- Run
npx tsc --noEmitandnpm run lint.
Phase 6: Review
- Check each page type in the browser at 375, 768 and 1280 pixels.
- Check each CTA: phone, WhatsApp, email and form.
- If the user requires it, prepare the page copy for the client in one document. Follow
references/design-and-copy.md. - Deploy a preview only when the user tells you to. A preview build is not indexable.
GATE 4. Give the user the preview URL and the gate result. Stop until the user approves the launch.
Phase 7: Launch
- Read
references/launch.md. - Build with
SITE_INDEXABLE=1. - Run the build gate with
--release. The gate must pass. - Do the launch steps in
references/launch.md.
WARNING: DO NOT CONNECT THE DOMAIN OR PUSH TO PRODUCTION WITHOUT AN APPROVAL IN THE CURRENT SESSION. THE LIVE DOMAIN AFFECTS THE BUSINESS OF THE CLIENT.
Closeout
- Give the user a list of the client actions that remain.
- Record paths, decisions and lessons in the notes for this client.
- Tell the user that the site is ready for SEO content work.
Fixed rules
| Rule | Reason |
|---|---|
| One URL for each service | A one-page site gives a service no URL that can rank |
| One primary keyword for each URL | Two pages on one keyword compete with each other |
| The plan is the only source for titles and routes | The gate compares the built HTML with the plan |
| No animated stat counters | The HTML shows 0 before the script runs |
| Gates are scripts | Each fault that the scripts catch got past a person first |
References
| File | Read it in |
|---|---|
references/brief-intake.md | Phase 1 |
references/site-plan.md | Phase 2 |
references/design-and-copy.md | Phase 4 and Phase 6 |
references/seo-build-spec.md | Phase 5 |
references/launch.md | Phase 2 (hosting) and Phase 7 |