원클릭으로
startwork
Resolve current HQ context and surface useful next work options.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Resolve current HQ context and surface useful next work options.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
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.
| name | startwork |
| description | Resolve current HQ context and surface useful next work options. |
| allowed-tools | Read, Grep, Glob, Bash(git:*), Bash(qmd:*), Bash(ls:*), Bash(core/scripts/hq-session.sh:*), Bash(core/scripts/work-mesh.sh:*), Bash, AskUserQuestion |
Lightweight session entry point. Resolves context fast, presents smart options, gets you working.
Beginning of every session. Replaces ad-hoc orientation.
1.0 Slash-command short-circuit (HARD RULE — check FIRST):
If the argument contains a slash-command token (whitespace-delimited substring matching /<name> for any <name> that is a valid slash command in .claude/commands/), abort the normal classification flow and route to that command. Specifically:
/deep-plan token present → STOP. Do not classify, do not enter Task Mode, do not pick a worker pipeline. Announce: "/deep-plan detected in args — routing to deep-plan skill." Then load .claude/skills/deep-plan/SKILL.md and execute it end-to-end with the remaining args (everything after /deep-plan) as the project description. The deep-plan skill produces companies/{co}/projects/{name}/prd.json + board entry and HARD STOPS at /handoff. Implementation MUST NOT happen in this session./plan token present → route to .claude/skills/plan/SKILL.md similarly./foo tokens → check .claude/commands/foo.md; if present, route to that command's skill (if any) or invoke the command directly.This rule supersedes the classification table below. The reason it exists: prior failure where /startwork {company} vyg /deep-plan apps/... was treated as free-text task description, causing the agent to enter Claude Code's built-in plan mode and start implementing instead of running the deep-plan questionnaire. Policy: core/policies/deep-plan-skill-routing.md.
1.1 Mode resolution (only if no slash-command short-circuit fired):
Determine mode from the user's argument (first match wins):
companies/manifest.yaml — Company modepersonal/projects/ (not _archive/) or companies/*/projects/ — Project moderepos/private/ or repos/public/ — Repo modeDo NOT eager-load context. A naked /startwork must ask the user where to go before reading the thread file, running the qmd/grep project scan, or reading any prd.json. Only the single cheap read in step 1 is permitted before the gate.
Cheap peek only. If workspace/threads/handoff.json exists, read it (small, allowed by context-diet) and extract only the last-session one-liner (its summary / conversation_summary field) + referenced branch. Do NOT read the thread file it points to yet. If handoff.json is absent, skip — no last-session option.
Ask the user (AskUserQuestion), one question, then wait. Present these options:
/strategize (strategic prioritization). Announce the handoff and load .claude/skills/strategize/SKILL.md. Do not do project discovery here.Do not present numbered markdown for this gate — use the structured picker. This is the whole point of the gate: no qmd search "prd.json", no thread-file read, no per-project prd.json reads happen until the user has chosen.
After the pick, load only what that path needs:
conversation_summary, next_steps, git.branch, git.current_commit, git.dirty, files_touched); run git log --oneline -3; if the thread references a project_dir, read its most-recent journal file (frontmatter + ## Open threads only — see Project Mode step 4). Skip the global qmd/grep project scan unless the user then asks "what else is active?"./strategize owns it from here; stop gathering.companies/manifest.yaml — extract the company's entry (repos, workers, knowledge, qmd_collections)workspace/threads/handoff.json — if last thread relates to this company, note itqmd search "prd.json" --json -n 10 via shellgrep -rl '"passes"' personal/projects/ companies/ --include='prd.json'git -C {first-repo} log --oneline -3 and git -C {first-repo} branch --show-currentpersonal/projects/{name}/prd.json or companies/{co}/projects/{name}/prd.json — extract: name, description, branchName, incomplete stories (where passes !== true) with id + title + prioritymetadata.repoPath — identify company by matching against manifest reposgit -C {repoPath} branch --show-current and git -C {repoPath} status --short{co} is resolved, run bash core/scripts/work-mesh.sh check --company {co} --project {name}. Include any active owners, blockers, or in-progress threads in the orientation block. If the helper prints nothing or is unavailable, omit the line and continue. A local daemon may keep workspace/work-mesh/live-cache.json warm with bash core/scripts/work-mesh.sh watch; use that only as live context, not as a direct MQTT write path.core/knowledge/public/hq-core/journal-spec.md). If {project_dir}/journal/ exists:
ls -t {project_dir}/journal/*.md 2>/dev/null | head -2 — most recent 2 filesstatus, summary) + ## Open threads section only — skip ## Auto-capture (reference material, too noisy for orientation)status: active and mtime > 24h, treat as abandoned (visually flag in orientation block)summary + any unresolved ## Open threads bulletsworkspace/threads/handoff.json if exists)schema_changeapi_developmentui_componentfull_stackcontentdesignopsenhancement/plan command Step 5)repos/private/{arg} then repos/public/{arg}git -C {repoPath} branch --show-current, git -C {repoPath} log --oneline -5, git -C {repoPath} status --shortcompanies/manifest.yaml for a company whose repos: list contains this pathqmd search "{repo-name} prd.json" --json -n 10 via shellname + count incomplete storiesOnce company {co} is resolved (from any mode), write it into the current
session's metadata so per-company hooks and other context-aware skills can
find it:
bash core/scripts/hq-session.sh set company_slug "{co}"
# Optional, when applicable:
bash core/scripts/hq-session.sh set project "{project_name}"
bash core/scripts/hq-session.sh set repo "{repo_name}"
bash core/scripts/hq-session.sh set mode "{Resume|Company|Project|Repo|Task}"
This file lives at workspace/sessions/<session_id>/meta.yaml. The current
session_id is bootstrapped by .claude/hooks/master-hook.sh on the first
hook event of every session and tracked in workspace/sessions/.current.
Important: until company_slug is set, the master hook runs no
per-company hooks (fail-closed for tenant isolation). Setting it from
startwork is what activates the per-company harness for the rest of the
session.
Skip if: no company resolved (resume mode with no company context).
Once company {co} is resolved (from any mode):
{co} known, read frontmatter-only for each policy in companies/{co}/policies/ via bash core/scripts/read-policy-frontmatter.sh {file} (skip example-policy.md). Note count + titles of any enforcement: hard rules. For hard-enforcement policies only, additionally read the ## Rule section with targeted Read + range.{repoPath}/.claude/policies/ (if dir exists). Same frontmatter-only pattern.core/policies/. On:[SessionStart] policies are already injected automatically by the SessionStart trigger hook (inject-policy-on-trigger.sh), so this step is largely a no-op. If you need more, filter to policies whose when:/trigger matches current context — don't load all.Display in orientation block:
Policies: {N} company, {M} repo, {K} global ({H} hard-enforcement)
Hard-enforcement policies with triggers matching current context: list titles in orientation block so user sees constraints upfront.
Rules:
## Rule sectionAfter policies are known, build a compact Worker Packet for the resolved context.
core/workers/registry.yaml (auto-generated read-only index) once and keep only entries relevant to the current company, project, repo, or task intent.{co} is resolved, include any registry entries whose company: field is {co} (sourced from worker.company in each worker.yaml) or whose path starts with companies/{co}/workers/.prd.json story metadata includes declared workers or worker hints, include those first.design, ui_component → design/frontend workerscontent → content workersops, deploy/CI/infrastructure → ops/deploy workersapi_development, schema_change, full_stack, enhancement → implementation workers plus QA/review workers when availableDisplay in orientation block:
Worker route: {primary worker/skill or "none matched"} ({N} candidates)
Rules:
/run {worker} {skill} or /execute-task rather than reimplementing the worker inline.Once {co} is resolved (from any mode except resume-with-no-company):
companies/manifest.yaml to resolve knowledge path and qmd_collections for {co}null in manifest), spawn a background knowledge pulse:spawn_task(
reason: "Pulse-garden {co} knowledge",
prompt: "Run the knowledge-pulse skill at .claude/skills/knowledge-pulse/SKILL.md.
company_slug: {co}
knowledge_path: companies/{co}/knowledge/
policies_path: companies/{co}/policies/
caller: startwork
qmd_collection: {qmd_collections[0] from manifest, or omit if none}
No search_results_summary or discovered_facts (startwork is read-only).
Read the skill file for full instructions."
)
Skip if: no company resolved (resume mode with no company context), or company has no knowledge directory.
Display a concise orientation block:
Session Start
--------------
{Mode: Resume | Company: {slug} | Project: {name}}
{If resume: "Last session: {summary}" + "Next steps: {next_steps}"}
{If company: "Repos: {list}" + "Workers: {list}"}
{If project: "Goal: {description}" + "Branch: {branchName}"}
{If repo: "Repo: {repoPath}" + "Company: {slug}" + "Branch: {branch}"}
{If task: "Task: {description}" + "Intent: {classified_intent}" + "Pipeline: {worker count} workers"}
Git: {branch} @ {short-hash} {" (dirty)" if dirty}
Worker route: {primary worker/skill or "none matched"} ({N} candidates)
Knowledge pulse: {summary line from workspace/reports/knowledge-pulse/{co}-{today}.md if exists, e.g. "3 docs tagged, 2 flagged stale" — or omit line if no recent pulse}
Active work:
- {project} -- {done}/{total} stories ({remaining} left)
...
Work mesh:
{active mesh owners/blockers for the selected company/project, or omit if none/unavailable}
Then present numbered options built from context:
/execute-task + matching worker route + "Something else"Output the numbered list and wait for user input. After user picks, proceed directly into the work.
git branch --show-current before displaying git state/startwork (no arg) MUST hit the entry gate first — ask via AskUserQuestion before reading the thread file or running any project scan. The only pre-gate read allowed is handoff.json itself (one-liner peek)/strategize rather than doing eager project discoveryqmd search via shell command — if qmd unavailable, fall back to Grep to scan for prd.json files