Handbooks
गाइड

आउटपुट रेंडर करना

Markdown, एक HTML साइट, एक स्वयं-निहित पृष्ठ, agent locator index और llms.txt — सब नियतात्मक, सब दोबारा चलाने के लिए मुफ़्त।

handbook render --work <workdir> [--title <t>] [--html] [--html-single] [--agent-site] [--llms-txt]

कोई LLM नहीं। कोई नेटवर्क नहीं। नियतात्मक। वही model अंदर, byte-समान फ़ाइलें बाहर — इसलिए यह CI में, हर कमिट पर चलने लायक है।

पाँच आउटपुट

हमेशा लिखा जाता है।

<out>/
  overview.md      system prose + a mermaid stage map + "see also" links
  index.md         every stage, nested by depth, a paragraph each
  <stage-id>.md    one page per content-bearing stage
  register.md      the cross-stage state table (only when registers exist)

एक stage पृष्ठ में stage का सारांश, उप-stages के लिंक, और फिर उसकी फ़ाइलें होती हैं — जैसा phase 2c ने तय किया वैसे ही समूहीकृत और क्रमबद्ध, और हर फ़ाइल एक file card के रूप में रेंडर होती है: उद्देश्य, भूमिका, जीवनचक्र, call तथ्य, और deep cards के लिए प्रति-function नोट्स।

दो व्यवहार जो जानने लायक हैं:

  • बासी पृष्ठ साफ़ कर दिए जाते हैं। Stage ids हर generation के बीच बदलती हैं; हर render पहले पिछले render के पृष्ठ हटाता है, ताकि नाम बदले हुए किसी stage का कोई भूतिया पृष्ठ skill packager के हाथ न लग जाए।
  • प्रति-stage register अनुभाग idempotent है — एक marker के अंतर्गत जोड़ा जाता है, और केवल तभी जब marker अनुपस्थित हो। दोबारा render करने से डुप्लिकेट कभी नहीं जमते।

अपने स्रोत से लिंक करना

handbook render --work $WORK --source-base-url https://github.com/me/repo/blob/main

handbook का हर फ़ाइल पथ असली फ़ाइल का लिंक बन जाता है। अगर आप चाहते हैं कि handbook उसी कोड को संदर्भित करे जिससे वह जनरेट हुआ था, तो इसे main के बजाय किसी tag या commit SHA की ओर इंगित करें।

इस flag के बिना आउटपुट में कोई भी बाहरी URL नहीं होता, जो एक निजी codebase के लिए सही डिफ़ॉल्ट है।

शीर्षक और भाषाएँ

handbook render --work $WORK --title "Payments Service — Engineering Handbook"

narration की भाषा generation के समय तय होती है (--narrate-lang) और phase3/narration.json में संग्रहीत रहती है। Renderer उसे वहीं से पढ़ता है — हर लेबल, शीर्षक और तालिका header उसी से मेल खाने के लिए स्थानीयकृत होता है। दोनों भाषाओं में संरचना एक जैसी रहती है, इसलिए आउटपुट पढ़ने वाले टूलिंग को यह जानने की ज़रूरत नहीं कि वह कौन-सी भाषा है।

दोबारा render करने की आदत डालें

Rendering मुफ़्त और नियतात्मक है, इसलिए इसे CI में जोड़ दें:

.github/workflows/handbook.yml
- run: handbook render --work work/api --title "API Handbook" --html --agent-site --llms-txt
- run: handbook skill --handbook work/api/handbook --out skills/api --name api \
    --work work/api --source . --agent-dir work/api/handbook/agent
- run: handbook validate --skill skills/api --source .

देखें CI एकीकरण

HTML साइट प्रकाशित करना

आउटपुट relative लिंकों वाली और बिना किसी बाहरी asset की एक स्थिर निर्देशिका है, इसलिए कोई भी static host काम करता है:

# GitHub Pages
cp -R work/api/handbook/html/* docs-site/ && git add docs-site

# Netlify / Vercel / S3 / nginx
npx serve work/api/handbook/html

साइट root पर llms.txt उपलब्ध कराएँ ताकि agents उसे ढूँढ सकें।

इस पृष्ठ पर