بنقرة واحدة
tutorial
Run hands-on HQ workflow lessons.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Run hands-on HQ workflow lessons.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Deploy or share generated HQ artifacts through hq-deploy.
Mark a company as HQ Pro cloud-backed and sync its team setup.
Send HQ Sync direct messages, prompts, details, or scheduled notes to teammates.
Run a full bidirectional sync for cloud-backed HQ companies.
Scaffold a new HQ company AND optionally take it all the way to operational — business-discovery interview, seeded knowledge/workers/skills/projects, brand design packs (generated from website/PDF/Drive and bound to deploys via policy), connected integrations, org groups + ACL rules, teammate invites, and optional cloud agents.
Resolve HQ Sync conflicts by choosing local, cloud, or discard.
استنادا إلى تصنيف SOC المهني
| name | tutorial |
| description | Run hands-on HQ workflow lessons. |
| allowed-tools | Read, Glob, Grep, Bash, AskUserQuestion |
Interactive, modular lessons teaching HQ principles through hands-on exercises against the user's real HQ. Each topic follows a 5-phase flow: Concept, Show, Exercise, Verify, Takeaway. Content sources include Build Your Own AGI (where available) and the core/knowledge/public/getting-started/ docs — the book is a supporting reference, not a prerequisite.
Ordering rationale: Lead with principles and daily workflow — most users won't run /run-project orchestration until they've lived in HQ. Ralph-loop orchestration (Topic 8) and worker authoring (Topic 9) come last, where users have enough context to appreciate them.
Input: $ARGUMENTS — optional topic slug. If empty, show topic menu.
If $ARGUMENTS is non-empty, match against topic slugs:
| Input | Topic |
|---|---|
cloud, team, collaboration, hq-sync, hq-share, hq-secrets, hq-deploy, hq-bug | 0. Cloud & Team Collaboration |
principles, ralph-principles, mindset | 1. Ralph Principles |
hq, workflow, daily, folder, folders | 2. Working with HQ |
knowledge | 3. Knowledge Architecture |
session-hygiene, hygiene, sessions | 4. Session Hygiene |
context-management, context, tokens | 5. Context Management |
projects, prd, prds | 6. Projects |
scaling, parallel, multi-session | 7. Scaling |
ralph-loop, ralph, loop, run-project | 8. The Ralph Loop (Orchestration) |
workers, worker | 9. Workers |
If matched: skip to Step 2 with that topic. If no match: show error + topic menu (Step 1). If empty: proceed to Step 1.
Silently assess HQ state:
core/workers/registry.yaml — count company-specific workers (type: company)prd.json files in companies/*/projects/ or personal/projects/companies/manifest.yamlgrep -l 'cloud' companies/*/manifest.yaml 2>/dev/null | head -1
grep -iE 'cloud_backed|cloud_uid|hq[-_]?pro|team' companies/manifest.yaml 2>/dev/null | head -3
Either signal hit → flag as CLOUD.Classify:
Menu structure adapts to the CLOUD flag:
HQ Tutorial
───────────
Learn HQ principles from "Build Your Own AGI" — interactive lessons
with hands-on exercises using your actual HQ.
Cloud & Team Collaboration [shown only if CLOUD detected]
0. Cloud & Team — hq-sync, hq-share, hq-secrets, hq-deploy, hq-bug
Foundations
1. Ralph Principles — Plan mode, fresh context, back pressure (mindset)
2. Working with HQ — Daily workflow: /startwork → work → /handoff
Daily Practice
3. Knowledge — Hot vs cold channels, qmd search, gardens
4. Session Hygiene — /checkpoint, /handoff, thread files
5. Context Management — Token optimization, Context Diet, advisories
6. Projects — PRDs, /idea → /plan, acceptance criteria
7. Scaling — Parallel sessions, company isolation
Advanced
8. The Ralph Loop — /run-project orchestration (principles in action)
9. Workers — /newworker, worker.yaml, /learn training
Recommended for you: {see below}
Full book: {your-book-site}
Recommendation logic:
Wait for user selection via AskUserQuestion. Route to Step 2 with chosen topic.
Execute the 5-phase lesson flow for the selected topic. Each phase is described below.
repos/private/knowledge-curriculum/book/handbook.md. If yes, read ONLY the line range for this topic's chapter (see Topic Registry below). If the file does not exist, use fallback sources.hq_refs field.Run the read-only inspection commands defined in the topic's show field. Annotate what you find with how it connects to the concept just explained.
Two paths:
Present the exercise defined in the topic's exercise field.
Exercise tiers:
/run, /checkpoint. Describe what to do, wait for the user to try, then verify./newworker, /plan, /run-project, /handoff. Mention as next steps only.For Tier 1 exercises: present what the exercise revealed and ask the user a comprehension question. For Tier 2 exercises: check for expected side effects (new files, updated state) or ask "What did you see?"
takeaway field).core/knowledge/public/getting-started/cheatsheet.md"/tutorial {next_topic} or pick another from /tutorial"Chapter: N/A — HQ product, not Ralph philosophy
HQ refs: .claude/skills/{hq-sync,hq-share,hq-secrets,deploy,hq-bug}/SKILL.md, companies/manifest.yaml
Voice: plain-English "if you want X, do Y." Lead each command with the need, then explain what happens, when to use it, and the one gotcha worth knowing. No jargon-first, no policy citations up front.
Opening framing: "When you're working solo, HQ lives on your laptop. When you're working with a team — or just want your laptop and the cloud to agree — these 5 commands are the bridge. Each one answers a specific question:"
Show: present the 5 commands as a needs-based menu. Use this framing:
Want your laptop's HQ to match the cloud (or push local changes up)?
→ /hq-sync (or just tell Claude "sync HQ")
Reconciles every cloud-backed company in both directions. Runs the same engine as the HQ Desktop App "Sync" button. Use it at the start of a session if you switched machines, or at the end if you want a teammate to see what you just did. If there are conflicts (you and the cloud changed the same file), HQ surfaces them — /resolve-conflicts walks you through each one.
Want to give a teammate access to a file or folder?
→ /hq-share <path>
Generates a one-time link, opens a picker in your browser, and lets you grant any teammates you want (one or many at once). The link is live for 15 minutes and only works once — that's by design, so a leaked link can't be reused. After you've granted access, the teammates have it permanently; the link is just the handoff.
Want to upload API keys / passwords so you and your team can use them without copy-pasting?
→ /hq-secrets
Stores credentials in the cloud per company. Once stored, any teammate with access can use them in their sessions without ever seeing the raw value — Claude fetches them at runtime and never prints them in chat. Best for: Shopify tokens, Stripe keys, database URLs, anything you'd otherwise paste into a .env file. If a credential needs a human to log in (OAuth, 2FA), HQ mints a link to send instead.
Want to publish something (a doc, preview site, report) so others can see it?
→ /deploy
Ships whatever you just made — a generated report, a brief, a static page — to the hq-deploy host and returns a shareable URL. Optional password protection if it's sensitive. Use this when chat-pasting a long doc would be awkward, or when you want a single link that teammates can bookmark.
Hit a bug or want a feature in HQ itself?
→ /hq-bug
Files a report directly to the HQ team. Auto-attaches your session context (which command was running, what failed, what directory you were in) so you don't have to write a repro. Use it freely — friction here is the difference between a fixed bug and a forgotten one.
Exercise (Tier 1):
companies/manifest.yaml → name the user's cloud-backed companies (the ones with cloud_uid: or similar markers)Verify: user can answer "which command for X?" for each of the 5 scenarios in their own words — not by reciting the command name, but by knowing which problem it solves
Takeaway: "5 commands, 5 jobs. /hq-sync keeps you and the cloud in agreement. /hq-share hands access to a teammate. /hq-secrets stores credentials safely. /deploy turns work into a link. /hq-bug closes the loop with HQ itself. Together they're the team-collab layer — the rest of HQ is what you do inside that layer."
Next: principles (FRESH) or hq (ACTIVE)
core/knowledge/public/getting-started/quick-start-guide.md (Core Loop section), core/knowledge/public/getting-started/learning-path.md (Module 1-2)core/knowledge/public/getting-started/quick-start-guide.md/run-project mechanics. Do not reference /run-project, sub-agents, or file locking here. Those live in Topic 8 (ralph-loop). If the user asks about orchestration, say: "That's Topic 8 — come back after you internalize the three principles."workspace/threads/ (most recent .json). Annotate where the three principles show up: where did the session start with plan mode? Where was context refreshed? Where was a task verified before advancing?.claude/settings.json and point to the planModeByDefault or thinking-mode settings as the "plan mode" principle made concreteworkspace/threads/ (or the bundled sample if fresh)/run-project) is just how HQ makes them repeatable."core/knowledge/public/getting-started/quick-start-guide.md (Daily Workflow section), core/knowledge/public/getting-started/cheatsheet.mdcore/knowledge/public/getting-started/quick-start-guide.md, core/knowledge/public/getting-started/cheatsheet.md/startwork → work → /handoff) + folder orientation. Do NOT teach /run-project here (Topic 8) or worker authoring (Topic 9). The goal: a user should know where to look and which command to run next on day one.ls -1 $HOME/Documents/HQ/ (filter hidden). For each of .claude/, companies/, core/knowledge/, core/workers/, workspace/, repos/ — explain in one line what it holdscore/knowledge/public/getting-started/cheatsheet.md — show the daily cadence table/section/startwork → (work happens) → /checkpoint (mid-session) → /handoff (end)companies/manifest.yaml, pick a company the user works in. Locate one file in each of: companies/{co}/settings/, companies/{co}/knowledge/, companies/{co}/workers/. Show the user what each holds/startwork reads workspace/threads/handoff.json)/startwork and locate handoff.json. If they don't know the handoff file, read the 7-line handoff.json to them as a demo of how little state resumes a session./startwork → work → /handoff. Learn the arc before learning the advanced commands."core/knowledge/public/getting-started/quick-start-guide.md (Knowledge section), core/knowledge/public/getting-started/learning-path.md (Module 5)core/knowledge/public/getting-started/quick-start-guide.mdcore/knowledge/public/ directories — show what knowledge bases existls core/knowledge/public/ and any companies/*/knowledge/qmd search "{keyword}" --json -n 5 (BM25 keyword search)qmd vsearch "{keyword}" --json -n 5 (semantic/vector search)core/knowledge/public/getting-started/cheatsheet.md, core/knowledge/public/getting-started/learning-path.md (Module 8)core/knowledge/public/getting-started/cheatsheet.mdworkspace/threads/handoff.json — if exists, read and explain its structure (what gets preserved between sessions)workspace/threads/ — show the checkpoint/handoff history/checkpoint right now to see session saving in action."workspace/threads/ and walk through what it capturedworkspace/threads/ with a recent timestamp, or ask the user what they observed.core/knowledge/public/getting-started/learning-path.md (Module 8).claude/CLAUDE.md (Context Diet and Token Optimization sections only — do NOT read the full file)wc -l .claude/CLAUDE.md — show the instruction file size as an example of keeping context tightcore/knowledge/public/getting-started/quick-start-guide.md (PRDs section), core/knowledge/public/getting-started/learning-path.md (Module 6)core/knowledge/public/getting-started/quick-start-guide.mdqmd search "prd.json userStories" --json -n 5passes: true/false creates back pressure/idea to capture something small on your board."core/knowledge/public/getting-started/learning-path.md (Modules 9-10)companies/manifest.yamlcompanies/manifest.yaml — count companies, show the isolation structure (each company → repos, workers, knowledge, settings)workspace/orchestrator/active-runs.json — show parallel session tracking if any runs existcompanies/manifest.yaml and count: companies, total repos across all companies, total workers/run-project and /execute-task ship in
hq-pack-engineering (auto-installed for upgraders, skipped on lean greenfield
installs). Before teaching this topic, check that /run-project resolves; if
not, tell the user to install it once and continue:
hq install github:indigoai-us/hq-packages#packages/hq-pack-engineering.
Never have the user try a command this topic teaches without that path./run-project mechanics)core/knowledge/public/getting-started/learning-path.md (Module 3 + 7), core/knowledge/public/hq-core/policies-spec.mdcore/packages/hq-pack-engineering/skills/run-project/SKILL.md, core/settings/orchestrator.yaml, workspace/orchestrator/active-runs.json/run-project as the loop runner, sub-agents as fresh-context carriers, passes: true/false + file locking as back pressure, autonomous overnight runs as the payoff. Do NOT re-teach plan mode or fresh context here.core/packages/hq-pack-engineering/skills/run-project/SKILL.md — walk through the orchestrator's task-selection loopcore/settings/orchestrator.yaml — show file locking config, repo coordination rulesworkspace/orchestrator/active-runs.json (if any runs exist) — show the cross-session coordination artifactpasses field + file locks)qmd search "run-project passes acceptance" --json -n 5 — find orchestrator referencespasses: false (if any). Identify the acceptance criteria that would flip it to passes: truepasses field + sub-agent verification step)/run-project./run-project + PRD acceptance criteria + file locking. The principles don't change — the machine just runs them without you."core/knowledge/public/getting-started/quick-start-guide.md (Workers section), core/knowledge/public/getting-started/learning-path.md (Module 4)core/workers/registry.yamlcore/workers/registry.yaml — count and categorize workers (shared vs company)worker.yaml, and annotate the four components (identity, context, skills, permissions)core/workers/public/qa-tester/worker.yaml) as an example/newworker to create your first domain-specific worker. Use /learn to teach it as you go."/learn is how they get smarter — write learnings back into the worker's policies."The book at repos/private/knowledge-curriculum/book/handbook.md is the source material.
Rules:
Topics 1 and 8 both draw from Ch 3 but split cleanly:
| Topic | Scope | Do teach | Don't teach |
|---|---|---|---|
1. principles | Mindset | plan mode, fresh context, back pressure (as concepts) | /run-project, sub-agents, file locking |
8. ralph-loop | Mechanics | /run-project, orchestrator config, passes field, file locks | plan mode theory (assume known from Topic 1) |
If a user asks an orchestration question during Topic 1, route them: "That's Topic 8 — finish principles first." If a user asks a principles question during Topic 8, say: "Refresher: Topic 1 covers the mindset" but continue with mechanics.