🌐 FORGE — Agentic Web Builder
One night, three identical failures: organ_proxy.py (code), 999/index.html
(doctrine), static/wealth.html (renderer output) — all lived ONLY in the
deployed tree, all destroyed or nearly destroyed by deploys. This skill is
the metabolized scar. Nothing generated lives only in the deployed tree.
2026-07-30: Stop inventory cosplay. Humans → /missions. Agents →
web_zen.py doctor before inventing a new deploy path.
The One Law
VERSION CONTROL FIRST. LIVE TREE SECOND.
If a file must exist on a public site, it must exist in git first.
rsync --delete is an executioner — anything not in source is sentenced.
Capability ≠ authority. Ephemeral tools die. Permission stays with arifOS/Arif.
OP 0 — DOCTOR (always first · anti-chaos)
python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py doctor
| Mode |
Band |
Purpose |
sense |
GREEN |
source/live, Caddy missions routes, commodity :3456–3458 |
verify |
GREEN |
content-truth crawl (SPA checks JS bundle, not shell HTML only) |
orphan |
YELLOW |
dry-run rsync --delete — fail closed if deletes listed |
ephemeral |
GREEN |
generate → test → destroy disposable script (no secrets) |
caddy-reload-hint |
ORANGE |
systemd reload often fails NAMESPACE — use in-process caddy reload |
README: /root/arif-fazil.com/scripts/web-zen/README.md
Human cockpit: https://arif-fazil.com/missions · Machine: /missions.json
MCP: forge_web_zen(mode=doctor) · Kernel: arif_route(mission_id=…)
Caddy reload: systemctl reload caddy (PrivateTmp=false fixed 2026-07-30)
Known failure → fix (do not re-diagnose from zero)
| Symptom |
Cause |
Fix |
/missions 404 |
not in Caddy @spa_routes |
add /missions*; caddy validate; /usr/bin/caddy reload --config /etc/caddy/Caddyfile --force |
/missions.json 404 |
not in @root_static |
add path; reload as above |
| VITALS proxies UNAVAILABLE |
gold/oil/gas API down |
systemctl start gold-api oil-api gas-api (not API keys) |
systemctl reload caddy fail NAMESPACE |
host /tmp mount bug |
in-process caddy reload (above) |
| Doctor fails SPA markers |
checking HTML shell only |
web_zen reads live /assets/index-*.js |
OP 1 — DEPLOY (canonical path)
Canonical source: /root/arif-sites/sites/ → built/synced to /var/www/html/<site>/
Canonical script: /var/www/html/deploy-vps.sh (mirrored in repo root)
Pre-deploy checklist (mandatory):
cp -a /var/www/html /root/backups/www-html-$(date +%Y%m%d)-pre-<reason> — snapshot BEFORE mutation. Tonight this snapshot saved two restores.
- Orphan detection — before any
rsync --delete, list what will die:rsync -avzn --delete SRC/ DEST/ | grep '^deleting' | head -50
Any file you don't recognize = HOLD. Either seed it into source or quarantine it.
- Verify the deploy script covers the site you're touching (oil/gas/gold/mcp/well were missing until 2026-07-23 — check
grep <site> deploy-vps.sh).
- Post-deploy: run OP 2 audit on affected hosts. "Deployed" ≠ "live". Verified = live.
Host → source map:
| Host |
Live root |
Source |
| arif-fazil.com |
/var/www/html/arif |
sites/arif-fazil.com (build → dist → rsync) |
| aaa |
/var/www/html/aaa |
sites/aaa.arif-fazil.com |
| arifos / geox / wealth |
/var/www/html/ |
sites/.arif-fazil.com |
| mcp |
/var/www/html/mcp |
sites/mcp.arif-fazil.com (rsync, no --delete — .well-known live assets) |
| well |
/var/www/html/well |
sites/well.arif-fazil.com (llms.txt only) |
| /oil /gas /gold (apex paths) |
/var/www/html/{oil,gas,gold} |
dist/{oil,gas,gold} — exclude live api/ + vendor/ |
OP 2 — AUDIT (full-crawl methodology)
74-URL method, proven 2026-07-23. Evidence dir pattern:
/root/A-FORGE/forge_work/<date>/site-audit/
- Enumerate hosts:
grep -oE "^[a-z0-9.-]+\.arif-fazil\.com \{" /etc/caddy/Caddyfile | sort -u
- Enumerate pages: sitemap.xml
<loc> entries + Caddy @spa_routes path list + every handle target + static handles (@root_static).
- Probe each:
curl -s -o body -w "%{http_code}|%{size_download}" -L url. 0-byte 404 = catch-all respond; 17-byte 404 = explicit respond directive. Both are failures for content pages.
- Content truth, not status codes — a 200 with wrong content is a lie (F2):
- /000 → BLAKE3 identity hash present
- /999 → §8 Audit Path + grandfather rule
- /economics → F2 bands + VOID tiles (patched renderer, not SPA shell)
- dashboards → price/commodity markers
- /data/wealth/latest.json → fresh date
- Dual-lane bot surfaces (makcikgpt): test with bot UA (
GPTBot/1.0, curl/x) AND browser UA (Mozilla + Accept: text/html). Bot lane serves .md/.html from makcikgpt-md/; browser lane gets SPA. Both must 200.
- 404 triage: file missing from live tree? handler missing from Caddy? matcher gap (
@root_static list)? file never built (pre-existing gap — label it, don't fake-fix)?
OP 3 — REPAIR (source/live convergence)
The drift detector for deployed content:
diff -rq <snapshot-or-source>/ <live>/ | grep "^Only in"
- "Only in live" = orphan. Seed into
public/ (survives build) → commit → redeploy. Never hand-edit live-only.
- "Only in source" = deploy gap. Check deploy script covers it.
- Dual-copy divergence (e.g.
999/index.html vs public/999/index.html): converge to one canonical, sync, commit. Both copies must carry both truths.
- Nested-dir restore error (
cp -a src dst when dst exists → dst/src): verify with ls dst after every restore; flatten with cp -a dst/src/. dst/ then mv dst/src quarantine/.
- Never
rm -rf — F1 tripwire will (correctly) block. Quarantine: mkdir -p /root/backups/quarantine-<date> && mv target quarantine-<date>/.
- Caddy edits: python exact-string patch →
caddy validate → systemctl reload → verify affected URLs. Backup exists at /etc/caddy/Caddyfile.bak.*. Reload is T3-class: only under sovereign directive or incident repair with immediate verification.
OP 4 — SEAL (evidence discipline)
- Prefer
web_zen.py doctor --json receipt under forge_work/<date>/web-zen/.
- Crawl data (
results.tsv), URL list, truth-check output → forge_work/<date>/site-audit/AUDIT-REPORT.md.
- Source commits BEFORE seal (seal references commit hashes, not intentions).
forge_vault(mode="seal") with: scope, pass count, content-truth table, gaps closed, commits, skill.
- Session-end: one seal, not two. F4.
OP 6 — AUDIT · SITE CONSTITUTION LANES (SEAL 2026-08-09)
python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py audit
Four lanes — Lane A = existing doctor/verify (technical). Lane B = navigation
(crawl; canon/trust/observatory/organs reachable ≤3 clicks from landing → else FAIL_NAVIGATION;
SPA-aware: routes live in JS bundle). Lane C = visual surface (h1/nav/content mass →
FAIL_VISUAL). Lane D = attention cost (human markers vs jargon → HALT if a page can't
answer What/Why/Care; redirect stubs score their destination).
Mandatory read before ANY mutation of the constellation:
/root/arif-fazil.com/SITE_CONSTITUTION.md — RULE 1–6 (human understanding > protocol
exposure; navigation clarity > feature growth; visual coherence > cleverness; agent
surfaces secondary; every page answers What/Why/Care; no new surface before auditing).
/root/arif-fazil.com/SITE_IDENTITY.md — what is sacred (the human, the motive, the
motto, the system line, the visual identity, the canon, MakcikGPT, the organs).
- Both also live at
https://arif-fazil.com/SITE_CONSTITUTION.md and
https://arif-fazil.com/SITE_IDENTITY.md (public/ copies, served to agents).
Deploy gate: deploy-vps.sh runs web_zen.py audit after truth verification.
human_clarity: required: true is a build artifact. FAIL = no deploy.
OP 5 — EPHEMERAL TOOL GENESIS (capability ≠ authority)
python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py ephemeral \
--task "mission gap: why needed" \
--code-file /path/to/temp_tool.py
Loop: gap → search existing → reuse → generate → sandbox test → invoke → verify → destroy → promote only if repeated + human-approved.
GREEN: parsers, converters, disposable analysis. RED never self-grant: secrets, production deploy, persistent MCP, force-push, Caddy authority, payments. No arif_create_random_tool — modes under forge only.
Anti-patterns (each cost real breakage)
- ❌
rsync --delete without orphan preview — destroyed 36 files 2026-07-23
- ❌ "Deployed" claimed without crawl verification — 7 landing pages were 404
- ❌ Generated content living only in live tree — organ_proxy/999/wealth.html
- ❌ Hand-editing live tree to "fix" — fix source, redeploy
- ❌ Status-200 audit without content grep — SPA soft-404 lies
- ❌
rm -rf for cleanup — quarantine instead
- ❌ Advertising 128 tools as intelligence — six missions + Canonical 8
- ❌ Skipping
web_zen.py doctor and reinventing the deploy path every session
DITEMPA BUKAN DIBERI.
🛑 Sovereign Execution Constraints (arifOS CAP)
Injected 2026-08-20 by FI-003 (Qwen Code) under F13 "execute all" directive.
Backup: /root/backups/skill-backup-20260820-pre-sovereign-injection/
Derived from: Grammar Doctrine §10, Nusantara AI Paradox (MakcikGPT), BBB dataset, Nusantara Validator.
Before executing this web operation, the agent MUST enforce the following constraints:
Corpus Priority (Paradoks 1): If the topic touches regional identity, politics, or history, the agent must check for sovereign corpus availability first. If corpus is available, route there. If not, proceed with external search BUT flag the output as UNVALIDATED_CORPUS and require Nusantara rubrik evaluation before publication.
BM Token Optimization (Paradoks 2): When ingesting Bahasa Melayu web content, the agent must employ semantic caching and strict context chunking to manage the 1.5x–2.0x token penalty (register-dependent: formal BM ≈ 1.5x, dialect/loghat ≈ 2.0x). Do not load raw HTML into the context window.
Falsification Gate (Paradoks 3): All synthesized outputs touching regional identity, politics, history, or cultural narrative must be evaluated against the Nusantara 3-Tier Rubrik (GAGAL/LULUS/KUAT). Outputs classified as GAGAL are rejected and halted. Outputs on non-contested topics (data, technical, commodity) proceed but carry a CORPUS_UNTESTED epistemic label.
Rubric reference: huggingface.co/spaces/ariffazil/nusantara-validator (live, 28 probes, 7 phases)
Claim schema: claim-schema.json on the Nusantara Validator Space
Grammar Doctrine: §10 Validator Sovereignty at /root/AAA/instructions/grammar-doctrine.md
1---2name: forge-agentic-web-builder3description: Use when building, deploying, auditing, or repairing arif-fazil.com constellation and federation agentic web apps. Use when building, deploying, auditing, or repairing arif-fazil.com constellation and federation agentic web apps. Build, deploy, audit, and repair arif-fazil.com constellation sites autonomously. Class-level umbrella: DOCTOR (web_zen CLI), DEPLOY, AUDIT, REPAIR, SEAL, EPHEMERAL. Humans use six missions — not tool menus. USE WHEN: "deploy site", "site down", "audit all pages", "404 on arif-fazil.com", "deploy-vps.sh", "makcikgpt broken", "web zen", "missions 404", "vitals proxies", "rsync --delete", "ephemeral tool". DO NOT USE FOR: Caddy SSL/DNS/tunnel (FORGE-infra-guardian), LLM SEO (AGI-web-optimization), generic CI/CD (FORGE-cicd-docker-deploy).4---56# 🌐 FORGE — Agentic Web Builder78> One night, three identical failures: `organ_proxy.py` (code), `999/index.html`9> (doctrine), `static/wealth.html` (renderer output) — all lived ONLY in the10> deployed tree, all destroyed or nearly destroyed by deploys. This skill is11> the metabolized scar. **Nothing generated lives only in the deployed tree.**12>13> **2026-07-30:** Stop inventory cosplay. Humans → `/missions`. Agents →14> `web_zen.py doctor` before inventing a new deploy path.1516## The One Law1718```19VERSION CONTROL FIRST. LIVE TREE SECOND.20If a file must exist on a public site, it must exist in git first.21rsync --delete is an executioner — anything not in source is sentenced.22Capability ≠ authority. Ephemeral tools die. Permission stays with arifOS/Arif.23```2425---2627## OP 0 — DOCTOR (always first · anti-chaos)2829```bash30python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py doctor31```3233| Mode | Band | Purpose |34|------|------|---------|35| `sense` | GREEN | source/live, Caddy missions routes, commodity :3456–3458 |36| `verify` | GREEN | content-truth crawl (SPA checks JS bundle, not shell HTML only) |37| `orphan` | YELLOW | dry-run `rsync --delete` — fail closed if deletes listed |38| `ephemeral` | GREEN | generate → test → destroy disposable script (no secrets) |39| `caddy-reload-hint` | ORANGE | systemd reload often fails NAMESPACE — use in-process `caddy reload` |4041README: `/root/arif-fazil.com/scripts/web-zen/README.md` 42Human cockpit: `https://arif-fazil.com/missions` · Machine: `/missions.json` 43MCP: `forge_web_zen(mode=doctor)` · Kernel: `arif_route(mission_id=…)` 44Caddy reload: `systemctl reload caddy` (PrivateTmp=false fixed 2026-07-30)4546### Known failure → fix (do not re-diagnose from zero)4748| Symptom | Cause | Fix |49|---------|-------|-----|50| `/missions` 404 | not in Caddy `@spa_routes` | add `/missions*`; `caddy validate`; `/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force` |51| `/missions.json` 404 | not in `@root_static` | add path; reload as above |52| VITALS proxies UNAVAILABLE | gold/oil/gas API down | `systemctl start gold-api oil-api gas-api` (not API keys) |53| `systemctl reload caddy` fail NAMESPACE | host /tmp mount bug | in-process caddy reload (above) |54| Doctor fails SPA markers | checking HTML shell only | web_zen reads live `/assets/index-*.js` |5556---5758## OP 1 — DEPLOY (canonical path)5960Canonical source: `/root/arif-sites/sites/` → built/synced to `/var/www/html/<site>/`61Canonical script: `/var/www/html/deploy-vps.sh` (mirrored in repo root)6263**Pre-deploy checklist (mandatory):**641. `cp -a /var/www/html /root/backups/www-html-$(date +%Y%m%d)-pre-<reason>` — snapshot BEFORE mutation. Tonight this snapshot saved two restores.652. **Orphan detection** — before any `rsync --delete`, list what will die:66 ```bash67 rsync -avzn --delete SRC/ DEST/ | grep '^deleting' | head -5068 ```69 Any file you don't recognize = HOLD. Either seed it into source or quarantine it.703. Verify the deploy script covers the site you're touching (oil/gas/gold/mcp/well were missing until 2026-07-23 — check `grep <site> deploy-vps.sh`).714. Post-deploy: run OP 2 audit on affected hosts. "Deployed" ≠ "live". Verified = live.7273**Host → source map:**74| Host | Live root | Source |75|---|---|---|76| arif-fazil.com | /var/www/html/arif | sites/arif-fazil.com (build → dist → rsync) |77| aaa | /var/www/html/aaa | sites/aaa.arif-fazil.com |78| arifos / geox / wealth | /var/www/html/<organ> | sites/<organ>.arif-fazil.com |79| mcp | /var/www/html/mcp | sites/mcp.arif-fazil.com (rsync, no --delete — .well-known live assets) |80| well | /var/www/html/well | sites/well.arif-fazil.com (llms.txt only) |81| /oil /gas /gold (apex paths) | /var/www/html/{oil,gas,gold} | dist/{oil,gas,gold} — exclude live api/ + vendor/ |8283---8485## OP 2 — AUDIT (full-crawl methodology)868774-URL method, proven 2026-07-23. Evidence dir pattern:88`/root/A-FORGE/forge_work/<date>/site-audit/`89901. **Enumerate hosts:** `grep -oE "^[a-z0-9.-]+\.arif-fazil\.com \{" /etc/caddy/Caddyfile | sort -u`912. **Enumerate pages:** sitemap.xml `<loc>` entries + Caddy `@spa_routes` path list + every `handle` target + static handles (`@root_static`).923. **Probe each:** `curl -s -o body -w "%{http_code}|%{size_download}" -L url`. 0-byte 404 = catch-all respond; 17-byte 404 = explicit respond directive. Both are failures for content pages.934. **Content truth, not status codes** — a 200 with wrong content is a lie (F2):94 - /000 → BLAKE3 identity hash present95 - /999 → §8 Audit Path + grandfather rule96 - /economics → F2 bands + VOID tiles (patched renderer, not SPA shell)97 - dashboards → price/commodity markers98 - /data/wealth/latest.json → fresh date995. **Dual-lane bot surfaces** (makcikgpt): test with bot UA (`GPTBot/1.0`, `curl/x`) AND browser UA (`Mozilla` + `Accept: text/html`). Bot lane serves .md/.html from `makcikgpt-md/`; browser lane gets SPA. Both must 200.1006. **404 triage:** file missing from live tree? handler missing from Caddy? matcher gap (`@root_static` list)? file never built (pre-existing gap — label it, don't fake-fix)?101102---103104## OP 3 — REPAIR (source/live convergence)105106The drift detector for deployed content:107108```bash109diff -rq <snapshot-or-source>/ <live>/ | grep "^Only in"110```111112- **"Only in live"** = orphan. Seed into `public/` (survives build) → commit → redeploy. Never hand-edit live-only.113- **"Only in source"** = deploy gap. Check deploy script covers it.114- **Dual-copy divergence** (e.g. `999/index.html` vs `public/999/index.html`): converge to one canonical, sync, commit. Both copies must carry both truths.115- **Nested-dir restore error** (`cp -a src dst` when dst exists → `dst/src`): verify with `ls dst` after every restore; flatten with `cp -a dst/src/. dst/` then `mv dst/src quarantine/`.116- **Never `rm -rf`** — F1 tripwire will (correctly) block. Quarantine: `mkdir -p /root/backups/quarantine-<date> && mv target quarantine-<date>/`.117- **Caddy edits:** python exact-string patch → `caddy validate` → `systemctl reload` → verify affected URLs. Backup exists at `/etc/caddy/Caddyfile.bak.*`. Reload is T3-class: only under sovereign directive or incident repair with immediate verification.118119---120121## OP 4 — SEAL (evidence discipline)1221231. Prefer `web_zen.py doctor --json` receipt under `forge_work/<date>/web-zen/`.1242. Crawl data (`results.tsv`), URL list, truth-check output → `forge_work/<date>/site-audit/AUDIT-REPORT.md`.1253. Source commits BEFORE seal (seal references commit hashes, not intentions).1264. `forge_vault(mode="seal")` with: scope, pass count, content-truth table, gaps closed, commits, skill.1275. Session-end: one seal, not two. F4.128129## OP 6 — AUDIT · SITE CONSTITUTION LANES (SEAL 2026-08-09)130131```bash132python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py audit133```134135Four lanes — **Lane A** = existing doctor/verify (technical). **Lane B** = navigation136(crawl; canon/trust/observatory/organs reachable ≤3 clicks from landing → else FAIL_NAVIGATION;137SPA-aware: routes live in JS bundle). **Lane C** = visual surface (h1/nav/content mass →138FAIL_VISUAL). **Lane D** = attention cost (human markers vs jargon → HALT if a page can't139answer What/Why/Care; redirect stubs score their destination).140141**Mandatory read before ANY mutation of the constellation:**142- `/root/arif-fazil.com/SITE_CONSTITUTION.md` — RULE 1–6 (human understanding > protocol143 exposure; navigation clarity > feature growth; visual coherence > cleverness; agent144 surfaces secondary; every page answers What/Why/Care; no new surface before auditing).145- `/root/arif-fazil.com/SITE_IDENTITY.md` — what is sacred (the human, the motive, the146 motto, the system line, the visual identity, the canon, MakcikGPT, the organs).147- Both also live at `https://arif-fazil.com/SITE_CONSTITUTION.md` and148 `https://arif-fazil.com/SITE_IDENTITY.md` (public/ copies, served to agents).149150Deploy gate: `deploy-vps.sh` runs `web_zen.py audit` after truth verification.151`human_clarity: required: true` is a build artifact. FAIL = no deploy.152153## OP 5 — EPHEMERAL TOOL GENESIS (capability ≠ authority)154155```bash156python3 /root/arif-fazil.com/scripts/web-zen/web_zen.py ephemeral \157 --task "mission gap: why needed" \158 --code-file /path/to/temp_tool.py159```160161Loop: gap → search existing → reuse → generate → sandbox test → invoke → verify → **destroy** → promote only if repeated + human-approved.162163GREEN: parsers, converters, disposable analysis. RED never self-grant: secrets, production deploy, persistent MCP, force-push, Caddy authority, payments. No `arif_create_random_tool` — modes under forge only.164165## Anti-patterns (each cost real breakage)166167- ❌ `rsync --delete` without orphan preview — destroyed 36 files 2026-07-23168- ❌ "Deployed" claimed without crawl verification — 7 landing pages were 404169- ❌ Generated content living only in live tree — organ_proxy/999/wealth.html170- ❌ Hand-editing live tree to "fix" — fix source, redeploy171- ❌ Status-200 audit without content grep — SPA soft-404 lies172- ❌ `rm -rf` for cleanup — quarantine instead173- ❌ Advertising 128 tools as intelligence — six missions + Canonical 8174- ❌ Skipping `web_zen.py doctor` and reinventing the deploy path every session175176DITEMPA BUKAN DIBERI.177178179---180181## 🛑 Sovereign Execution Constraints (arifOS CAP)182183> Injected 2026-08-20 by FI-003 (Qwen Code) under F13 "execute all" directive.184> Backup: /root/backups/skill-backup-20260820-pre-sovereign-injection/185> Derived from: Grammar Doctrine §10, Nusantara AI Paradox (MakcikGPT), BBB dataset, Nusantara Validator.186187Before executing this web operation, the agent MUST enforce the following constraints:1881891. **Corpus Priority (Paradoks 1):** If the topic touches regional identity, politics, or history, the agent must check for sovereign corpus availability first. If corpus is available, route there. If not, proceed with external search BUT flag the output as `UNVALIDATED_CORPUS` and require Nusantara rubrik evaluation before publication.1901912. **BM Token Optimization (Paradoks 2):** When ingesting Bahasa Melayu web content, the agent must employ semantic caching and strict context chunking to manage the **1.5x–2.0x token penalty** (register-dependent: formal BM ≈ 1.5x, dialect/loghat ≈ 2.0x). Do not load raw HTML into the context window.1921933. **Falsification Gate (Paradoks 3):** All synthesized outputs touching **regional identity, politics, history, or cultural narrative** must be evaluated against the Nusantara 3-Tier Rubrik (GAGAL/LULUS/KUAT). Outputs classified as GAGAL are rejected and halted. Outputs on non-contested topics (data, technical, commodity) proceed but carry a `CORPUS_UNTESTED` epistemic label.194195**Rubric reference:** `huggingface.co/spaces/ariffazil/nusantara-validator` (live, 28 probes, 7 phases)196**Claim schema:** `claim-schema.json` on the Nusantara Validator Space197**Grammar Doctrine:** §10 Validator Sovereignty at `/root/AAA/instructions/grammar-doctrine.md`