# Pet Hospice End Of Life Care

> Senior & End-of-Life Pet Hospice Care Advisor (Palliative & Caregiver Support) — Veterinary Hospice & Palliative Care for Companion Animals analysis & decision-support harness. Use this skill when the user asks about pet hospice care, end-of-life decisions for companion animals, palliative care planning, quality of life assessment for pets, pain management for senior animals, caregiver support fo…

- **Type:** Skill
- **Install:** `agentstack add skill-dungnotnull-pet-hospice-end-of-life-care-agent-skill-pet-hospice-end-of-life-care-agent-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [dungnotnull](https://agentstack.voostack.com/s/dungnotnull)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [dungnotnull](https://github.com/dungnotnull)
- **Source:** https://github.com/dungnotnull/pet-hospice-end-of-life-care-agent-skill

## Install

```sh
agentstack add skill-dungnotnull-pet-hospice-end-of-life-care-agent-skill-pet-hospice-end-of-life-care-agent-skill
```

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

## About

# SKILL.md — Pet Hospice End-of-Life Care Skill Registry

## Overview

This document serves as the central registry for the `pet-hospice-end-of-life-care` skill system. It defines how skills are registered, resolved, executed, and validated, including input/output JSON schemas and the flexible agent/skill architecture.

## Skill System Architecture

### Hierarchical Skill Composition

```
pet-hospice-end-of-life-care (Main Harness)
    ├── sub-gather-requirements (Intake Specialist)
    ├── sub-evidence-collector (Data Librarian)
    ├── sub-core-analysis (Domain Advisor)
    ├── sub-knowledge-updater (Research Librarian)
    └── sub-advisor (Senior Synthesizer)
```

### Skill Resolution Protocol

When a skill is invoked, the system follows this resolution chain:

1. **Trigger Detection**: Match user query against skill description (frontmatter)
2. **Skill Loading**: Load SKILL.md body ( boolean` |
| `on_after_skill_load` | After loading SKILL.md | Cache skill metadata | `(skill: object) => void` |
| `on_before_sub_skill` | Before invoking sub-skill | Validate inputs | `(sub_skill: string, inputs: object) => boolean` |
| `on_after_sub_skill` | After sub-skill completes | Cache outputs | `(sub_skill: string, outputs: object) => void` |
| `on_quality_gate` | At each quality gate | Log gate status | `(gate: string, result: object) => void` |
| `on_before_output` | Before delivering output | Final validation | `(output: object) => boolean` |
| `on_error` | On any error | Trigger degradation protocol | `(error: object) => void` |

### State Synchronization Hooks

| Hook | Trigger | Purpose |
|------|---------|---------|
| `on_state_change` | Internal state changes | Maintain consistency |
| `on_cache_update` | When knowledge cache updates | Invalidate stale references |
| `on_config_change` | When configuration changes | Reload affected resources |

### Event Emission

Key events in the skill lifecycle:
- `skill:loaded`: Skill metadata loaded
- `sub_skill:started`: Sub-skill execution begun
- `sub_skill:completed`: Sub-succeeded with results
- `gate:evaluated`: Quality gate checked
- `degradation:triggered`: Degradation protocol activated
- `output:delivered`: Final output delivered to user

## Graceful Degradation Protocol

### Degradation Levels

| Level | Condition | Behavior |
|-------|-----------|----------|
| 0 | All systems nominal | Full execution, all gates |
| 1 | Minor data quality issues | Proceed with caution flags |
| 2 | Some sources unavailable | Use fallback chain, flag limitations |
| 3 | Multiple failures | Simplified output, explicit LIMITATION banner |
| 4 | Critical failure | Explain limitation, suggest manual consultation |

### Fallback Chain

1. **Primary**: Real-time web data
2. **Secondary**: Cached knowledge base
3. **Tertiary**: General domain knowledge
4. **Quaternary**: Explicit limitation flag + apology

## Configuration System

Configuration is managed in `config/` with type-safe schemas. See `config/README.md` for details.

### Config Hierarchy

1. **Default config** (`config/default.json`): Base configuration
2. **Environment config** (`config/{env}.json`): Environment-specific overrides
3. **Local config** (`config/local.json`): Local development overrides (gitignored)
4. **Runtime config**: CLI arguments and environment variables

### Config Schema

See `assets/schemas/config.schema.json` for the complete configuration schema.

## Scripts Directory

The `scripts/` directory contains automation utilities. See `scripts/README.md` for details.

### Available Scripts

- `setup.py`: Initial project setup
- `validate.py`: Validate skill structure
- `test.py`: Run test scenarios
- `knowledge_crawl.py`: Execute knowledge crawl pipeline
- `export_skill.py`: Package skill for distribution

## References Directory

The `references/` directory contains domain knowledge and templates. See `references/README.md` for details.

### Reference Contents

- `quality_of_life_scales.md`: Validated QoL assessment scales
- `pain_management_protocols.md`: Evidence-based pain protocols
- `authoritative_sources.md`: Domain source registry
- `output_templates.md`: Standard output templates

## Assets Directory

The `assets/` directory contains static resources and schemas. See `assets/README.md` for details.

### Asset Contents

- `schemas/`: JSON schemas for validation
- `templates/`: Output and prompt templates
- `diagrams/`: System architecture diagrams
- `icons/`: Icons and visual resources

## Extension Points

### Adding New Sub-Skills

1. Create `skills/sub-{name}.md` with required sections
2. Register in `skills/main.md` under "Sub-skills Available"
3. Update this SKILL.md with input/output schemas
4. Add quality gates if applicable
5. Update test scenarios in `tests/test-scenarios.md`

### Adding New Tools

1. Define tool in `config/default.json` under `tools`
2. Create execution handler in `scripts/tool_handlers.py`
3. Add schema to `assets/schemas/tools.schema.json`
4. Document in this SKILL.md

### Adding New Quality Gates

1. Define gate in this SKILL.md under "Quality Gates System"
2. Implement auto-fix procedure if applicable
3. Add enforcement logic to `skills/main.md`
4. Add test coverage in `tests/test-scenarios.md`

## Performance Optimization

### Context Window Management

- Sub-skills loaded on-demand (progressive disclosure)
- Reference files loaded selectively by domain
- Cached outputs with 5-minute TTL
- Compression for large reference files

### Token Consumption

- Main harness: ~2000 tokens (body only)
- Sub-skills: ~800-1200 tokens each
- Quality gate checks: ~200 tokens each
- Output generation: ~1500-3000 tokens depending on complexity

### Structured Logging

Logs are written to `logs/` with the following schema:
```json
{
  "timestamp": "string (ISO8601)",
  "level": "string (DEBUG|INFO|WARNING|ERROR)",
  "component": "string",
  "event": "string",
  "data": "object"
}
```

## Error Handling

### Error Types

1. **Network errors**: WebSearch/WebFetch failures
2. **Validation errors**: Input schema violations
3. **Execution errors**: Sub-skill failures
4. **Quality gate failures**: Gate enforcement failures

### Error Recovery

Each error type has a specific recovery protocol documented in `skills/main.md` under "Graceful Degradation & Error Handling."

## Testing

### Test Coverage

- Unit tests for tools: `tools/test_*.py`
- Integration tests for sub-skills: `tests/test-scenarios.md`
- End-to-end tests: `tools/run_test_scenarios.py`

### Test Execution

```bash
# Run all tests
python scripts/test.py --all

# Run specific test
python scripts/test.py --scenario 1

# Run with coverage
python scripts/test.py --coverage
```

## Version History

| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | 2026-07-20 | Production release, complete 6-phase implementation |
| 0.9.0 | 2026-07-08 | Phase 4 completion, testing framework |
| 0.5.0 | 2026-07-01 | Phase 2 completion, main harness + quality gates |
| 0.1.0 | 2026-06-20 | Initial architecture, Phase 0-1 |

---

For implementation details, see `skills/main.md` and individual sub-skill files.
For configuration details, see `config/README.md`.
For testing details, see `tests/README.md`.

## 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/pet-hospice-end-of-life-care-agent-skill](https://github.com/dungnotnull/pet-hospice-end-of-life-care-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-pet-hospice-end-of-life-care-agent-skill-pet-hospice-end-of-life-care-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%.
