# Shan Snow Tea Production

> Ancient-Tree Tea Processing & Quality optimization harness. Use for any tea production analysis, processing optimization, quality assessment, or technical guidance on Shan Tuyet (ancient-tree) tea including withering, fixing, oxidation control, catechin analysis, aroma profiling, storage recommendations, and terroir assessment. Triggers on: tea production, tea processing, Shan Tuyet, ancient tree…

- **Type:** Skill
- **Install:** `agentstack add skill-dungnotnull-shan-snow-tea-production-agent-skill-shan-snow-tea-production-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/shan-snow-tea-production-agent-skill

## Install

```sh
agentstack add skill-dungnotnull-shan-snow-tea-production-agent-skill-shan-snow-tea-production-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 — Skill Registry & Architecture

## Skill Identity

**Name:** `shan-snow-tea-production`
**Tagline:** Shan Tuyet (Ancient Tree) Tea Production Optimization — Evidence-backed analysis & decision-support harness
**Version:** 1.0.0
**Domain:** Ancient-Tree Tea Processing & Quality
**Status:** Production Ready

---

## Skill Registration

### Registration Protocol

Skills in this harness follow a strict registration protocol defined in the library standard (`D:\972026\SKILL-STANDARD.md`). Each skill must:

1. **Declare Frontmatter:** YAML frontmatter with `name` and `description` fields
2. **Implement Required Sections:** Role, Workflow, Tools, Output Format, Quality Gates
3. **Follow File Naming:** `sub-{skill-name}.md` for sub-skills, `main.md` for harness
4. **Use Standard Output Templates:** All outputs follow domain-specific templates
5. **Implement Quality Gates:** Universal (U1-U6) + Domain (G1-G4) gates with auto-fix

### Skill Resolution

When a skill is invoked via `Skill("skill-name")`:

1. **Path Resolution:** Check `skills/{skill-name}.md` → fallback to `{skill-name}/SKILL.md`
2. **Frontmatter Validation:** Ensure `name` and `description` present and valid
3. **Content Loading:** Load skill content into context ( Dict[str, Any]:
    """
    Hook execution function.

    Args:
        context: Current execution context with inputs and state
        config: Application configuration

    Returns:
        Updated context or modified configuration
    """
    # Hook logic here
    return context
```

---

## Configuration Management

### Environment Variables

| Variable | Purpose | Default |
|----------|---------|---------|
| `APP_ENV` | Environment (development/staging/production) | `production` |
| `DEBUG` | Enable debug mode | `false` |
| `LOG_LEVEL` | Logging level | `INFO` |
| `MAX_RETRIES` | API retry limit | `3` |
| `TIMEOUT` | API timeout (seconds) | `30` |

### Configuration Loading

```python
from config.settings import get_config, export_config_dict

# Get configuration
config = get_config()

# Access sub-configurations
domain_keywords = config.domain.keywords
api_timeout = config.api.default_timeout
quality_gates = config.quality.min_sources_required

# Export for inspection
config_dict = export_config_dict(config)
```

---

## Knowledge Pipeline

### Automated Updates

The knowledge base (`SECOND-KNOWLEDGE-BRAIN.md`) is updated automatically:

- **Weekly academic update:** Mondays 08:00
- **Daily news update:** Daily 07:00

### Manual Execution

```bash
# Standard update
python tools/knowledge_updater.py

# Dry run (preview changes)
python tools/knowledge_updater.py --dry-run

# News only update
python tools/knowledge_updater.py --news-only

# Custom keywords
python tools/knowledge_updater.py --keywords "tea fermentation" "catechins"
```

### Knowledge Structure

```markdown
# SECOND-KNOWLEDGE-BRAIN.md

## 1. Core Concepts & Frameworks
## 2. Key Research Papers & Standards
## 3. State-of-the-Art Methods & Tools
## 4. Authoritative Data Sources
## 5. Analytical Frameworks
## 6. Self-Update Protocol
## 7. Knowledge Update Log
```

---

## Testing & Validation

### Test Scenarios

Located in `tests/test-scenarios.md` with 5+ production-grade scenarios:

1. **Standard Analysis** — Full inputs, all sources available
2. **Minimal Input** — Sparse inputs, test requirements gathering
3. **Comparison Mode** — Compare multiple processing approaches
4. **Risk/Conflict** — Conflicting recommendations, test disclosure
5. **Degraded Mode** — Limited sources, test graceful degradation

### Running Tests

```bash
# Run all test scenarios
python tools/run_test_scenarios.py --all

# Run specific scenario
python tools/run_test_scenarios.py --scenario standard

# Validate project structure
python tools/validate_project.py

# Test knowledge updater
python tools/test_knowledge_updater.py
```

---

## Performance Considerations

### Context Window Management

- **Target usage:** 80% of context window
- **Safety margin:** 1000 tokens minimum
- **Sub-skill content:** <500 lines per skill file
- **Knowledge base:** Append-only, new entries first

### Token Optimization

- **Compact output templates:** Use structured formats
- **Selective tool use:** Invoke tools only when needed
- **Caching:** Cache repeated fetches within session
- **Lazy loading:** Load references only when accessed

### Rate Limiting

- **API calls:** 60 requests/minute
- **Concurrent requests:** Maximum 5
- **Respect 429:** Always handle rate limit responses
- **Exponential backoff:** Base delay 2s, max 60s

---

## Integration Points

### External Systems

- **FAO:** Tea production references and statistics
- **ISO 3720:** Tea quality standards
- **Vietnam Tea Association:** Local guidelines and practices
- **Academic databases:** ArXiv, Semantic Scholar, food chemistry journals

### Internal Systems

- **config/settings.py:** Configuration management
- **tools/knowledge_updater.py:** Knowledge pipeline
- **tools/run_test_scenarios.py:** Test orchestrator
- **hooks/:** Lifecycle management

---

## Version History

| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | 2026-07-27 | Production-grade release with full architecture |
| 0.x | Earlier | Development iterations |

---

## References

- `D:\972026\SKILL-STANDARD.md` — Library-wide skill standard
- `PROJECT-detail.md` — Full technical specification
- `PROJECT-DEVELOPMENT-PHASE-TRACKING.md` — Build roadmap
- `config/settings.py` — Configuration implementation
- Reference implementation: `D:\vn-finance-analysis-hd-skill`

## 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/shan-snow-tea-production-agent-skill](https://github.com/dungnotnull/shan-snow-tea-production-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-shan-snow-tea-production-agent-skill-shan-snow-tea-production-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%.
