vibe
Vibe Code Orchestrator (VCO) is a governed runtime entry that freezes requirements, bounds execution, and enforces verification and phase cleanup.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
Its scripts were only partly scanned.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/foryourhealth111-pixel/Vibe-Skills with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/foryourhealth111-pixel/Vibe-Skills'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/foryourhealth111-pixel--vibe-skills)HTML
<a href="/listings/foryourhealth111-pixel--vibe-skills"><img src="/api/listings/foryourhealth111-pixel--vibe-skills/badge.svg" alt="findsafeskills safety rating" /></a>Install
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 244 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: vibe
- description: Vibe Code Orchestrator (VCO) is a governed runtime entry that freezes requirements, bounds execution, and enforces verification and phase cleanup.
- ---
- # Vibe Governed Runtime Entry
- This file is the host-facing SOP for entering canonical `vibe`. Keep it small: runtime details belong in `protocols/runtime.md`, execution discipline belongs in `protocols/do.md`, and host wrapper recipes belong in installer-generated wrapper docs.
- ## Trigger Contract
- Enter canonical `vibe` before ordinary execution when the user explicitly invokes `$vibe`, `/vibe`, or the `vibe` skill, or when the host intentionally chooses governed requirement/plan/execution closure for a complex task.
- Do not route every loosely related task into `vibe`. Lightweight questions,
- single-command checks, or tasks better served by another explicitly requested
- skill may proceed outside `vibe` unless the user explicitly invoked this entry.
- Installed-copy updates use `update --skills-dir <skills-dir>` on the same managed directory.
- User instructions, including CLAUDE.md, GEMINI.md, AGENTS.md and direct workflow limits such as TDD exceptions, remain highest priority. Preserve canonical launch and proof rules within those limits.
- ## Canonical Bootstrap
- `vibe` is a host-syntax-neutral skill contract. Before canonical launch, do only the minimum needed to launch:
- - Resolve `skill_root` and `workspace_root`.
- - Pass the current user task verbatim as the task specification; unrelated chat history may be excluded. Do not summarize, rewrite, or reduce it to keywords. Preserve exact input paths, input immutability constraints, exact output roots, synthetic-data evidence boundaries, module dependencies and safe parallel boundaries, and acceptance criteria.
- Do not search the current workspace, repository, or install root for canonical proof files before launch.
- Do not inspect the repo, protocol docs, or prior run outputs before canonical launch returns.
- Do not simulate stages, claim canonical entry from reading this file or wrapper text, or treat wrapper or AGENTS text as proof.
- Do not manually create `outputs/runtime/vibe-sessions/<run-id>/`.
- Do not use the Vibe installation root as the governed artifact root.
- Local skill candidate audit: semantic owner `packages/runtime-core/src/vgo_runtime/router_contract_runtime.py`; compatibility bridge `scripts/router/resolve-pack-route.ps1`
- The audit runs inside canonical `vibe` and exposes candidates for inspection. Include work type, domain/technology, deliverable, explicit constraints, and verified frozen facts on continuation. Its output is compatibility evidence only; the Agent owns skill choice, binding, and stage progression.
- Canonical entry command shape:
- ```powershell
- $env:PYTHONPATH = "<skill_root>/apps/vgo-cli/src"
- py -3 -m vgo_cli.main canonical-entry --repo-root "<skill_root>" --artifact-root "<workspace_root>" --prompt "<current user task, verbatim>"
- ```
- For PowerShell, do not place `$env:PYTHONPATH=...` inside a double-quoted `-Command` string; host interpolation may corrupt it to `:PYTHONPATH`.
- Bash-like hosts, including Claude Code, set `PYTHONPATH` in the outer shell and call Python directly. Try `py -3`, `python`, then `python3` according to availability.
- ```bash
- REPO_ROOT='<skill_root>'
- WORKSPACE_ROOT="${WORKSPACE_ROOT:-$PWD}"
- PYTHONPATH="$REPO_ROOT/apps/vgo-cli/src" python -m vgo_cli.main canonical-entry --repo-root "$REPO_ROOT" --artifact-root "$WORKSPACE_ROOT" --prompt "<current user task, verbatim>"
- ```
- `--host-id` and `--entry-id` remain compatibility-only for wrappers or older automation; omit them on a normal launch.
- Only validate canonical proof artifacts after canonical-entry returns a `session_root`.
- `check` proves `installed locally`; runtime coherence and delivery acceptance require their own evidence.
- Proof of canonical launch is post-launch and requires: `host-launch-receipt.json`, `runtime-input-packet.json`, `governance-capsule.json`, and `stage-lineage.json` under the returned `session_root`.
- `local-agent-kernel` follows the same proof rule. If it cannot produce those truth artifacts, it may produce local work scaffolds, but it must not be treated as `canonical verified`.
- If canonical launch fails, report `blocked` with the concrete failure reason instead of simulating the missing stages or proof artifacts.
- ## Consensus And Task Evolution
- Use `deep_interview` until the user and Agent agree on the goal, scope, constraints, deliverables, relevant unknowns, and completion criteria. Freeze the requirement after confirmation of that task-specific summary; the first clarification is an input to the conversation.
- Keep the agreement in the existing TaskCard. Append accepted revisions, update affected work and checks, and reuse results only while their inputs and acceptance remain valid. Surface decisions that change the agreed outcome, scope, risk, or required human judgment.
- ## Hard Stop And Re-entry
- The progressive governed stops are `requirement_doc`, `xl_plan`, and `phase_cleanup`.
- When `bounded_return_control.explicit_user_reentry_required = true`, stop the
- current assistant turn. Do not consume re-entry credentials until a later user
- message approves or revises the current boundary.
- This is a hard runtime boundary, not a suggestion. It overrides ordinary host
- autonomy rules such as "continue until done." A detailed original request is not
- approval of the frozen requirement or frozen plan. After a hard stop, do not
- perform equivalent manual work outside governed re-entry: no plan writing, task
- execution, manual workaround delivery, or final artifact delivery in the same
- assistant turn.
- For re-entry, inspect `runtime-summary.json ->
- bounded_return_control.host_decision_contract`, infer the user's intent, and
- write a structured host decision JSON file. Use the same `run_id`,
- `bounded_reentry_token`, and stable `workspace_root`:
- At a requirement stop, build `agent_skill_organization` directly from `agent_skill_organization_contract`; `preferred_payload` is incomplete until then, and the schema must not be learned through failed retries or runtime source inspection.
- Use the same `REPO_ROOT` and `WORKSPACE_ROOT` from bootstrap:
- ```bash
- DECISION_JSON="$WORKSPACE_ROOT/.vibeskills/tmp/host-decision.json"
- mkdir -p "$(dirname "$DECISION_JSON")"
- cat > "$DECISION_JSON" <<'JSON'
- {
- "decision_kind": "approval_response",
- "decision_action": "approve_requirement",
- "approval_decision": "approve",
- "agent_skill_organization": {
- "schema_version": "agent_skill_organization_v1", "derived_by": "agent", "workflow_level": "L",
- "modules": [{"module_id": "module-a", "goal": "...", "candidate_skill_ids": ["skill-a"], "depends_on": [], "execution_mode": "skill_assigned", "acceptance_criteria": [{"criterion_id": "module-a-result", "description": "The module result satisfies the frozen requirement.", "verification_mode": "automated"}]}],
- "selected_skills": [{"skill_id": "skill-a", "module_ids": ["module-a"], "responsibility": "...", "reason": "..."}],
- "uncovered_modules": [],
- "workflow_level_contract": {"L": "smallest complete organization", "XL": "bounded multi-lane organization"}
- }
- }
- JSON
- PYTHONPATH="$REPO_ROOT/apps/vgo-cli/src" py -3 -m vgo_cli.main canonical-entry \
- --repo-root "$REPO_ROOT" \
- --artifact-root "$WORKSPACE_ROOT" \
- --prompt "<current user task, verbatim>" \
- --continue-from-run-id "<source_run_id>" \
- --bounded-reentry-token "<reentry_token>" \
- --host-decision-json-file "$DECISION_JSON"
- ```
- A structured approval from a later user message advances to the next progressive stop. A structured
- revision must include non-empty `revision_delta` and refreezes the same bounded
- stage without asking the user for a separate approval first:
- ```json
- {
- "decision_kind": "approval_response",
- "decision_action": "revise_requirement",
- "approval_decision": "revise",
- "revision_delta": ["Use the revised dataset and agreed output scope."]
- }
- ```
- Bounded approvals or revisions must stay inside the surfaced bounded-stage action contract.
- At `requirement_doc`, read `runtime-summary.json -> host_user_briefing` and use `host_user_briefing.rendered_text` as the backbone of the user reply. Keep the same field order.
- Frame that stop around the Agent-led skill search guide: split the task into modules, search local skills per module, read candidate `SKILL.md`, organize both `L` / `XL` plans, and disclose uncovered modules honestly. Do not surface shortlist size, selected-skill rankings, or raw router ordering at requirement freeze.
- Do not ask the user to choose L or XL until the reply explains each task-specific workflow and names the task-specific candidate skill names for that option. Label every named skill as a candidate that is not yet selected or used; formal selection still belongs to the Agent organization produced after requirement approval.
- After requirement approval, the Agent must split the approved work into modules, search every declared local skill root for each module, and read each retained candidate's `SKILL.md`. The host must, before entering `xl_plan`, put the validated result in `HostDecisionJson.agent_skill_organization`; route output may remain candidate audit evidence but cannot populate this field. If one selected Skill owns multiple modules, include one `module_assignments` entry per module with the exact module id, an `owner`, `support`, or `verifier` role, module-specific responsibility, one concrete write scope, expected outputs, and verification. Role order is executable: `support` runs before and feeds the `owner`; `verifier` runs only after the `owner`. A post-owner review or minimality check must use `verifier`, not `support`. An `agent_direct` module must declare its own concrete `write_scope`, `expected_outputs`, and `verification`; the runtime must not replace them with a generic module label or restated goal. A task work scope must not claim canonical runtime artifacts such as `module-execution.json`; use a stable task-owned output scope or `no task-file writes` for read-only work. A plan revision that changes modules, Skills, roles, dependencies, write scopes, outputs, verification, or workflow level must resubmit the complete updated `agent_skill_organization`; `revision_delta` alone records text and does not mutate the frozen organization.
- Use the directory name that directly contains the retained `SKILL.md` as the exact `skill_id` in both `candidate_skill_ids` and `selected_skills[].skill_id`. A displayed Skill name or frontmatter `name` is descriptive, not an execution identifier. A nested retained `SKILL.md` uses its own containing directory name. Resolve this from the candidate path before submission instead of learning the identifier through failed retries.
- Module acceptance criteria must be satisfiable before canonical module-result re-entry. They must not require cleanup receipts, delivery acceptance, or completion-language permission, because canonical `phase_cleanup` creates those only after `module-execution.json` is accepted. Verify ordinary modules from their actual deliverables and normal command or test output. Do not invent task-specific hashes, receipts, ledgers, matrices, scans, or proof files solely to prove execution order, Skill use, or file scope. Only require an extra evidence artifact when the user or domain contract needs that artifact.
- After plan approval, reuse the frozen `agent_skill_organization` for `plan_execute` and cleanup, and do not rerun procedural skill selection, silently add skills, or replace declared gaps unless the user revises the frozen requirement or plan. `stage_order` records dependency depth, not permission to run in parallel; L still emits one-unit sequential waves even when independent units share a dependency stage. XL may place at most two dependency-ready units in one wave, and nested or overlapping write scopes must remain serial.
- After the required plan confirmation, continue through dependency-ready work
- without asking for routine permission between units. Give concise progress
- updates at meaningful boundaries. If the user revises the agreed task, record
- the revision and replan only the affected work before continuing.
- ## Unified Runtime Contract
- Canonical `vibe` owns one runtime authority and one visible requirement/plan
- surface. The fixed state machine is:
- 1. `skeleton_check`
- 2. `deep_interview`
- 3. `requirement_doc`
- 4. `xl_plan`
- 5. `plan_execute`
- 6. `phase_cleanup`
- These stages may be light for simple work, but they are not silently skipped.
- The full runtime contract, stage ownership, lineage rules, internal `M`/`L`/`XL`
- grades, user-visible L/XL workflow confirmation, cleanup rules, and output inventory are defined in
- `protocols/runtime.md`.
- `vibe` is the only public wrapper entry. Installed-copy updates use the command path described above.
- Compatibility stage wrappers stay internal-only. If an old caller still sends
- one, collapse it to canonical `vibe` before runtime launch and keep it out of
- the host-visible skill surface.
- ## Skill Execution
- The frozen `agent_skill_organization` is the only task-skill truth. Before plan
- approval, disclose modules, candidates, selected skills and reasons, gaps, and the L / XL difference.
- Organize each confirmed module as a verifiable work unit. Use declared Skill
- outputs to identify ownership, `plan_hints` to shape the work steps, and
- `verify_hints` to extend the module checks. Preserve explicit module
- dependencies and keep `agent_direct` as the visible fallback for a module with
- no suitable Skill. Every work unit must retain its intended outputs, checks,
- binding reason, and dependency links in the existing WorkPlan. Each bound
- assignment must project those fields and the selected Skill guidance into the
- existing ModuleAssignments artifact.
- Only selected skills become module-bound execution units. The host must not
- invent skills, promote route candidates, hide skill sessions, or open another
- requirement/plan/runtime surface. Selection, loading, planning, dispatch, or a
- generic manifest is not contribution proof; completion requires observable
- module results and the module acceptance defined in `protocols/runtime.md`.
- After plan approval, `module-work-plan.json` is the only dispatch authority.
- `agent-execution-handoff.json.result_contract` freezes the `module_execution_v1` submission bindings; after handoff, copy `result_contract.submission_template`, preserve every frozen binding, and fill only the result fields. `criterion_results` states must be exactly `passing`, `failing`, or `blocked`. If canonical rejects the format before cleanup, correct the same `module-execution.json` and reuse the same return command instead of creating another handoff. Code-task TDD evidence belongs inside the same `module-execution.json` when the handoff template includes `tdd_evidence`; fill that structured section before canonical return and do not create a separate `tdd-evidence.json` sidecar. The contract is not execution evidence.
- The Agent still does the real work and creates `module-execution.json`; required failure, blocking,
- missing evidence, or pending human review blocks task completion.
- For XL delegation, root/child hierarchy remains governed: only `root_governed`
- may freeze canonical requirements/plans or make final completion claims.
- `child_governed` lanes inherit the frozen context, stay inside assigned write
- scopes, validate `delegation-envelope.json`, and emit local receipts only.
- ## Quality Rules
- Never claim success without evidence. Minimum invariants:
- - Verify before completion.
- - Do not make silent no-regression claims.
- - Keep requirement and plan artifacts traceable to the launched run.
- - Emit cleanup receipts before claiming phase completion.
- - Expose failures, fallback, degraded status, or blocked state explicitly.
- - Do not add mock success paths, swallowed errors, or template-only pass results.
- - Treat scaffold or draft artifacts as `needs_execution` with `proof_ready = false`; do not call them completed work.
- - Reuse completed work only while effective task inputs, selected Skill content, dependency outputs, and delivered artifact hashes remain unchanged. Rerun affected dependency chains before verification; block dependents when prerequisites fail.
- - Do not use fallback or boundary behavior to bypass real execution,
- verification, or root-cause repair.
- - When a check fails within the confirmed scope, make at most one targeted
- repair for that failure and rerun the affected check. Report the remaining
- blocker when the repair fails, needs a scope decision, or lacks required
- evidence.
- ## User Delivery
- Use the existing WorkDossier as the detailed evidence source. Give the user a
- short delivery summary containing the verified results, their locations, the
- checks that actually ran, and genuine blockers. Exclude scaffolds from
- completed results. Keep internal receipts and
- diagnostic detail in the dossier unless they help the user make a decision.
- ## Protocol Map
- Read these references only after canonical launch or when maintaining the repo:
- - `protocols/runtime.md`: governed runtime contract and stage ownership
- - `protocols/think.md`: planning, research, and pre-execution analysis
- - `protocols/do.md`: coding, debugging, and verification
- - `protocols/review.md`: review and quality gates
- - `protocols/team.md`: XL multi-agent orchestration
- - `protocols/retro.md`: retrospective and evidence-backed corrections
- ## Maintenance
- - Runtime family: governed-runtime-first
- - Version: 4.1.2
- - Updated: 2026-11-04
- - Primary contract metadata: `core/skill-contracts/v1/vibe.json`
README.md · README · 537 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- <div align="right">
- <strong>English</strong> | <a href="./README.zh.md">中文</a>
- </div>
- <div align="center">
- <img src="./logo.png" width="124" alt="VibeSkills logo">
- <h1 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-wordmark-dark.svg">
- <img src="./docs/assets/readme-wordmark-light.svg" width="500" alt="VibeSkills">
- </picture>
- </h1>
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-tagline-en-dark.svg">
- <img src="./docs/assets/readme-tagline-en-light.svg" width="560" alt="VibeSkills is a general-purpose Skill that automatically routes local Skills and intelligently orchestrates harness workflows.">
- </picture>
- <br>
- <a href="https://github.com/foryourhealth111-pixel/Vibe-Skills/releases/latest">
- <strong>Latest stable release</strong>
- </a>
- <br>
- <a href="./docs/install/README.en.md">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/install-cta-en-dark.svg">
- <source media="(prefers-color-scheme: light)" srcset="./docs/assets/install-cta-en-light.svg">
- <img src="./docs/assets/install-cta-en-light.svg" width="210" height="38" alt="Install VibeSkills">
- </picture>
- </a>
- <br>
- <a href="./docs/quick-start.en.md">Quick start</a> ·
- </div>
- <a id="skillsbench-performance"></a>
- <h2 align="center">Measured on SkillsBench</h2>
- <p align="center">
- <strong>Mean verifier reward: +21.12 pp</strong><br>
- <strong>Total tokens: -29.6%</strong> · <strong>Tool calls: -33.1%</strong>
- </p>
- **SkillsBench** is a benchmark designed to evaluate whether AI agents can effectively use Skills to complete professional tasks across diverse domains. Its purpose is to measure how much a model’s ability to solve complex real-world tasks improves when it is equipped with specialized Skills.
- To evaluate performance in production-like environments where a large number of Skills are installed simultaneously, we adapted SkillsBench into a more realistic **large-scale multi-Skill setting**. In the original SkillsBench setup, each task is provided only with the specialized Skill associated with that task. In our modified setting, every task is evaluated in a global environment containing all **195 specialized Skills**, while all other experimental conditions remain unchanged. This setting is intended to assess whether an agent can autonomously discover, select, and orchestrate the relevant Skills from a large installed Skill pool, and organize them into an effective workflow for completing complex tasks.
- **vibeskills v4.1.0** was benchmarked on **SkillsBench** (https://www.skillsbench.ai/) using **DeepSeekV4Flash-VE** and **OpenHands** as the baseline evaluation setup. Compared with the baseline without vibeskills, vibeskills increased the **mean verifier reward by 21.12 percentage points**, while reducing **token consumption by 29.6%** and **tool calls by 33.1%**.
- <p align="center"><sub>Analysis: 82 paired reward tasks · 81 paired resource tasks · Study: <code>full-skills-comparison</code> · Publication commit: <code>ef907ebf8370</code> · <a href="./config/benchmark-results.json">Machine-readable results and provenance</a></sub></p>
- <p align="center">
- <a href="https://github.com/foryourhealth111-pixel/vibeskills-benchmark/tree/main/studies/full-skills-comparison">
- <img src="./docs/assets/skillsbench-task-outcomes.png" width="900" alt="SkillsBench paired task outcomes: Lean Vibe increased mean reward from 50.3% to 71.4%, increased the full-score rate from 47.6% to 69.5%, scored higher on 23 tasks, tied on 55, and scored lower on 4">
- </a>
- </p>
- <p align="center"><sub>Task quality: 39 to 57 full-score tasks; Lean Vibe scored higher on 23 tasks, Native on 4, with 55 ties.</sub></p>
- <p align="center">
- <a href="https://github.com/foryourhealth111-pixel/vibeskills-benchmark/tree/main/studies/full-skills-comparison">
- <img src="./docs/assets/skillsbench-resource-use.png" width="900" alt="SkillsBench resource comparison: total token use fell from 491.1 million for Native to 345.8 million for Lean Vibe, while tool calls fell by 33.1%">
- </a>
- </p>
- <p align="center"><sub>Resource use: 491.122M to 345.756M total tokens, with tool calls reduced from 9,954 to 6,664.</sub></p>
- Analysis of the logs from the original benchmark shows that ***VibeSkills achieves better task performance not by invoking more Skills***.
- Instead, it first clarifies the task objective and delivery requirements, then decomposes a complex task into several verifiable subtasks. It subsequently selects only a small number of truly relevant capabilities from a large pool of candidate Skills and executes them in an order determined by their dependencies. This helps reduce misunderstandings of the task, omitted steps, and incorrect Skill selection, thereby improving overall task performance.
- ***In terms of token cost and tool usage***, this workflow also eliminates a substantial amount of ineffective trial and error. Native agents are more likely to repeatedly invoke tools in unproductive directions, reread the same context, and redo previous work. In contrast, VibeSkills converges more quickly on the critical steps through clearer planning and pre-delivery checks. As a result, it not only improves task quality, but also significantly reduces tool-call loops and the token overhead caused by repeated context processing.
- <p align="center">
- <a href="https://github.com/foryourhealth111-pixel/vibeskills-benchmark/blob/main/studies/full-skills-comparison/README.md">Study, public data, and reproduction</a> ·
- </p>
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark) and (max-width: 600px)" srcset="./docs/assets/readme-preface-v2-en-mobile-dark.svg">
- <source media="(prefers-color-scheme: light) and (max-width: 600px)" srcset="./docs/assets/readme-preface-v2-en-mobile-light.svg">
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-preface-v2-en-dark.svg">
- <source media="(prefers-color-scheme: light)" srcset="./docs/assets/readme-preface-v2-en-light.svg">
- <img src="./docs/assets/readme-preface-v2-en-light.svg" width="900" alt="Skills are excellent local assets of reusable experience. After downloading and installing many Skills, it is easy to sometimes forget which Skills have already been installed and not know which Skills to invoke. Further, when a complex task involves the combined organization and invocation of multiple Skills from different domains, planning becomes complicated for people: they must explain to the AI in detail which Skills each module should use, while the AI may forget these designs during execution. Many current harness frameworks do not actively plan how to make good use of local Skill resources, and may even fall into an either-or scheduling conflict between the harness framework and domain Skill resources. The core of this project is to follow harness frameworks similar to Superpower and GSD. Based on modular decomposition by the planning state machine, it uses different Skills to assist different modules, fully schedules existing local resources, reduces users' planning and cognitive burden, and gives users an end-to-end delivery experience. It is committed to becoming a handy steward for the Skill resources around you. When a complex task appears, it can help users slowly sort out which modules are needed and which good experiences can be reused, then deliver an excellent result.">
- </picture>
- </p>
- <a id="vibeskills-ml-practice-case"></a>
- <h2 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-chapter-01-en-dark.svg">
- <img src="./docs/assets/readme-chapter-01-en-light.svg" width="720" alt="VibeSkills Practice Case: Completing a Machine-Learning Experiment">
- </picture>
- </h2>
- > **Task**
- >
- > *Use public data to complete a reproducible classification experiment and deliver a data audit, statistical review, 4 result figures, a scientific report, and a 7-slide group-meeting deck.*
- The diagram shows what happened after the requirement and plan were approved:
- how the task was executed, what it produced, and how the result was checked.
- The task used the `L` workflow and proceeded in order. During publication
- preparation, the configured folders on the same host contained more than 100
- Skills. VibeSkills reviewed the candidates and their `SKILL.md` files, selected
- 7 for this task, and arranged the work into 5 groups and 10 work units. Those
- units covered environment setup, data audit, modeling, statistical review,
- figures, the report, and the slide deck.
- After the work finished, VibeSkills ran 17 checks across the data, experiment
- results, figures, report, and slides. The task passed final acceptance after the
- required files, cross-deliverable consistency, and core reproduction all passed.
- <p align="center"><strong>7 Skills selected · 5 work groups · 10 / 10 work units completed · 17 / 17 checks passed</strong></p>
- ```mermaid
- %%{init: {"flowchart": {"curve": "monotoneX", "nodeSpacing": 18, "rankSpacing": 36}}}%%
- flowchart LR
- subgraph DISC["Skill discovery"]
- direction TB
- A["Configured Skill folders<br/>100+ Skills"]
- B["Shortlist candidates<br/>Read SKILL.md"]
- SEL["Skill selection<br/>7 Skills assigned"]
- A --> B
- B --> SEL
- end
- subgraph EXEC["Execution · 5 work groups · 10 work units"]
- direction TB
- subgraph G1["G1 · 01 Environment and data"]
- direction LR
- u01["U01<br/>Environment setup"]
- u02["U02<br/>Data audit"]
- u01 --> u02
- end
- subgraph G2["G2 · 02 Modeling and reproduction"]
- direction LR
- u03["U03<br/>Baseline experiment"]
- end
- subgraph G3["G3 · 03 Statistics and scientific review"]
- direction LR
- u04["U04<br/>Statistical analysis"]
- u05["U05<br/>Scientific review"]
- u04 --> u05
- end
- subgraph G4["G4 · 04 Figures and report"]
- direction LR
- u06["U06<br/>Result figures"]
- u07["U07<br/>Report draft"]
- u08["U08<br/>Report review"]
- u06 --> u07
- u07 --> u08
- end
- subgraph G5["G5 · 05 Slides and acceptance"]
- direction LR
- u09["U09<br/>Group-meeting slides"]
- u10["U10<br/>Case package and consistency"]
- u09 --> u10
- end
- G1 --> G2
- G2 --> G3
- G3 --> G4
- G4 --> G5
- end
- subgraph MID["Run and outputs"]
- direction TB
- S(["Run status<br/>10 / 10 completed<br/>0 failed · 0 blocked"])
- D["Real outputs<br/>4 figures · Scientific report<br/>7-slide deck"]
- S --> D
- end
- subgraph VERIFY["Verification · 17 checks"]
- direction TB
- subgraph V1["V1 · Foundation and plan"]
- direction LR
- t01["T01<br/>required-files"]
- t02["T02 module-output-<br/>patterns"]
- t03["T03 runtime-plan-<br/>binding"]
- t04["T04 environment-<br/>contract"]
- t01 --> t02
- t02 --> t03
- t03 --> t04
- end
- subgraph V2["V2 · Data, model, and reproduction"]
- direction LR
- t05["T05<br/>dataset-contract"]
- t06["T06 split-and-model-<br/>contract"]
- t07["T07<br/>baseline-results"]
- t08["T08 exact-<br/>reproduction"]
- t05 --> t06
- t06 --> t07
- t07 --> t08
- end
- subgraph V3["V3 · Statistics and deliverables"]
- direction LR
- t09["T09 uncertainty-<br/>consistency"]
- t10["T10 statistics-write-<br/>protection"]
- t11["T11 figure-<br/>traceability"]
- t12["T12 report-<br/>consistency"]
- t13["T13 slides-<br/>consistency"]
- t09 --> t10
- t10 --> t11
- t11 --> t12
- t12 --> t13
- end
- subgraph V4["V4 · Publication and boundaries"]
- direction LR
- t14["T14 bilingual-summary-<br/>consistency"]
- t15["T15 visual-material-<br/>guidance"]
- t16["T16 manifest-<br/>boundary"]
- t17["T17 artifact-path-<br/>boundary"]
- t14 --> t15
- t15 --> t16
- t16 --> t17
- end
- V1 --> V2
- V2 --> V3
- V3 --> V4
- end
- E(["Final acceptance<br/>17 / 17 checks passed<br/>PASS"])
- DISC --> EXEC
- EXEC --> MID
- MID --> VERIFY
- VERIFY --> E
- classDef source fill:#EAF3F3,stroke:#2B6F73,color:#182026;
- classDef selected fill:#F5EBEE,stroke:#8A5363,color:#182026;
- classDef unit fill:#FFFFFF,stroke:#5B7F83,color:#182026;
- classDef status fill:#F7EEF1,stroke:#8A5363,color:#182026,stroke-width:2px;
- classDef output fill:#E8F2F0,stroke:#2D7F75,color:#182026;
- classDef check fill:#FFFFFF,stroke:#8A9AA7,color:#182026;
- classDef result fill:#EAF4EE,stroke:#2F7A4B,color:#182026,stroke-width:2px;
- class A,B source;
- class SEL selected;
- class u01,u02,u03,u04,u05,u06,u07,u08,u09,u10 unit;
- class S status;
- class D output;
- class t01,t02,t03,t04,t05,t06,t07,t08,t09,t10,t11,t12,t13,t14,t15,t16,t17 check;
- class E result;
- style DISC fill:transparent,stroke:#AAB7C4,stroke-width:1px,stroke-dasharray:4 3;
- style EXEC fill:transparent,stroke:#AAB7C4,stroke-width:1px,stroke-dasharray:4 3;
- style MID fill:transparent,stroke:#AAB7C4,stroke-width:1px,stroke-dasharray:4 3;
- style VERIFY fill:transparent,stroke:#AAB7C4,stroke-width:1px,stroke-dasharray:4 3;
- style G1 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style G2 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style G3 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style G4 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style G5 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style V1 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style V2 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style V3 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- style V4 fill:#FFFFFF,stroke:#DCE4EA,stroke-width:1px;
- linkStyle default stroke:#6D878B,stroke-width:1px;
- ```
- <p align="center">
- <a href="./docs/cases/ml-experiment/README.md#case-execution">View case execution</a> ·
- <a href="./docs/cases/ml-experiment/README.md#final-delivery">View final delivery</a>
- </p>
- <a id="how-vibeskills-carries-a-task-through-to-delivery"></a>
- <h2 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-chapter-02-en-dark.svg">
- <img src="./docs/assets/readme-chapter-02-en-light.svg" width="720" alt="How VibeSkills Carries a Task Through to Delivery">
- </picture>
- </h2>
- *VibeSkills gives an Agent one process from receiving a task to checking the delivery.*
- Each stage answers a concrete question: what needs to be done, how the
- work should proceed, which Skills should take part, what actually happened, and
- whether the result is ready to deliver.
- <p align="center">
- <img src="./docs/assets/vibeskills-harness-overview-en.svg" width="860" alt="VibeSkills confirms the requirement, chooses L or XL, organizes Skills, records the work, and checks the result; code work can enter a TDD loop">
- </p>
- <ol type="I">
- <li><strong>Confirms the requirement.</strong> Before work begins, it confirms the goal, constraints, available material, and expected delivery. The process stops here until the requirement is approved, giving the plan and final check a clear basis.</li>
- <li><strong>Recommends a level.</strong> VibeSkills recommends <code>L</code> or <code>XL</code> from the task's scope, steps, dependencies, and opportunities for parallel work. You then confirm the level. Manageable work proceeds in order; larger work is split more finely.</li>
- <li><strong>Organizes Skills.</strong> VibeSkills reviews the local Skill folders, selects the methods that fit each part, and states what each Skill owns, what it should deliver, and how completion will be checked.</li>
- <li><strong>Executes and records.</strong> After plan approval, the current Agent completes the work. Code tasks can use test-driven development (TDD) when appropriate: show the problem with a failing test, make the change, and run the tests again. Completed, failed, and blocked states are recorded so a later session can continue.</li>
- <li><strong>Checks the result.</strong> VibeSkills compares the actual result with every planned item. Required work that is incomplete, failed, or blocked prevents final acceptance.</li>
- </ol>
- <details>
- <summary><strong>When to use L or XL</strong></summary>
- | Level | Best for | How it works |
- |:---|:---|:---|
- | `L` | Multi-step work of manageable size | Splits the task, then works through the parts in order with less time and context overhead |
- | `XL` | Larger work with several relatively independent parts | Uses a more detailed breakdown and can run up to two non-conflicting parts at the same time, with additional coordination and result collection |
- </details>
- <a id="how-local-skills-take-part"></a>
- <h2 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-chapter-03-en-dark.svg">
- <img src="./docs/assets/readme-chapter-03-en-light.svg" width="720" alt="How Local Skills Take Part">
- </picture>
- </h2>
- *Local Skills can store tool usage, working steps, decision rules, and checking methods.*
- VibeSkills reviews the local Skill folders you configure, then
- shortlists the Skills that fit the work required by each part of the task.
- <p align="center">
- <img src="./docs/assets/vibeskills-skill-orchestration-en.png" width="860" alt="VibeSkills sits between task modules and local Skills, coordinating the work and selecting only the Skills each part needs">
- </p>
- The left side shows the different kinds of work in the task, VibeSkills makes
- the assignment in the middle, and the local Skill folders are on the right. A
- selected Skill is tied to concrete work, expected delivery, and a check. The
- current Agent then follows the shared plan.
- <table align="center" width="94%">
- <thead>
- <tr>
- <th width="50%" align="center">Passive Skill triggering</th>
- <th width="50%" align="center">With VibeSkills</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>The AI reacts to a few obvious words</td>
- <td><strong>It splits the whole task first</strong></td>
- </tr>
- <tr>
- <td>The same familiar Skills are used repeatedly</td>
- <td><strong>Each part is checked for a better-fitting Skill</strong></td>
- </tr>
- <tr>
- <td>Unmatched work is handled on the spot</td>
- <td><strong>A useful Skill is assigned to specific work with a stated result</strong></td>
- </tr>
- <tr>
- <td>Separate calls are left disconnected</td>
- <td><strong>All results are brought together and checked at the end</strong></td>
- </tr>
- </tbody>
- </table>
- VibeSkills does something straightforward: **it first makes the whole task
- clear, then assigns the right Skills to the relevant parts**. It coordinates
- the work and checks the combined result at the end. The task uses the Skills it
- needs; the rest of the local library stays available without entering the plan.
- You can keep adding your own Skills, team Skills, and third-party Skills.
- VibeSkills does not call every installed Skill automatically; it selects the
- Skills that fit the current task. The size of the library defines the available
- choices, not a list that every task must use.
- <details>
- <summary><strong>Will a large Skill library use a lot of tokens?</strong></summary>
- VibeSkills checks the Skill folders you configure, but finding files locally
- and placing their full contents in the model context are different operations.
- Discovery and index generation happen locally. VibeSkills first extracts compact
- information such as each Skill's name, description, intended use, and boundaries,
- then uses that information to shortlist candidates for each part of the task.
- Only retained candidates are then read as complete `SKILL.md` files. Execution
- uses only the Skills written into the plan. Token usage therefore depends mainly
- on how many candidates the task retains, how long those documents are, and how
- complex the task is. It is not the same as reading the full local Skill library
- into the model context.
- This overhead is not zero. More candidates, longer Skill documents, or a more
- finely divided task will use more context. The current design bounds that cost
- with a local index, candidate shortlisting, and on-demand reading.
- </details>
- <details>
- <summary><strong>Local folders and selection records</strong></summary>
- Alongside the shared Skills directory, more local folders can be listed in
- `~/.vibeskills/skill-roots.json` or
- `<workspace>/.vibeskills/skill-roots.json`.
- A Skill needs a readable `SKILL.md`, a name that does not conflict with another
- Skill, and a clear fit for the current work before it can be selected. Adding a
- local folder makes those Skills available to later tasks without waiting for the
- VibeSkills repository to include them.
- During planning, `agent_skill_organization` stores which Skills are intended for
- each part of the task. During execution, `module_assignments` stores the actual
- assignment. Finding a Skill means it can be considered; it does not mean the
- Skill has already taken part in the work.
- </details>
- <a id="how-a-task-can-continue-and-be-reviewed"></a>
- <h2 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-chapter-04-en-dark.svg">
- <img src="./docs/assets/readme-chapter-04-en-light.svg" width="720" alt="How a Task Can Continue and Be Reviewed">
- </picture>
- </h2>
- *A public example lets readers follow the requirement, plan, actual result, and final check.*
- VibeSkills keeps the approved requirement, plan, execution progress, and final
- check in the same task record. A later session can continue from the saved
- progress, and a review can compare the original plan with the actual result.
- Installation state is recorded separately so it is not confused with task
- completion.
- <details>
- <summary><strong>View the record files</strong></summary>
- | File or directory | What it is for |
- |:---|:---|
- | `install-receipt.json` | Records the files written by the installer so `check` can find missing or changed files |
- | `session_root` | Stores the input, progress, important decisions, and summary for one task |
- | `module-work-plan.json` | Stores the approved work plan, including responsibility, expected output, and checks |
- | `module-execution.json` | Stores what each part actually produced and whether it completed, failed, or was blocked |
- | `delivery-acceptance-report.json` or `.md` | Stores the final check and shows which items passed |
- Maintainers can use the
- [pre-release checks](https://github.com/foryourhealth111-pixel/Vibe-Skills/actions/workflows/vco-gates.yml). Start with
- the checks in that list and run wider audits only when there is a reason.
- </details>
- A successful installation does not mean the task ran, and a task record does
- not mean the final result passed its checks.
- <a id="use-vibeskills"></a>
- <h2 align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-chapter-05-en-dark.svg">
- <img src="./docs/assets/readme-chapter-05-en-light.svg" width="720" alt="Use VibeSkills">
- </picture>
- </h2>
- <ol type="I">
- <li><strong>Invoke.</strong> In any AI application that supports local Skills, invoke VibeSkills through the application's Skills entry, using <code>$vibe</code>, <code>/vibe</code>, or the syntax it provides.</li>
- <li><strong>Discover.</strong> VibeSkills scans the Skills installation directory and any additional local Skill folders you configure to find the Skills currently available.</li>
- <li><strong>Organize.</strong> It selects suitable Skills for the task, assigns them to the relevant work, and coordinates the result. You do not need to remember which Skill should be used when.</li>
- </ol>
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-wave-divider-dark.svg">
- <img src="./docs/assets/readme-wave-divider-light.svg" width="240" alt="">
- </picture>
- </p>
- <a id="more-documentation"></a>
- <h2 align="center">More Documentation</h2>
- <table align="center" width="90%">
- <thead>
- <tr>
- <th width="50%" align="center">Need</th>
- <th width="50%" align="center">Start here</th>
- </tr>
- </thead>
- <tbody>
- <tr><td align="center">See a complete real run</td><td align="center"><strong><a href="./docs/cases/ml-experiment/README.md">Machine-learning experiment case</a></strong></td></tr>
- <tr><td align="center">Install, update, uninstall</td><td align="center"><strong><a href="./docs/install/README.en.md">Simple install</a></strong></td></tr>
- <tr><td align="center">First use</td><td align="center"><strong><a href="./docs/quick-start.en.md">Quick start</a></strong></td></tr>
- <tr><td align="center">Current release</td><td align="center"><strong><a href="https://github.com/foryourhealth111-pixel/Vibe-Skills/releases/latest">GitHub release metadata</a></strong></td></tr>
- <tr><td align="center">How it works</td><td align="center"><strong><a href="./docs/README.md">Documentation index</a></strong></td></tr>
- <tr><td align="center">Troubleshooting</td><td align="center"><strong><a href="./docs/troubleshooting.md">Troubleshooting guide</a></strong></td></tr>
- <tr><td align="center">Contributing</td><td align="center"><strong><a href="./CONTRIBUTING.md">Contribution guide</a></strong></td></tr>
- </tbody>
- </table>
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-wave-divider-dark.svg">
- <img src="./docs/assets/readme-wave-divider-light.svg" width="240" alt="">
- </picture>
- </p>
- <a id="community-and-credits"></a>
- <h2 align="center">Community and Credits</h2>
- Questions, corrections, and well-scoped contributions are welcome through
- [GitHub Issues](https://github.com/foryourhealth111-pixel/Vibe-Skills/issues)
- and pull requests.
- VibeSkills discussions and community practice can also continue on
- [LINUX DO](https://linux.do/). It is a place to exchange technical questions,
- AI practice, and experience. Thank you to the LINUX DO community for supporting
- this project.
- The [VibeSkills 3.1.0 community practice cases](https://linux.do/t/topic/2061161)
- collect several examples that were shared with the community.
- Community contributors include
- [xiaozhongyaonvli](https://github.com/xiaozhongyaonvli) and
- [ruirui2345](https://github.com/ruirui2345).
- Third-party software attribution and license information are listed in
- [NOTICE](./NOTICE) and [third-party licenses](./THIRD_PARTY_LICENSES.md).
- <p align="center">
- <picture>
- <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/readme-wave-divider-dark.svg">
- <img src="./docs/assets/readme-wave-divider-light.svg" width="240" alt="">
- </picture>
- </p>
bundled/skills/autonomous-builder/assets/auto-continue.sh · Bundled script · 252 lines · 1 finding marked
- #!/bin/bash
- # =============================================================================
- # Auto-Continue Supervisor Script
- # Generated by: autonomous-builder skill
- # Purpose: Self-supervising long-running autonomous operation
- # =============================================================================
- # Configuration (will be replaced with actual values during initialization)
- PROJECT_DIR="{{PROJECT_DIR}}"
- BUILDER_DIR="$PROJECT_DIR/.builder"
- STATE_FILE="$BUILDER_DIR/state.json"
- SUPERVISOR_CONFIG="$BUILDER_DIR/supervisor.json"
- LOG_FILE="$BUILDER_DIR/supervisor.log"
- # Default monitoring settings
- CHECK_INTERVAL=60
- SESSION_TIMEOUT=300
- MAX_RESTART_ATTEMPTS=10
- RESTART_COOLDOWN=5
- # =============================================================================
- # Utility Functions
- # =============================================================================
- log() {
- echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
- }
- load_config() {
- if [ -f "$SUPERVISOR_CONFIG" ]; then
- # Parse JSON config (simple grep-based parsing)
- CHECK_INTERVAL=$(grep -o '"check_interval_seconds"[[:space:]]*:[[:space:]]*[0-9]*' "$SUPERVISOR_CONFIG" | grep -o '[0-9]*$')
- SESSION_TIMEOUT=$(grep -o '"session_timeout_seconds"[[:space:]]*:[[:space:]]*[0-9]*' "$SUPERVISOR_CONFIG" | grep -o '[0-9]*$')
- MAX_RESTART_ATTEMPTS=$(grep -o '"max_restart_attempts"[[:space:]]*:[[:space:]]*[0-9]*' "$SUPERVISOR_CONFIG" | grep -o '[0-9]*$')
- RESTART_COOLDOWN=$(grep -o '"restart_cooldown_seconds"[[:space:]]*:[[:space:]]*[0-9]*' "$SUPERVISOR_CONFIG" | grep -o '[0-9]*$')
- fi
- }
- get_project_status() {
- if [ -f "$STATE_FILE" ]; then
- grep -o '"status"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE_FILE" | head -1 | cut -d'"' -f4
- else
- echo "not_initialized"
- fi
- }
- get_last_activity() {
- if [ -f "$STATE_FILE" ]; then
- grep -o '"last_activity"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE_FILE" | cut -d'"' -f4
- else
- echo ""
- fi
- }
- get_pending_features_count() {
- if [ -f "$STATE_FILE" ]; then
- # Count pending features
- python3 -c "
- import json
- with open('$STATE_FILE') as f:
- state = json.load(f)
- pending = [f for f in state.get('features', {}).get('pending', []) if f]
- print(len(pending))
- " 2>/dev/null || echo "0"
- else
- echo "0"
- fi
- }
- get_session_count() {
- if [ -f "$STATE_FILE" ]; then
- grep -o '"session_count"[[:space:]]*:[[:space:]]*[0-9]*' "$STATE_FILE" | grep -o '[0-9]*$'
- else
- echo "0"
- fi
- }
- update_statistics() {
- local sessions=$1
- local restarts=$2
- if [ -f "$SUPERVISOR_CONFIG" ]; then
- # Update statistics in config
- python3 -c "
- import json
- with open('$SUPERVISOR_CONFIG', 'r') as f:
- config = json.load(f)
- config['statistics']['total_sessions'] = $sessions
- config['statistics']['total_restarts'] = $restarts
- config['statistics']['last_restart_time'] = '$(date -Iseconds)'
- with open('$SUPERVISOR_CONFIG', 'w') as f:
- json.dump(config, f, indent=2)
- " 2>/dev/null
- fi
- }
- # =============================================================================
- # Health Check Functions
- # =============================================================================
- check_progress_stall() {
- local last_feature=$1
- local current_feature=$(grep -o '"current_feature"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE_FILE" | cut -d'"' -f4)
- if [ "$last_feature" = "$current_feature" ] && [ -n "$current_feature" ]; then
- # Same feature, check operations since progress
- local ops=$(grep -o '"operations_since_progress"[[:space:]]*:[[:space:]]*[0-9]*' "$STATE_FILE" | grep -o '[0-9]*$')
- if [ -n "$ops" ] && [ "$ops" -gt 10 ]; then
- return 0 # Stalled
- fi
- fi
- return 1 # Not stalled
- }
- check_error_spike() {
- if [ -f "$BUILDER_DIR/errors.json" ]; then
- local recent_errors=$(grep -c '"timestamp"' "$BUILDER_DIR/errors.json" 2>/dev/null || echo "0")
- if [ "$recent_errors" -gt 5 ]; then
- return 0 # Error spike detected
- fi
- fi
- return 1 # No error spike
- }
- # =============================================================================
- # Main Supervisor Loop
- # =============================================================================
- main() {
- log "=========================================="
- log "Autonomous Builder Supervisor Started"
- log "=========================================="
- log "Project: $PROJECT_DIR"
- log "Check Interval: ${CHECK_INTERVAL}s"
- log "Session Timeout: ${SESSION_TIMEOUT}s"
- log "Max Restart Attempts: $MAX_RESTART_ATTEMPTS"
- log ""
- local restart_count=0
- local last_feature=""
- local stall_count=0
- while true; do
- load_config
- # Check 1: Project completion
- local status=$(get_project_status)
- if [ "$status" = "completed" ]; then
- log "✅ Project completed! Supervisor exiting."
- log "Total sessions: $(get_session_count)"
- log "Total restarts: $restart_count"
- exit 0
- fi
- # Check 2: Pending features
- local pending=$(get_pending_features_count)
- if [ "$pending" -eq 0 ] && [ "$status" != "not_initialized" ]; then
- log "✅ All features completed! Project done."
- exit 0
- fi
- # Check 3: Progress stall
- if check_progress_stall "$last_feature"; then
- stall_count=$((stall_count + 1))
- log "⚠️ Progress stall detected (count: $stall_count)"
- if [ $stall_count -ge 3 ]; then
- log "🔴 Too many stalls. Pausing for user intervention."
- log "Type 'resume' to continue, or 'abort' to stop."
- read -t 60 user_input
- if [ "$user_input" = "abort" ]; then
- log "User aborted. Exiting."
- exit 1
- fi
- stall_count=0
- fi
- else
- stall_count=0
- fi
- # Check 4: Error spike
- if check_error_spike; then
- log "⚠️ Error spike detected. Recording for analysis."
- fi
- # Check 5: Max restart attempts
- if [ $restart_count -ge $MAX_RESTART_ATTEMPTS ]; then
- log "🔴 Max restart attempts reached ($MAX_RESTART_ATTEMPTS)"
- log "Please investigate manually. Supervisor pausing."
- sleep 300 # Wait 5 minutes before retry
- restart_count=0 # Reset counter
- fi
- # Start/Resume Claude Session
- log "🚀 Starting Claude session #$((restart_count + 1))..."
- log " Pending features: $pending"
- log " Current status: $status"
- # Update statistics before session
- update_statistics $(get_session_count) $restart_count
- # Run Claude with auto-continue flag
- # Note: --dangerously-skip-permissions enables unattended operation
- # WARNING: This bypasses all permission prompts - use only in trusted environments
- claude --skill autonomous-builder --project "$PROJECT_DIR" --dangerously-skip-permissions 2>&1 | tee -a "$LOG_FILE"
- Note: Starts a coding agent with its permission prompts off
- Line 204 on GitHub
- local exit_code=$?
- # Session ended
- log "Session ended with code: $exit_code"
- # Update restart count
- restart_count=$((restart_count + 1))
- # Record current feature for stall detection
- last_feature=$(grep -o '"current_feature"[[:space:]]*:[[:space:]]*"[^"]*"' "$STATE_FILE" | cut -d'"' -f4)
- # Cooldown before restart
- log "Waiting ${RESTART_COOLDOWN}s before next session..."
- sleep $RESTART_COOLDOWN
- done
- }
- # =============================================================================
- # Signal Handlers
- # =============================================================================
- cleanup() {
- log "Supervisor stopped by signal. Saving state..."
- update_statistics $(get_session_count) $(cat /tmp/autonomous_restarts 2>/dev/null || echo "0")
- exit 0
- }
- trap cleanup SIGINT SIGTERM
- # =============================================================================
- # Entry Point
- # =============================================================================
- # Validate project directory
- if [ ! -d "$PROJECT_DIR" ]; then
- echo "Error: Project directory not found: $PROJECT_DIR"
- exit 1
- fi
- # Create .builder directory if not exists
- mkdir -p "$BUILDER_DIR"
- # Initialize log file
- touch "$LOG_FILE"
- # Run main loop
- main
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.