Skip to content

j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan

deepworkplan

Verified

DeepWorkPlan — turn any repo AI-first and run Deep Work Plans. Routes to create, execute, refine, resume, status, verify, upgrade, and repo-onboarding sub-skills based on intent. Use when the developer wants to plan, execute, manage, or verify structured multi-task work, or make a repository AI-agent-ready.

FileKindSize
SKILL.mdskill md12.0 KB
TRUST.mdmarkdown16.1 KB
addons/README.mdmarkdown11.7 KB
addons/machine-installs.mdmarkdown2.9 KB
examples/CREATE_PLAN.mdmarkdown6.9 KB
examples/ORCHESTRATOR_TASK_TEMPLATE_create_child_dwp.mdmarkdown15.0 KB
examples/ORCHESTRATOR_TASK_TEMPLATE_execute_child_dwp.mdmarkdown16.7 KB
examples/ORCHESTRATOR_TASK_TEMPLATE_integration_checkpoint.mdmarkdown9.0 KB
examples/PROMPTS_TEMPLATE.mdmarkdown4.0 KB
examples/TEAM_AGENTS_TASK_TEMPLATE.mdmarkdown5.1 KB
examples/V6_PLAN_EXAMPLE.mdmarkdown5.5 KB
guide/GUIDE.mdmarkdown8.0 KB
guide/authoring.mdmarkdown28.5 KB
guide/execution.mdmarkdown21.0 KB
guide/large-repo-onboarding.mdmarkdown3.3 KB
guide/orchestration-at-scale.mdmarkdown11.4 KB
guide/orchestrator.mdmarkdown37.9 KB
guide/prompts.mdmarkdown10.1 KB
guide/skills-integration.mdmarkdown6.5 KB
guide/structure.mdmarkdown6.2 KB
guide/swarm.mdmarkdown21.2 KB
guide/team-agents.mdmarkdown12.3 KB
shared/adaptation.mdmarkdown2.7 KB
shared/addon_sync.pyscript17.7 KB
shared/benchmark.pyscript97.6 KB
shared/config.pyscript41.5 KB
shared/context.shscript4.2 KB
shared/context_manifest.pyscript40.8 KB
shared/contract_v6.pyscript82.7 KB
shared/delegators.pyscript3.0 KB
shared/dwp-paths.mdmarkdown5.8 KB
shared/finalize_plan.pyscript7.2 KB
shared/install-verification.mdmarkdown1.8 KB
shared/ledger.pyscript141.5 KB
shared/migrate_v6.pyscript46.5 KB
shared/outcomes.pyscript27.2 KB
shared/plan_paths.pyscript4.8 KB
shared/resources.pyscript49.0 KB
shared/scheduler.pyscript41.6 KB
shared/state_contract.pyscript9.8 KB
shared/swarm.pyscript27.3 KB
shared/troubleshooting.mdmarkdown7.4 KB
shared/update-state.pyscript12.5 KB
shared/views.pyscript21.0 KB
shared/working-principles.mdmarkdown7.1 KB
spec/ADDONS.mdmarkdown27.4 KB
spec/AGENT_PROTOCOL.mdmarkdown28.0 KB
spec/ARCHETYPES.mdmarkdown10.6 KB
spec/BENCHMARK.mdmarkdown20.3 KB
spec/CONFIG.mdmarkdown8.7 KB
spec/DOCUMENTATION_STANDARD.mdmarkdown40.7 KB
spec/DWP_SPECIFICATION.mdmarkdown65.1 KB
spec/LITE_PLANS.mdmarkdown4.0 KB
spec/PLAN_STATE.mdmarkdown34.9 KB
spec/README.mdmarkdown11.5 KB
spec/V6_CONTEXT.mdmarkdown6.4 KB
spec/V6_CONTRACT.mdmarkdown12.3 KB
spec/V6_LIFECYCLE.mdmarkdown13.5 KB
spec/V6_RESOURCES.mdmarkdown4.7 KB
spec/V7_ABILITIES.mdmarkdown4.9 KB
spec/V7_CONTRACT.mdmarkdown6.4 KB
spec/V7_ROADMAP.mdmarkdown4.6 KB
spec/schema/addon-descriptor-v1.schema.jsonconfig5.5 KB
spec/schema/benchmark-record.schema.jsonconfig14.0 KB
spec/schema/context-manifest-v6.schema.jsonconfig12.5 KB
spec/schema/dwp-config-v1.schema.jsonconfig3.5 KB
spec/schema/dwp-handoff-v1.schema.jsonconfig3.0 KB
spec/schema/journal-event-v6.schema.jsonconfig22.3 KB
spec/schema/journal-event-v7.schema.jsonconfig24.9 KB
spec/schema/learnings-record.schema.jsonconfig6.0 KB
spec/schema/plan-contract-v6.schema.jsonconfig16.4 KB
spec/schema/plan-contract-v7.schema.jsonconfig16.6 KB
spec/schema/plan-manifest-v2.schema.jsonconfig1.0 KB
spec/schema/plan-manifest-v5.schema.jsonconfig1.3 KB
spec/schema/plan-manifest-v6.schema.jsonconfig2.0 KB
spec/schema/plan-manifest-v7.schema.jsonconfig1.7 KB
spec/schema/plan-manifest.schema.jsonconfig1.8 KB
spec/schema/plan-snapshot-v6.schema.jsonconfig7.8 KB
spec/schema/plan-state-v2.schema.jsonconfig6.4 KB
spec/schema/plan-state-v5.schema.jsonconfig6.7 KB
spec/schema/plan-state.schema.jsonconfig3.7 KB

shared/context.sh

View on GitHub
#!/usr/bin/env bash
# context.sh — shared context detection for all DeepWorkPlan sub-skills.
#
# Detects the current repository context and resolves where Deep Work Plan
# outputs live (.dwp/). Emits a single-line JSON object that sub-skills can read.
# Compatible with: Claude Code, Codex CLI, Cursor, Gemini CLI, OpenClaw,
# Windsurf, bare shell.
#
# Usage:  bash context.sh
# Output: {"repo":"...","repo_root":"...","branch":"...","agent_tool":"...","dwp_dir":"..."}
#
# Contract:
#   - repo_root : the repository root (git toplevel if available, else $PWD).
#   - repo      : the repo name (from `git remote get-url origin`, else the
#                 basename of repo_root).
#   - branch    : current git branch, or "unknown" outside a git work tree.
#   - agent_tool: the AI coding agent in use, detected from vendor env vars
#                 (DWP_AGENT_TOOL override > harness env vars > "unknown").
#   - dwp_dir   : the .dwp/ output location. Default "<repo_root>/.dwp".
#                 Overridable via the DWP_DIR env var. See shared/dwp-paths.md.
#
# Bash 3.2 compatibility (macOS default): NO mapfile/readarray, NO `declare -A`
# associative arrays, NO `${var^^}`/`${var,,}` case conversion.

set -euo pipefail

# ── Repo root ────────────────────────────────────────────────────────────────
REPO_ROOT=""
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
  REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo "")
fi
if [ -z "$REPO_ROOT" ]; then
  REPO_ROOT="$PWD"
fi

# ── Repo name ────────────────────────────────────────────────────────────────
REPO=""
REMOTE=$(git remote get-url origin 2>/dev/null || echo "")
if [ -n "$REMOTE" ]; then
  REPO="${REMOTE##*/}"
  REPO="${REPO%.git}"
fi
if [ -z "$REPO" ]; then
  REPO=$(basename "$REPO_ROOT")
fi

# ── Branch ───────────────────────────────────────────────────────────────────
BRANCH=$(git branch --show-current 2>/dev/null || echo "")
if [ -z "$BRANCH" ]; then
  BRANCH="unknown"
fi

# ── Agent detection ──────────────────────────────────────────────────────────
# Priority: explicit override > vendor env vars > "unknown".
AGENT_TOOL="unknown"
if [ -n "${DWP_AGENT_TOOL:-}" ]; then
  AGENT_TOOL="$DWP_AGENT_TOOL"
elif [ -n "${CLAUDE_PLUGIN_ROOT:-}${CLAUDECODE:-}" ]; then
  AGENT_TOOL="claude-code"
elif [ -n "${CODEX_SESSION_ID:-}${CODEX_HOME:-}" ]; then
  AGENT_TOOL="codex-cli"
elif [ -n "${CURSOR_SESSION_ID:-}${CURSOR_TRACE_ID:-}" ]; then
  AGENT_TOOL="cursor"
elif [ -n "${OPENCLAW_SESSION:-}" ]; then
  AGENT_TOOL="openclaw"
elif [ -n "${GEMINI_SESSION_ID:-}" ]; then
  AGENT_TOOL="gemini-cli"
elif [ -n "${WINDSURF_SESSION_ID:-}" ]; then
  AGENT_TOOL="windsurf"
fi

# ── .dwp/ location ───────────────────────────────────────────────────────────
# Default to <repo_root>/.dwp; override via DWP_DIR. See shared/dwp-paths.md.
DWP_DIR="${DWP_DIR:-$REPO_ROOT/.dwp}"

# ── Output (single-line JSON) ────────────────────────────────────────────────
# Emits compact JSON. Paths are hostile-but-valid in the wild — spaces, shell
# metacharacters, and even embedded quotes or backslashes escapes — so every
# field is escaped for a JSON string literal before printing. Bash 3.2
# compatible: sed is POSIX, no mapfile/associative arrays/case conversion.
json_escape() {
  printf '%s' "$1" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'
}

printf '{"repo":"%s","repo_root":"%s","branch":"%s","agent_tool":"%s","dwp_dir":"%s"}\n' \
  "$(json_escape "$REPO")" "$(json_escape "$REPO_ROOT")" "$(json_escape "$BRANCH")" \
  "$(json_escape "$AGENT_TOOL")" "$(json_escape "$DWP_DIR")"
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall