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/plan_paths.py

View on GitHub
#!/usr/bin/env python3
"""Allocate and resolve flat Deep Work Plan directories.

The counter is local to one .dwp/plans directory. Existing unnumbered plans
remain in place and can still be selected by their exact names.
"""

import argparse
import fcntl
import os
import re


SLUG = re.compile(r'^[a-z0-9]+(?:_[a-z0-9]+){1,4}$')
NUMBERED = re.compile(r'^PLAN_([0-9]{3,})_([a-z0-9]+(?:_[a-z0-9]+){1,4})$')


class PlanPathError(Exception):
    pass


def plans(root):
    if not os.path.isdir(root):
        return []
    return [name for name in os.listdir(root)
            if name.startswith('PLAN_') and
            os.path.isdir(os.path.join(root, name))]


def number(name):
    match = NUMBERED.fullmatch(name)
    return int(match.group(1)) if match else None


def allocate(root, slug, max_words=5):
    """Claim a new folder and persist the next number under an exclusive lock."""
    if not SLUG.fullmatch(slug) or len(slug.split('_')) > max_words:
        raise PlanPathError('name must be 2-%d lowercase snake_case words' %
                            max_words)
    os.makedirs(root, exist_ok=True)
    lock_path = os.path.join(root, '.plan-id.lock')
    with open(lock_path, 'a+b') as lock:
        fcntl.flock(lock, fcntl.LOCK_EX)
        counter_path = os.path.join(root, '.next-plan-id')
        try:
            with open(counter_path, encoding='ascii') as counter:
                stored = int(counter.read().strip())
            if stored < 1:
                raise ValueError('counter must be positive')
        except FileNotFoundError:
            stored = 1
        except ValueError as exc:
            raise PlanPathError('invalid .next-plan-id: %s' % exc)
        next_id = max([stored] + [number(name) + 1 for name in plans(root)
                                  if number(name) is not None])
        while True:
            name = 'PLAN_%03d_%s' % (next_id, slug)
            path = os.path.join(root, name)
            try:
                os.mkdir(path)
                break
            except FileExistsError:
                next_id += 1
        pending = counter_path + '.tmp.%d' % os.getpid()
        with open(pending, 'w', encoding='ascii') as counter:
            counter.write('%d\n' % (next_id + 1))
            counter.flush()
            os.fsync(counter.fileno())
        os.replace(pending, counter_path)
        return path


def resolve(root, selector):
    """Resolve an exact name, numeric id, unique slug, or latest plan."""
    names = plans(root)
    if not names:
        raise PlanPathError('no plans found in %s' % root)
    if selector in names:
        return os.path.join(root, selector)
    if selector.startswith('PLAN_'):
        selector = selector[5:]
    if selector == 'latest':
        numbered = [name for name in names if number(name) is not None]
        if numbered:
            highest = max(number(name) for name in numbered)
            matches = [name for name in numbered if number(name) == highest]
            if len(matches) != 1:
                raise PlanPathError('duplicate plan ID %d: %s' %
                                    (highest, ', '.join(sorted(matches))))
            winner = matches[0]
        else:
            winner = max(names, key=lambda name: os.path.getmtime(
                os.path.join(root, name)))
        return os.path.join(root, winner)
    if selector.isdecimal():
        matches = [name for name in names if number(name) == int(selector)]
    else:
        matches = [name for name in names if name == 'PLAN_' + selector or
                   (NUMBERED.fullmatch(name) and
                    NUMBERED.fullmatch(name).group(2) == selector)]
    if len(matches) == 1:
        return os.path.join(root, matches[0])
    if matches:
        raise PlanPathError('ambiguous plan %r: %s' %
                            (selector, ', '.join(sorted(matches))))
    raise PlanPathError('plan %r not found in %s' % (selector, root))


def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--plans-dir', required=True)
    sub = parser.add_subparsers(dest='command', required=True)
    allocation = sub.add_parser('allocate')
    allocation.add_argument('slug')
    allocation.add_argument('--max-words', type=int, choices=(4, 5), default=5)
    sub.add_parser('resolve').add_argument('selector')
    sub.add_parser('list')
    args = parser.parse_args()
    root = os.path.abspath(args.plans_dir)
    try:
        if args.command == 'allocate':
            print(allocate(root, args.slug, args.max_words))
        elif args.command == 'resolve':
            print(resolve(root, args.selector))
        else:
            for name in sorted(plans(root), key=lambda n: (number(n) is None,
                                                            number(n) or 0, n)):
                print(name)
    except PlanPathError as exc:
        parser.exit(2, '%s\n' % exc)


if __name__ == '__main__':
    main()
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