# Water Rescue Drone Design

> Water-Rescue Drone Design & Testing — A production-grade AI agent harness for Search-and-Rescue Drone Engineering. Use when user asks about drone design, water rescue operations, UAV specifications, search-and-rescue planning, maritime drone testing, or life-saving drone equipment. This skill provides evidence-backed analysis using real-time data aggregation, domain methods (energy budget, search…

- **Type:** Skill
- **Install:** `agentstack add skill-dungnotnull-water-rescue-drone-design-agent-skill-water-rescue-drone-design-agent-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dungnotnull](https://agentstack.voostack.com/s/dungnotnull)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [dungnotnull](https://github.com/dungnotnull)
- **Source:** https://github.com/dungnotnull/water-rescue-drone-design-agent-skill

## Install

```sh
agentstack add skill-dungnotnull-water-rescue-drone-design-agent-skill-water-rescue-drone-design-agent-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Water Rescue Drone Design — Skill Registry

## Overview

The `water-rescue-drone-design` skill is a **production-grade AI agent harness** that transforms LLMs into domain experts for Search-and-Rescue Drone Engineering for Water. It orchestrates a multi-step pipeline that combines real-time data aggregation, recognized engineering methods, and academic research into evidence-backed, risk-disclosed outputs.

## Skill Registration

### Registration Pattern

Skills are registered in the harness via the `SkillRegistry` class in `water_rescue_drone/skills/__init__.py`:

```python
from water_rescue_drone.skills import SkillRegistry
from water_rescue_drone.skills.gather_requirements import GatherRequirementsSkill

registry = SkillRegistry()
registry.register("gather_requirements", GatherRequirementsSkill)
```

### Skill Resolution

The agent resolves skills by:
1. Loading the skill's markdown template from `skills/.md`
2. Instantiating the corresponding Python class from `water_rescue_drone/skills/`
3. Passing the `AgentConfig` and `LLMProvider` to the skill constructor
4. Executing the skill via the `BaseSkill.run(ctx)` method

### Skill Execution Flow

```
1. Load Template → 2. Build Prompt → 3. LLM Call → 4. Parse JSON → 5. Apply to Context
```

Each skill:
- Loads its persona and workflow from the markdown template
- Builds a structured prompt from the current `AgentContext`
- Calls the LLM provider with JSON mode enabled
- Parses and validates the structured response against a schema
- Merges the result back into the context
- Records a `StepRecord` for auditability

## Registered Skills

### 1. gather_requirements

**Purpose:** Clarify object/scope/timeframe/inputs/language before fetching.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "user_input": {"type": "string"},
    "context": {"$ref": "#/definitions/AgentContext"}
  },
  "required": ["user_input"]
}
```

**Output Schema:**
```json
{
  "type": "object",
  "properties": {
    "object": {"type": "string"},
    "scope": {"type": "string"},
    "timeframe": {"type": "string"},
    "available_inputs": {"type": "array", "items": {"type": "string"}},
    "target_audience": {"type": "string"},
    "language": {"type": "string", "enum": ["en", "vi"]},
    "analysis_type": {"type": "string"}
  },
  "required": ["object", "language"]
}
```

### 2. evidence_collector

**Purpose:** Fetch authoritative real-time + reference data.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "requirements": {"$ref": "#/definitions/Requirements"},
    "context": {"$ref": "#/definitions/AgentContext"}
  }
}
```

**Output Schema:**
```json
{
  "type": "object",
  "properties": {
    "evidence_items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "source": {"type": "string"},
          "date": {"type": "string"},
          "tier": {"type": "string", "enum": ["1", "2", "3", "4"]},
          "content": {"type": "string"},
          "url": {"type": "string"}
        }
      }
    }
  }
}
```

### 3. core_analysis

**Purpose:** Design payload/sensors/endurance/path/reliability + scenarios.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "requirements": {"$ref": "#/definitions/Requirements"},
    "evidence": {"$ref": "#/definitions/Evidence"}
  }
}
```

**Output Schema:**
```json
{
  "type": "object",
  "properties": {
    "drone_type": {"type": "string"},
    "payload": {"type": "object"},
    "drop_mechanism": {"type": "string"},
    "sensors": {"type": "array"},
    "endurance": {"type": "object"},
    "wind_resistance": {"type": "number"},
    "water_ingress": {"type": "string"},
    "search_path": {"type": "string"},
    "reliability": {"type": "number"},
    "certification": {"type": "array"},
    "scenarios": {"type": "array"},
    "metrics": {"type": "object"}
  }
}
```

### 4. knowledge_updater

**Purpose:** Surface academic citations with tiers; flag gaps.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "query": {"type": "string"},
    "context": {"$ref": "#/definitions/AgentContext"}
  }
}
```

**Output Schema:**
```json
{
  "type": "object",
  "properties": {
    "citations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "authors": {"type": "array", "items": {"type": "string"}},
          "title": {"type": "string"},
          "year": {"type": "number"},
          "doi": {"type": "string"},
          "tier": {"type": "string"},
          "relevance": {"type": "number"}
        }
      }
    },
    "gaps": {"type": "array", "items": {"type": "string"}},
    "coverage_rating": {"type": "number"}
  }
}
```

### 5. advisor

**Purpose:** Synthesize risk-disclosed conclusion + evidence chain.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "analysis": {"$ref": "#/definitions/CoreAnalysis"},
    "knowledge": {"$ref": "#/definitions/KnowledgeCitations"},
    "context": {"$ref": "#/definitions/AgentContext"}
  }
}
```

**Output Schema:**
```json
{
  "type": "object",
  "properties": {
    "verdict": {
      "type": "string",
      "enum": ["RECOMMENDED", "CONDITIONALLY_RECOMMENDED", "NOT_RECOMMENDED", "INSUFFICIENT_DATA"]
    },
    "scenarios": {"type": "array"},
    "risks": {"type": "array"},
    "evidence_chain": {"type": "array"},
    "remediation": {"type": "string"},
    "disclosure": {"type": "string"}
  }
}
```

## Quality Gates

The skill enforces quality gates at two levels:

### Universal Gates (U1-U6)
- **U1:** ≥3 sources cited, ≥1 academic/authoritative
- **U2:** Safety/risk/limitation disclosure present BEFORE recommendation
- **U3:** Evidence hierarchy stated per source (Tier 1–4)
- **U4:** Language matches user preference
- **U5:** Output uses declared output template
- **U6:** Every claim traceable to ≥1 cited source OR flagged as judgment

### Domain Gates (G1-G4)
- **G1:** Payload capacity validated against drop mechanism
- **G2:** Endurance calculation accounts for weather/wind
- **G3:** Sensor coverage adequate for target area
- **G4:** Reliability estimate includes redundancy analysis

### Gate Enforcement

```python
from water_rescue_drone.gates import QualityGateRunner

runner = QualityGateRunner(config)
results = runner.evaluate_all(context)
failed = runner.summary(results)["failed"]

if config.strict_gates and failed > 0:
    raise GateFailure(f"{failed} gates failed")
```

## Tool Definitions

The skill uses the following tools with their respective schemas:

### WebSearch Tool
**Purpose:** Search for real-time domain data.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "query": {"type": "string"},
    "max_results": {"type": "number", "default": 10}
  },
  "required": ["query"]
}
```

**Output Schema:**
```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "title": {"type": "string"},
      "url": {"type": "string"},
      "snippet": {"type": "string"},
      "date": {"type": "string"}
    }
  }
}
```

### WebFetch Tool
**Purpose:** Fetch and parse web content.

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "url": {"type": "string"},
    "format": {"type": "string", "enum": ["markdown", "text"], "default": "markdown"}
  },
  "required": ["url"]
}
```

### Read Tool
**Purpose:** Read local files (knowledge base).

**Input Schema:**
```json
{
  "type": "object",
  "properties": {
    "file_path": {"type": "string"},
    "offset": {"type": "number"},
    "limit": {"type": "number"}
  },
  "required": ["file_path"]
}
```

## Hooks System

### Pre-Skill Hook
```python
@hook("pre_skill")
def before_skill(skill_name: str, context: AgentContext):
    # Log skill start, validate prerequisites
    pass
```

### Post-Skill Hook
```python
@hook("post_skill")
def after_skill(skill_name: str, result: SkillResult, context: AgentContext):
    # Record metrics, update analytics
    pass
```

### Error Hook
```python
@hook("on_error")
def handle_error(skill_name: str, error: Exception, context: AgentContext):
    # Implement custom error handling, fallbacks
    pass
```

## Graceful Degradation

The skill implements 5 degradation levels (0–4):

| Level | Description | Banner |
|-------|-------------|--------|
| 0 | Full operation | None |
| 1 | Minor fallbacks | "LIMITATION: Some secondary features unavailable" |
| 2 | Primary failures | "LIMITATION: Operating with reduced capability" |
| 3 | Knowledge-only mode | "LIMITATION: Knowledge base only, live data unavailable" |
| 4 | Critical degradation | "LIMITATION: Critical failures - review required" |

## Language Support

The skill automatically detects and supports:
- **English (en)** — Default
- **Vietnamese (vi)** — Full localization

Language detection uses keyword matching and can be overridden via `WRD_LANGUAGE` environment variable.

## CLI Usage

```bash
# Run with default deterministic provider (offline)
python -m water_rescue_drone "design a coastal SAR drone for 1 km range"

# Run with OpenAI provider
WRD_LLM_PROVIDER=openai WRD_LLM_MODEL=gpt-4 python -m water_rescue_drone "analyze UAV for lake rescue"

# Run with Anthropic provider
WRD_LLM_PROVIDER=anthropic WRD_LLM_MODEL=claude-3-opus python -m water_rescue_drone "design river rescue drone"

# Strict mode (raise on gate failures)
WRD_STRICT_GATES=true python -m water_rescue_drone "evaluate search drone"
```

## Development

### Project Structure
```
water-rescue-drone-design/
├── water_rescue_drone/        # Runnable Python package
│   ├── agent.py               # Main orchestrator
│   ├── config.py              # Configuration management
│   ├── context.py             # Typed context
│   ├── errors.py              # Error types
│   ├── gates.py               # Quality gates
│   ├── knowledge.py            # Knowledge integration
│   ├── cli.py                 # CLI entry point
│   ├── llm/                   # Provider abstraction
│   └── skills/                # Sub-skills
├── skills/                    # Markdown templates
│   ├── main.md                # Harness specification
│   └── sub-*.md               # Sub-skill specifications
├── tools/                     # Utilities
│   ├── knowledge_updater.py   # Knowledge crawl
│   ├── run_test_scenarios.py  # E2E validator
│   └── validate_project.py    # Contract validator
├── config/                    # Configuration files
├── references/                # Domain knowledge
├── assets/                    # Static resources
├── scripts/                   # Automation scripts
├── hooks/                     # Lifecycle hooks
├── SECOND-KNOWLEDGE-BRAIN.md  # Knowledge base
└── SKILL.md                   # This file
```

### Testing
```bash
# Run unit tests
pytest -q

# Run E2E scenarios
python tools/run_test_scenarios.py

# Validate project contract
python tools/validate_project.py
```

## License

MIT License — See `LICENSE` file for details.

## Version History

- **1.2.0** (2026-07-27) — Enhanced architecture: hooks system, modular directories, structured logging, tool schemas, configuration management, domain references
- **1.1.0** (2026-07-13) — Initial production release with core harness and quality gates

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [dungnotnull](https://github.com/dungnotnull)
- **Source:** [dungnotnull/water-rescue-drone-design-agent-skill](https://github.com/dungnotnull/water-rescue-drone-design-agent-skill)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-dungnotnull-water-rescue-drone-design-agent-skill-water-rescue-drone-design-agent-skill
- Seller: https://agentstack.voostack.com/s/dungnotnull
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
