diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c07ec19..56723fc 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -37,12 +37,12 @@ Skip unless this PR adds or changes files under `skills/`. - [ ] `manifest.yaml`: `name` (full ID), `version`, `description`, `parameters`, `constitution`, real `issuer` - [ ] Optional: `short_description`, `issuer.github`, `issuer.org`, `requirements`, `env_vars` -### Logic, cognition, tests +### Effect, Directive, Assurance -- [ ] Deterministic `skill.py` (no ad-hoc LLM-generated execution paths) -- [ ] `instructions.md` explains when and how to use the skill -- [ ] `card.json` issuer matches manifest when present -- [ ] `test_skill.py` covers execution and schema expectations +- [ ] Deterministic `skill.py` (Effect; no ad-hoc LLM-generated execution paths) +- [ ] `instructions.md` (Directive) explains when and how to use the skill +- [ ] `card.json` (Presentation) issuer matches manifest when present +- [ ] `test_skill.py` (Assurance) covers execution and schema expectations - [ ] `SkillLoader.load_skill("/")` succeeds (or deps documented) ### Documentation and catalog diff --git a/CHANGELOG.md b/CHANGELOG.md index a240dc1..466498a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ Contributors add user-facing entries under `[Unreleased]` in the same PR. Mainta ### Changed +- **Docs:** Adopt **Skill anatomy** (Contract, Effect, Directive, Assurance, Corpus, Reference, Presentation, Interface) across introduction, README Mission, CONTRIBUTING, provider guides, catalog pages, and contributor templates (#319). - **Docs:** Document `issuer.org` design-ownership policy; align ARPA-driven registry skills (`prompt_injection_firewall`, `bg_remover`, `novelty_extractor`) and catalog Issuer lines (#295). ### Fixed diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 719ef38..a8dc0c2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -12,7 +12,7 @@ Examples of behavior that contributes to creating a positive environment for AI * **Token Efficiency**: Minimizing unnecessary token expenditure by relying on underlying Python execution rather than LLM reasoning where possible. * **Safety First**: Strictly adhering to the `constitution` defined in skill manifests and following the project's [security and trust guidelines](docs/security/skill-trust-model.md). * **Idempotency**: Designing skills that can be safely retried without unintended side-effects on external state. -* **Clear Interface**: Documenting inputs cleanly in `manifest.yaml` so other agents do not hallucinate parameters. +* **Clear tool contract**: Document inputs cleanly in `manifest.yaml` (**Contract**; see [Skill anatomy](docs/introduction.md#skill-anatomy)). Examples of unacceptable behavior by participants (agents or their human authors) include: diff --git a/COMPARISON.md b/COMPARISON.md index d1a10ac..ee8ab3b 100644 --- a/COMPARISON.md +++ b/COMPARISON.md @@ -1,6 +1,6 @@ # Comparison: Skillware vs. Alternatives -Skillware is a Python framework that decouples AI tool logic, cognition, and governance into self-contained, installable modules called **Skills**. For the project story and roadmap, see [docs/vision.md](docs/vision.md). +Skillware is a Python framework that decouples **Effect**, **Directive**, and **Contract** into self-contained, installable modules called **Skills**. For the project story and roadmap, see [docs/vision.md](docs/vision.md). This document clarifies how Skillware compares to other common approaches for equipping AI agents with tools, including **Model Context Protocol (MCP)**, **Agent Skills (SKILL.md)**, **LangChain Tools**, **AutoGen**, and others. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c306f82..71f78be 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -219,7 +219,24 @@ Skills you submit are reviewed for origin and quality, not sandboxed at runtime Every registry skill lives in `skills///` and **must** include the files below. This is the detailed standard for the **skill** contribution type. -### 1. `manifest.yaml` (metadata and governance) +### Skill anatomy (vocabulary) + +Checklists below use **file names**; each file implements a **role**. The [README Mission](README.md#mission) summarizes the core roles; full reference: [docs/introduction.md — Skill anatomy](docs/introduction.md#skill-anatomy). + +| Role | v0 file(s) | Required | +| :--- | :--- | :---: | +| **Contract** | `manifest.yaml` | Yes | +| **Effect** | `skill.py` (+ effect modules in the same folder) | Yes | +| **Directive** | `instructions.md` | Yes | +| **Assurance** | `test_skill.py` | Yes (registry) | +| **Presentation** | `card.json` | Optional | +| **Corpus** | `kb/`, `data/`, bundled knowledge files | Optional | +| **Reference** | `schemas/`, maps, in-bundle spec fixtures | Optional | +| **Interface** | `skillware/core/loader.py` adapters | Framework (not in bundle) | + +**Effect modules** (for example `workflow.py`, `budget.py`) are imported by `skill.py`—implementation detail, not a separate required file. **Corpus tooling** (for example `maintenance/`) refreshes Corpus offline and is not loaded by `execute()`. + +### 1. `manifest.yaml` (Contract) Defines the tool interface, safety constitution, dependencies, and issuer attribution. @@ -263,7 +280,7 @@ requirements: - requests ``` -### 2. `skill.py` (logic) +### 2. `skill.py` (Effect) - Define **exactly one** concrete subclass of `BaseSkill` per skill file. `SkillLoader.load_skill()` discovers it automatically as `bundle["class"]` (see `SkillLoader.get_skill_class()`). - Implement deterministic Python logic; inherit from `BaseSkill`. @@ -273,7 +290,7 @@ requirements: - Do **not** embed open-ended LLM code generation as the skill implementation. - When you change the JSON shape returned by `execute()`, update `card.json` output fields (if present) and the matching fixture under `tests/fixtures/card_ui_schema/` in the same PR. -### 3. `instructions.md` (cognition) +### 3. `instructions.md` (Directive) The primary guide for the host LLM. Skill instructions should be a concise, append-only block focusing on this skill's context rather than assigning an overarching persona (host agents and LLMs already have their own system prompts). @@ -283,7 +300,7 @@ The primary guide for the host LLM. Skill instructions should be a concise, appe - **Avoid persona starters**: Avoid opening with "You are an agent equipped with...", "You are an expert...", or narrative personality instructions that can conflict when multiple skills are appended to context. - Keep prompts and persona here, not in `skill.py`. -### 4. `card.json` (presentation) +### 4. `card.json` (Presentation) - Optional but recommended for user-facing agents and catalog UIs. - Describes UI presentation (`name`, `description`, `icon`, `ui_schema`, and similar). @@ -291,7 +308,7 @@ The primary guide for the host LLM. Skill instructions should be a concise, appe - For output cards (`ui_schema.type` = `card`), each `ui_schema.fields[].key` must be a dot path into the JSON returned by `execute()` (for example `metadata.wallet_address`, `preview.you_pay`). Update `card.json` in the same PR when you change the output shape. - Add or refresh a representative output fixture at `tests/fixtures/card_ui_schema/__.json` (one object or a `{"samples": [...]}` list when multiple execute paths surface different fields). CI validates keys via `tests/test_card_ui_schema.py` (#199). -### 5. `test_skill.py` (bundle test) +### 5. `test_skill.py` (Assurance) - **Required** for every new registry skill (template: `templates/python_skill/test_skill.py`; enforced by `tests/test_skill_issuer.py`). - Unit tests for schema compliance and deterministic execution paths (offline; mock externals). @@ -300,6 +317,15 @@ The primary guide for the host LLM. Skill instructions should be a concise, appe - Optional extra depth for maintainers: `tests/skills//test_.py` — see [TESTING.md](docs/TESTING.md). - Mock network calls and first-run model downloads in bundle tests. +### Optional bundle assets + +Not required for every skill. When present, document them on the catalog page under **Bundle layout** (see [skill usage template](docs/usage/skill_usage_template.md)). + +- **Corpus** — `kb/`, `data/`, or other versioned knowledge files the Effect reads at runtime. +- **Reference** — `schemas/`, terminology maps, or in-bundle fixtures that define the public contract or demos. +- **Effect modules** — additional `.py` files imported only by `skill.py` (not separate registry roles). +- **Corpus tooling** — offline maintenance scripts (not loaded by `execute()`); keep out of the Effect import path unless intentional. + ### Packaging (PyPI and `pip install`) Registry skills are shipped inside the `skillware` wheel. Per-skill layout uses `manifest.yaml` and packaging hooks below — not per-skill edits to CI. @@ -417,7 +443,7 @@ When a new top-level category lands under `skills/`, update this table and the c | [Agent Contribution Workflow](docs/contributing/ai_native_workflow.md) | Workflow written for contributing agents; operators supervise | | [TESTING.md](docs/TESTING.md) | Black, Flake8, Pytest, local CI parity | | [Agent Code of Conduct](CODE_OF_CONDUCT.md) | Behavioral expectations for humans and agents | -| [docs/introduction.md](docs/introduction.md) | Architecture: Mind, Body, Conscience | +| [docs/introduction.md](docs/introduction.md) | Skill anatomy: Contract / Effect / Directive (+ Assurance, Corpus, Interface) | | [docs/vision.md](docs/vision.md) | Project story, roadmap, and agent discoverability | | [docs/skills/README.md](docs/skills/README.md) | Published skill catalog | | [templates/python_skill/](templates/python_skill/) | Boilerplate for new skills | diff --git a/README.md b/README.md index 901acfa..dc598ad 100644 --- a/README.md +++ b/README.md @@ -41,10 +41,13 @@ The AI ecosystem is fragmented. Developers often re-invent tool definitions, sys A **Skill** in this framework provides everything an Agent needs to master a domain: -1. **Logic**: Executable Python so agents run real work, not guess it. -2. **Cognition**: System instructions and cognitive maps so any logical system uses the capability as intended. -3. **Governance**: Constitution, safety boundaries, and hard limits baked into the bundle. -4. **Interface**: Standardized tool schemas for any LLM or agent runtime. +1. **Contract**: Constitution, safety boundaries, and typed I/O baked into the bundle. +2. **Effect**: Executable Python so agents run real work, not guess it. +3. **Directive**: System instructions and cognitive maps so any host uses the capability as intended. +4. **Assurance**: Offline tests that Effect honors Contract before a skill joins the registry. +5. **Interface**: Standardized tool schemas for any LLM or agent runtime. + +Optional **Corpus**, **Reference**, and **Presentation** assets extend bundles when needed. Full reference: [Introduction — Skill anatomy](docs/introduction.md#skill-anatomy). ### Skill library @@ -55,12 +58,10 @@ Browse capabilities by category in the [Skill library](docs/skills/README.md) or ```mermaid flowchart LR Registry[Registry] -->|Load| Loader[Loader] - Loader -->|Adapt| Host[Host] - Host -->|Prompt + Tools| LogicalSystems([Logical Systems]) - LogicalSystems -->|Tool Call| Host + Loader -->|Adapt| Host[Any Host] ``` -Install the registry once. Skillware loads a bundle and adapts it to your model's tool format — you run the loop. For details on how the loader turns the manifest into a tool, see the [Introduction](docs/introduction.md). +Install the registry once. Skillware loads a bundle, adapts it to your host's tool format, and your app runs the agent loop (Gemini, Claude, Ollama, custom scripts, …). For details on how the loader turns the manifest into a tool, see the [Introduction](docs/introduction.md). ## Architecture @@ -75,11 +76,11 @@ Skillware/ ├── skills/ # Skill Registry │ └── category/ # Domain boundaries (e.g., finance) │ └── skill_name/ # The Skill bundle -│ ├── manifest.yaml # Definition, schema, and constitution -│ ├── skill.py # Executable Python logic -│ ├── instructions.md # Cognitive map for the LLM -│ ├── card.json # Optional UI presentation metadata -│ └── test_skill.py # Bundle test (required for new skills; see docs/TESTING.md) +│ ├── manifest.yaml # Contract: schema, constitution, issuer +│ ├── skill.py # Effect: deterministic execution +│ ├── instructions.md # Directive: host guidance +│ ├── card.json # Presentation (optional) +│ └── test_skill.py # Assurance (required for registry skills) ├── skillware/ # Core Framework Package │ ├── cli.py # Command-line interface │ └── core/ @@ -186,7 +187,7 @@ skill = skill_bundle["class"]( # 2. Client & Tool Setup client = genai.Client() tool = SkillLoader.to_gemini_tool(skill_bundle) # The "Adapter" -system_instruction = skill_bundle['instructions'] # The "Mind" +system_instruction = skill_bundle['instructions'] # Directive # 3. Agent Loop response = client.models.generate_content( diff --git a/docs/TESTING.md b/docs/TESTING.md index 4ff27a2..3d94701 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -51,8 +51,9 @@ pip install -r requirements.txt | **Maintainer skill test** | `tests/skills//test_.py` | No (clone only) | Yes when present | | **Usage example** | `examples/*.py` | No | Smoke only for local scripts; no for live loops | -### Skill bundle test +### Skill bundle test (Assurance role) +- Implements the bundle **Assurance** role (`test_skill.py`); see [Skill anatomy](../introduction.md#skill-anatomy). - Lives **inside the skill bundle**; ships with `pip install skillware`. - **Required** for every new registry skill (see `templates/python_skill/test_skill.py`). - Offline and mockable: manifest consistency, validation, deterministic `execute()` paths — no live network. @@ -91,7 +92,7 @@ pip install -r requirements.txt | You are testing… | Put it here | Example in this repo | | :--- | :--- | :--- | -| Manifest + execute contract for one skill | Bundle test | `skills/compliance/tos_evaluator/test_skill.py` | +| Manifest + execute contract for one skill | Bundle test (Assurance) | `skills/compliance/tos_evaluator/test_skill.py` | | Loader path + mocked externals (optional depth) | Maintainer test | `tests/skills/compliance/test_tos_evaluator.py` | | Loader, CLI, registry issuer rules, param validation, manifest requirement pins, config and path discovery | Framework test | `tests/test_loader.py`, `tests/test_cli.py`, `tests/test_config.py`, `tests/test_discovery.py`, `tests/test_requirements_check.py`, `tests/test_skill_issuer.py`, `tests/test_validate_params.py`, `tests/test_registry_docs.py`, `tests/test_card_ui_schema.py`, `tests/test_registry_identity.py` | | End-to-end provider demo script | Usage example | `examples/gemini_tos_evaluator.py` | diff --git a/docs/contributing/ai_native_workflow.md b/docs/contributing/ai_native_workflow.md index 857a40c..53e334d 100644 --- a/docs/contributing/ai_native_workflow.md +++ b/docs/contributing/ai_native_workflow.md @@ -95,7 +95,7 @@ You must: | CLI | `skillware/cli.py`, `docs/usage/cli.md`, `tests/test_cli.py`, `docs/usage/api_keys.md` (when env vars change) | | Examples | `examples/*.py`, `examples/README.md`, `docs/usage/agent_loops.md`; run `pytest tests/test_registry_docs.py` when the index or matrix changes | | Core framework | `skillware/core/`, `tests/test_loader.py`, `tests/test_config.py`, `docs/usage/` | -| Documentation only | `docs/`, `README.md`, `CONTRIBUTING.md`, inbound links; `examples/README.md` when the issue adds, renames, or removes runnable scripts under `examples/`; for skill catalog or provider integration work, also `docs/usage/` and `docs/skills/`. Run `pytest tests/test_registry_docs.py` to confirm catalog and examples docs still match manifests and scripts on disk. | +| Documentation only | `docs/`, `README.md`, `CONTRIBUTING.md`, inbound links; `examples/README.md` when the issue adds, renames, or removes runnable scripts under `examples/`; for skill catalog or provider integration work, also `docs/usage/` and `docs/skills/`. For skill anatomy vocabulary, keep [introduction.md](../introduction.md#skill-anatomy), CONTRIBUTING, and README Mission aligned. Run `pytest tests/test_registry_docs.py` to confirm catalog and examples docs still match manifests and scripts on disk. | | Release / user-visible change | Root [CHANGELOG.md](../../CHANGELOG.md) under `[Unreleased]` when behavior, CLI, skills, or user-facing docs change (maintainers cut version sections) | | Bug fix | Failing test, reproduction steps, related skill or loader code | | Good first issue | Issue labels and acceptance criteria—take them literally | @@ -236,7 +236,7 @@ These align with [CONTRIBUTING.md](../../CONTRIBUTING.md). Violations block merg ### Skills (under `skills/`) -- Bundle: `manifest.yaml`, `skill.py`, `instructions.md`, `card.json`, `test_skill.py`, plus catalog docs +- Bundle: `manifest.yaml` (Contract), `skill.py` (Effect), `instructions.md` (Directive), `card.json` (Presentation), `test_skill.py` (Assurance), plus catalog docs - `manifest.yaml` is source of truth for schema, constitution, `requirements`, `env_vars`, and `issuer` - `requirements` — PEP 508 strings; unpinned checks importability only; version specifiers (for example `>=2.0.0`) are validated at load time — pin when the skill is sensitive to package API versions - `manifest.yaml` `name` must equal `category/skill_name` (matches folder path); loader warns on mismatch for registry layout @@ -247,7 +247,7 @@ These align with [CONTRIBUTING.md](../../CONTRIBUTING.md). Violations block merg - On each catalog page, add a **Usage Examples** section (Gemini, Claude, OpenAI, DeepSeek, Ollama prompt mode) per [skill usage template](../usage/skill_usage_template.md). Keep provider mechanics in `docs/usage/`; put skill-specific paths, sample user messages, and `execute` payloads on the skill page. - Categories: `compliance`, `creative`, `data_engineering`, `defi`, `dev_tools`, `finance`, `monitoring`, `office`, `optimization`, `security`, `wellness` — see [Skill library](../skills/README.md) for the live registry; [Choosing a category](../../CONTRIBUTING.md#choosing-a-category) in CONTRIBUTING.md (issue first for new top-level folders) - Do not bump `pyproject.toml` version in skill-only PRs unless requested -- Logic in `skill.py`; prompts and persona in `instructions.md` +- **Effect** in `skill.py`; **Directive** (skill context, not host persona) in `instructions.md`; **Contract** in `manifest.yaml` - Never commit secrets; document `env_vars` in the manifest ### Core framework (`skillware/core/`) @@ -276,12 +276,12 @@ Complete the checklist that matches your issue during Stage 5. ### New or updated skill - [ ] `skills///` exists with full bundle -- [ ] `manifest.yaml`: `name` (`category/skill_name`, matches folder), `version`, `description`, `parameters`, `constitution`, real `issuer`; use `outputs:` (not `output:`) when declaring return shape +- [ ] `manifest.yaml` (Contract): `name` (`category/skill_name`, matches folder), `version`, `description`, `parameters`, `constitution`, real `issuer`; use `outputs:` (not `output:`) when declaring return shape - [ ] Optional: `short_description` field (~80 chars) for a concise one-line summary in `skillware list` -- [ ] `skill.py`: exactly one `BaseSkill` subclass (auto-discovered as `bundle["class"]`); deterministic, JSON-serializable returns, safe error handling -- [ ] `instructions.md`: when to use, how to interpret output, limitations -- [ ] `card.json`: `issuer` matches manifest; output-card `ui_schema.fields[].key` paths resolve in `tests/fixtures/card_ui_schema/__.json` (update fixture when `execute()` output changes) -- [ ] `test_skill.py` (bundle test) passes — `pytest skills///test_skill.py` or `skillware test /` +- [ ] `skill.py` (Effect): exactly one `BaseSkill` subclass (auto-discovered as `bundle["class"]`); deterministic, JSON-serializable returns, safe error handling +- [ ] `instructions.md` (Directive): when to use, how to interpret output, limitations +- [ ] `card.json` (Presentation): `issuer` matches manifest; output-card `ui_schema.fields[].key` paths resolve in `tests/fixtures/card_ui_schema/__.json` (update fixture when `execute()` output changes) +- [ ] `test_skill.py` (Assurance) passes — `pytest skills///test_skill.py` or `skillware test /` - [ ] Bundle tests mock all network calls and model downloads; CI does not download models. - [ ] `docs/skills/.md` and catalog row in `docs/skills/README.md` (**Version** from manifest, **Skill history** with linked GitHub usernames, **Recommended install:** `pip install "skillware[_]"` per [install_extras.md](../usage/install_extras.md)) - [ ] After changing `manifest.yaml` `requirements`, run `python scripts/sync_extras.py` and confirm `python scripts/sync_extras.py --check` passes diff --git a/docs/introduction.md b/docs/introduction.md index eeb29dc..e97b38c 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -4,27 +4,50 @@ If you want your agent to "know" how to analyze a balance sheet, you shouldn't have to prompt-engineer a specific model or write a custom tool definition for that specific model's API. You should be able to **install** that capability. -## The Triad: Mind, Body, Language +## Skill anatomy -In integration, a "Skill" is not just a function. It is a living unit of capability composed of three parts: +Every registry skill is a folder of **roles** implemented by fixed filenames in v0. The [README Mission](../README.md#mission) summarizes the core roles; optional assets and the full reference are below. Filenames stay unchanged. -### 1. The Body (Logic) -* **What it is**: The standardized Python code (inheriting from `BaseSkill`). -* **Role**: Executes the actual work—fetching data, calculating numbers, hitting APIs. -* **File**: `skill.py` -* **Design**: Hardened, error-proof, and deterministic. It does not hallucinate. +### Grouping -### 2. The Mind (Cognition) -* **What it is**: The System Instructions and "Cognitive Map". -* **Role**: Teaches the LLM *how* to use the Body. It explains the nuances, edge cases, and reasoning steps required to use the tool effectively. -* **File**: `instructions.md` -* **Design**: Written in natural language optimized for LLM comprehension. It travels with the skill. When you load the skill, you load its mind into the agent. +```text +CAPABILITY (what the host unlocks) +├── Contract manifest.yaml +├── Effect skill.py (+ effect modules in the same folder) +└── Directive instructions.md + +REGISTRY (required to merge) +└── Assurance test_skill.py + +OPTIONAL ASSETS +├── Corpus kb/, data/, bundled knowledge files +├── Reference schemas/, maps, in-bundle spec fixtures +└── Presentation card.json + +FRAMEWORK (outside the bundle folder) +└── Interface SkillLoader model adapters (to_gemini_tool, …) +``` + +### Role reference -### 3. The Conscience (Governance) -* **What it is**: The Constitution and Manifest. -* **Role**: Defines the boundaries. "Do not output PII", "Do not give financial advice". Records **issuer attribution** (who created or maintains the skill). -* **File**: `manifest.yaml` -* **Design**: Enforced at the prompt level. Issuer metadata (`name`, `email`, and optionally `github` / `org`) is for humans and catalog UIs—it is not passed to LLM tool schemas. +| Role | v0 file(s) | What it answers | +| :--- | :--- | :--- | +| **Contract** | `manifest.yaml` | What is this skill? Typed I/O, `constitution`, issuer, `requirements` | +| **Effect** | `skill.py` | What runs deterministically when invoked? (`BaseSkill.execute()`) | +| **Directive** | `instructions.md` | How should the host use this capability? When, how to read outputs, limits | +| **Assurance** | `test_skill.py` | Does Effect honor Contract? (offline bundle tests; CI / `skillware test`) | +| **Corpus** | `kb/`, `data/`, … | Static knowledge Effect reads (not fetched at runtime) | +| **Reference** | `schemas/`, maps | Machine-readable adjuncts to Contract (validators, terminology) | +| **Presentation** | `card.json` | Optional catalog / UI card metadata | +| **Interface** | `skillware/core/loader.py` | Adapters that expose Contract to a host API | + +**Effect modules** — co-located Python imported by `skill.py` (for example `workflow.py`, `budget.py`). Part of Effect implementation, not separate bundle roles. + +**Corpus tooling** — offline scripts under the bundle (for example `maintenance/`) that refresh Corpus data. Not loaded by `execute()`. + +**Constitution vs directive** — hard limits and registry identity live in **Contract** (`manifest.yaml`). Operational playbook for the host lives in **Directive** (`instructions.md`). Both constrain behavior; different consumers. + +Legacy narrative aliases (**Body** = Effect, **Mind** = Directive, **Conscience** = Contract) may appear in older prose; prefer the role names above in new docs. Planned for removal in a later cleanup pass. --- @@ -37,16 +60,18 @@ Skillware/ ├── skills/ │ └── category/ # Domain boundary (e.g., 'finance') │ └── skill_name/ # A self-contained capability bundle -│ ├── manifest.yaml # Inputs, outputs, constitution, and issuer attribution -│ ├── skill.py # The deterministic Python execution logic -│ ├── instructions.md # Natural language guidance for the LLM -│ ├── card.json # Optional UI card (may mirror manifest issuer) -│ └── test_skill.py # Unit tests for the skill bundle +│ ├── manifest.yaml # Contract +│ ├── skill.py # Effect (entry) +│ ├── instructions.md # Directive +│ ├── card.json # Presentation (optional) +│ ├── test_skill.py # Assurance +│ ├── kb/ or data/ # Corpus (optional) +│ └── schemas/ # Reference (optional) └── skillware/ └── core/ - ├── base_skill.py # The interface every skill must implement + ├── base_skill.py # Effect interface (`BaseSkill`) ├── env.py # API key and secret loading - └── loader.py # The engine that bridges the skill to the LLM + └── loader.py # Interface: loader and model adapters ``` ```mermaid @@ -60,7 +85,7 @@ flowchart TD Loader[SkillLoader] -->|Loads| Bundle Loader --> Adapters - subgraph Adapters["Model adapters"] + subgraph Adapters["Interface — model adapters"] direction LR API[API models] Local[Local models] @@ -90,36 +115,35 @@ flowchart LR For how skills are resolved on disk, the provenance tiers, and what to check before loading skills you did not write, see [Skill trust model & operator security](security/skill-trust-model.md). -### Step 2: Adaptation (The "Babel Fish") -This is Skillware's superpower. Every model (Gemini, Claude, GPT) speaks a different "Tool Language". +### Step 2: Adaptation (Interface) +Every model (Gemini, Claude, GPT) expects a different tool-schema shape. * **Gemini** wants `FunctionDeclaration` with Protobuf types (UPPERCASE). * **Claude** wants `tool` definitions with JSON Schema input (lowercase). * **OpenAI** wants a `tools` list. -The `SkillLoader` acts as an adapter. +The `SkillLoader` acts as the **Interface** layer. * `SkillLoader.to_gemini_tool(skill)` -> Transmutes the manifest into Gemini's format. * `SkillLoader.to_claude_tool(skill)` -> Transmutes the manifest into Claude's format. * `SkillLoader.to_openai_tool(skill)` -> Transmutes the manifest into OpenAI's tool format. * `SkillLoader.to_deepseek_tool(skill)` -> Transmutes the manifest into DeepSeek's tool format. * `SkillLoader.to_ollama_prompt(skill)` -> Textual tool description for Ollama prompt-based loops. -### Step 3: Injection -When you initialize your agent, you pass the skill's **Instructions** into the System Prompt. -*> "You are an agent equipped with the Wallet Screening capability. Here is how you use it: [Content of instructions.md]..."* +### Step 3: Directive injection +Pass the skill's **`instructions.md`** (**Directive**) into the host system prompt (or equivalent). The model learns this skill's contract and limits—registry ID, when to invoke, how to interpret outputs—not a replacement host persona. -This "Context Injection" ensures the model isn't just *able* to call the tool, but is *intelligent* about it. +This injection ensures the model isn't just *able* to call the tool, but is *guided* on using it correctly for the task. --- ## The Execution Loop 1. **User Query**: "Is wallet 0x123 safe?" -2. **Model Cognition**: The LLM reads the injected `instructions.md` and realizes it should use the `finance/wallet_screening` tool. -3. **Tool Call**: The LLM outputs a structured tool call (e.g., JSON or Protobuf). +2. **Host reads Directive**: The LLM reads the injected `instructions.md` and realizes it should use the `finance/wallet_screening` tool. +3. **Tool Call**: The LLM outputs a structured tool call (e.g., JSON or Protobuf) via **Interface** adapters. 4. **Framework Execution**: Your script may validate tool arguments with `skill.validate_params(...)` before `execute()` (optional; recommended in agent loops). Direct integrations can call `skill.execute({"address": "0x123"})` without validation, as in many examples under `examples/`. -5. **The Body Acts**: `skill.py` runs. It fetches Etherscan data, checks local JSON sanctions lists, mimics the logic of a complex forensic tool. -6. **Structured Output**: The Body returns a rich JSON object. -7. **Synthesis**: The LLM receives the JSON. Guided again by the `instructions.md` (which says "Summarize risk factors clearly"), it translates the data into a human-readable report. +5. **Effect runs**: `skill.py` executes. It fetches Etherscan data, checks local JSON sanctions lists, and returns structured results. +6. **Structured Output**: `execute()` returns a JSON-serializable object. +7. **Synthesis**: The LLM receives the JSON. Guided again by **Directive**, it translates the data into a human-readable report. ## Model Agnosticism @@ -142,4 +166,3 @@ Skillware is designed to be the "Standard Library" for all agents. * View the [Changelog](../CHANGELOG.md) for release history * Read [How to Contribute](../CONTRIBUTING.md) (skills, docs, framework, and bugs) * If you are a contributing agent, follow the [Agent Contribution Workflow](contributing/ai_native_workflow.md) - diff --git a/docs/security/skill-trust-model.md b/docs/security/skill-trust-model.md index 5a38053..49dcc62 100644 --- a/docs/security/skill-trust-model.md +++ b/docs/security/skill-trust-model.md @@ -82,6 +82,8 @@ The same distinction applies to other manifest fields. Declaring env_vars docume Some skill content is instructions rather than code — markdown packs and similar material that an agent reads. Loading it does not execute Python in your process, but that does not make it safe: instructions can still steer what the agent does (including how it uses other tools and skills). The risk moves from process access to agent behavior. Treat instruction-only content from outside your project with the same provenance judgment as executable skills: read it before you let an agent follow it. +**Assurance (`test_skill.py`)** — Registry bundles ship pytest coverage for deterministic Effect behavior. Passing Assurance is the contributor contract for regressions; it does not sandbox execution or prove a skill is safe to run. + ## 5. Concrete flows Three common setups and what to watch for in each. diff --git a/docs/skills/README.md b/docs/skills/README.md index d2b1e0f..8873630 100644 --- a/docs/skills/README.md +++ b/docs/skills/README.md @@ -1,6 +1,6 @@ # Skill Library -Welcome to the official catalog of Skillware capabilities. New here? Start with the [project README](../../README.md). +Welcome to the official catalog of Skillware capabilities. New here? Start with the [project README](../../README.md). Each skill page describes its bundle layout; shared role vocabulary is in [Skill anatomy](../introduction.md#skill-anatomy). Browse by category below, or run `skillware list` after `pip install skillware` to see locally available skills. When contributing a new skill, see [Choosing a category](../../CONTRIBUTING.md#choosing-a-category) in CONTRIBUTING.md. diff --git a/docs/skills/bg_remover.md b/docs/skills/bg_remover.md index a9d208d..bbcef72 100644 --- a/docs/skills/bg_remover.md +++ b/docs/skills/bg_remover.md @@ -116,15 +116,15 @@ Example execute payload after download: } ``` -## Internal Architecture +## Bundle layout -The skill lives in `skills/creative/bg_remover/`. +The skill lives in `skills/creative/bg_remover/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### The Mind (`instructions.md`) +### Directive (`instructions.md`) Skill instructions: when to invoke, input/output conventions, URL and cloud pre-steps, model selection, and error codes. -### The Body (`skill.py`) +### Effect (`skill.py`) Lazy-imports `rembg` and Pillow, reuses cached rembg sessions, runs `remove`, and returns structured JSON with transparent PNG bytes. @@ -333,6 +333,8 @@ Commits that touched this skill bundle or its catalog page ([`creative/bg_remove | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | +| [`4096824`](https://github.com/ARPAHLS/skillware/commit/4096824fbaeb87a2b48a90d1ba2bec29cf3a1766) | docs: document issuer.org policy and align ARPA-driven registry skills (#295) (#316) | 28 Aug 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`d32260e`](https://github.com/ARPAHLS/skillware/commit/d32260e) | feat(bg_remover): harden skill to v0.2.0 (#268) | 2 Aug 2026 | `0.2.0` | [@AyushSrivastava1818](https://github.com/AyushSrivastava1818), [@rosspeili](https://github.com/rosspeili) | | [`c6d4c53`](https://github.com/ARPAHLS/skillware/commit/c6d4c53) | feat(creative): add offline background removal skill (#244) | 16 Jul 2026 | `0.1.0` | [@AyushSrivastava1818](https://github.com/AyushSrivastava1818), [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/deceptive_ui_guard.md b/docs/skills/deceptive_ui_guard.md index c060b2b..d21732c 100644 --- a/docs/skills/deceptive_ui_guard.md +++ b/docs/skills/deceptive_ui_guard.md @@ -55,6 +55,10 @@ Deterministic scanner for **deceptive web UI surfaces** and **anti-agent tricks* No required environment variables. Optional `url` fetch uses network; supply `html_content` for fully offline scans. +## Bundle layout + +The skill lives in `skills/security/deceptive_ui_guard/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Assurance** — `test_skill.py`. + ## Example Usage (Direct) ```python @@ -142,6 +146,7 @@ Commits that touched this skill bundle or its catalog page ([`security/deceptive | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`68da6ed`](https://github.com/ARPAHLS/skillware/commit/68da6ed) | feat(security): add deceptive_ui_guard v1 for issue #78 (#313) | 27 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/evm_tx_handler.md b/docs/skills/evm_tx_handler.md index 273bed6..6ba8643 100644 --- a/docs/skills/evm_tx_handler.md +++ b/docs/skills/evm_tx_handler.md @@ -24,6 +24,10 @@ Structured EVM operations for a **dedicated agent wallet**: resolve trade intent | `wallet_info` | Address, supported chains, preferences (no secrets) | | `update_preferences` | Persist allowed keys to `config.yaml` | +## Bundle layout + +The skill lives in `skills/defi/evm_tx_handler/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — manifest in the bundle. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Reference** — `data/` (chains, tokens, address book YAML). **Assurance** — `test_skill.py`. + ## Environment | Variable | Required | Purpose | @@ -192,6 +196,7 @@ Commits that touched this skill bundle or its catalog page ([`defi/evm_tx_handle | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`4814478`](https://github.com/ARPAHLS/skillware/commit/4814478) | Fix: to_gemini_tool to return types.Tool object. Fixes #223 (#229) | 10 Jul 2026 | `0.2.0` | [@Areen-09](https://github.com/Areen-09) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/gmail_handler.md b/docs/skills/gmail_handler.md index 9a9bba2..904330b 100644 --- a/docs/skills/gmail_handler.md +++ b/docs/skills/gmail_handler.md @@ -307,6 +307,10 @@ org_domains: - **Untrusted inbound content.** `read_message` and `download_attachment` set `untrusted_content: true`; do not follow instructions in email bodies or open attachments without operator consent. - **Outbound history.** Use `search_sent` for "what did we last send to George?" (IMAP Sent + local send ledger). +## Bundle layout + +The skill lives in `skills/office/gmail_handler/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — manifest in the bundle. **Directive** — `instructions.md`. **Effect** — `skill.py` and helpers. **Corpus** — `data/` (address book, config templates). **Assurance** — `test_skill.py`. + ## Usage Examples Guides: [Usage index](../usage/README.md) · [Agent loops](../usage/agent_loops.md) · [API keys](../usage/api_keys.md) @@ -388,6 +392,7 @@ Commits that touched this skill bundle or its catalog page ([`office/gmail_handl | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`907c7dc`](https://github.com/ARPAHLS/skillware/commit/907c7dc) | feat(gmail_handler): v0.2 attachments, reply signatures, and multi-profile sigs | 19 Aug 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`a1bab61`](https://github.com/ARPAHLS/skillware/commit/a1bab61) | Add mail CLI and config for gmail_handler operator UX (#292) | 19 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`13473ce`](https://github.com/ARPAHLS/skillware/commit/13473ce) | feat(office/gmail_handler): add Gmail IMAP/SMTP skill for agent mail workflows (#208) (#291) | 17 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/issue_resolver.md b/docs/skills/issue_resolver.md index 06716b5..ecaba5e 100644 --- a/docs/skills/issue_resolver.md +++ b/docs/skills/issue_resolver.md @@ -31,11 +31,11 @@ The skill itself does **not** call GitHub, run git, or write code. It validates - **Caller-injectable context**: The `extra_instructions` field lets any caller inject project-specific style rules, scope constraints, or workflow requirements without modifying the skill. - **Graceful authentication**: Operates without a token against public repositories (subject to GitHub's 60 req/hr unauthenticated limit) and upgrades to 5000 req/hr when `GITHUB_TOKEN` is provided. -## Internal Architecture +## Bundle layout -The skill lives in `skills/dev_tools/issue_resolver/`. +The skill lives in `skills/dev_tools/issue_resolver/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### The Body (`skill.py` + `workflow.py`) +### Effect (`skill.py` + `workflow.py`) A thin, deterministic action router. It validates the issue URL against the GitHub URL pattern, normalises the token source (runtime parameter takes precedence over environment variable), pre-computes all GitHub API and raw content URLs the agent will need, parses caller-supplied Markdown, and returns stage checklists and commit gates on demand. It makes no network calls and has no runtime dependencies beyond the Python standard library and `PyYAML`. @@ -47,7 +47,7 @@ A thin, deterministic action router. It validates the issue URL against the GitH | `stage_checklist` | Steps and conditionals for one stage | | `validate_commit_message` | Pre-commit message gate | -### The Mind (`instructions.md`) +### Directive (`instructions.md`) Agent-facing rules: when to use the skill, how to call each action, mandatory stage order, profile trust boundaries, gate rules, and the structured **plan** output contract. Detailed steps and conditionals for each stage are returned at runtime by `stage_checklist` (defined in `workflow.py`). @@ -379,6 +379,7 @@ Commits that touched this skill bundle or its catalog page ([`dev_tools/issue_re | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.3.0` | [@rosspeili](https://github.com/rosspeili) | | [`e90ba2f`](https://github.com/ARPAHLS/skillware/commit/e90ba2f) | chore(release): 0.4.8 — skills, profiles, version policy | 3 Aug 2026 | `0.3.0` | [@rosspeili](https://github.com/rosspeili) | | [`1e039a2`](https://github.com/ARPAHLS/skillware/commit/1e039a2) | feat: add repository profiles to issue resolver (#271) | 3 Aug 2026 | `0.3.0` | [@TheDarkniteFalls](https://github.com/TheDarkniteFalls) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.2.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/kpi_gate.md b/docs/skills/kpi_gate.md index d614b7c..c477eef 100644 --- a/docs/skills/kpi_gate.md +++ b/docs/skills/kpi_gate.md @@ -33,6 +33,26 @@ Where [`monitoring/token_limiter`](token_limiter.md) covers resource-side monito 3. Honesty floors → `insufficient_data` iff the declared floor is unmet, with the rule's declared reason code — checked against the declared metric only, never inferred 4. Rule evaluation in declared order +## Bundle layout + +The skill lives in `skills/monitoring/kpi_gate/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details below. **Assurance** — `test_skill.py` in the bundle. + +### Effect (`skill.py`) + +Pure Python evaluation: four-stage validation, closed error registry, and rule evaluation in charter order. No network calls; identical input returns identical output. + +### Directive (`instructions.md`) + +Registry ID, agent-loop contract (errors block, warnings surface, `insufficient_data` never backfilled), when to invoke, and how to read findings vs contract errors. + +### Reference (`schemas/`) + +JSON Schemas for metrics, policy, and benchmarks inputs (documentation; runtime uses explicit stdlib checks). + +### Corpus (`kb/`) + +Versioned benchmark demo data (`benchmarks_demo.json`) for rules that reference `benchmark_ref`. + ## Manifest Details **Parameters Schema:** @@ -284,7 +304,8 @@ Commits that touched this skill bundle or its catalog page ([`monitoring/kpi_gat | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | -| *(pending merge)* | Add monitoring/kpi_gate v0.1.0 implementing the issue #317 interface | 29 Aug 2026 | `0.1.0` | [@mrmasa88](https://github.com/mrmasa88) | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | +| [`0d01991`](https://github.com/ARPAHLS/skillware/commit/0d019913ad7b87ad5447b564133bb03b270237d9) | Add monitoring/kpi_gate v0.1.0 implementing the issue #317 interface (#318) | 1 Sep 2026 | `0.1.0` | [@mrmasa88](https://github.com/mrmasa88) | ## Enterprise disclaimer diff --git a/docs/skills/mental_coach.md b/docs/skills/mental_coach.md index bf4d9d9..24089f9 100644 --- a/docs/skills/mental_coach.md +++ b/docs/skills/mental_coach.md @@ -13,6 +13,10 @@ Deterministic wellness coaching guardrail for host agents. Runs crisis triage before retrieval, blocks clinical overreach, retrieves grounded KB chunks with citations, and optionally runs a Gemini scope evaluator. +## Bundle layout + +The skill lives in `skills/wellness/mental_coach/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — manifest in the bundle. **Directive** — `instructions.md`. **Effect** — `skill.py` and gate modules. **Corpus** — `kb/` (crisis resources, coaching corpus, constraints). **Assurance** — `test_skill.py`. + > **Health disclaimer:** This skill provides general wellness support and information only. It is not medical, psychological, or clinical advice and is not a substitute for care from a licensed professional. Use at your own discretion. Active safety guardrails (deterministic crisis gate and hard constraints) reduce risk but do not replace professional judgment; double-check results and treat output as everyday coping guidance, not medical advice. In a crisis or emergency, contact local emergency services or the crisis resources returned by the skill. ## What It Does @@ -180,6 +184,8 @@ Commits that touched this skill bundle or its catalog page ([`wellness/mental_co | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | +| [`4096824`](https://github.com/ARPAHLS/skillware/commit/4096824fbaeb87a2b48a90d1ba2bec29cf3a1766) | docs: document issuer.org policy and align ARPA-driven registry skills (#295) (#316) | 28 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`6cbe140`](https://github.com/ARPAHLS/skillware/commit/6cbe140) | Add wellness/mental_coach skill resolving #148 (#174) | 22 Jun 2026 | `0.1.0` | [@mrmasa88](https://github.com/mrmasa88) | diff --git a/docs/skills/mica_module.md b/docs/skills/mica_module.md index 71668a5..786d967 100644 --- a/docs/skills/mica_module.md +++ b/docs/skills/mica_module.md @@ -19,20 +19,25 @@ A highly specialized, localized RAG (Retrieval-Augmented Generation) and policy * **Optional Model Swappable Evaluator**: Includes a built-in evaluation loop to review the context and score potential responses for regulatory holes. This node operates entirely independently and the model can be dynamically swapped based on user preference. * **Policy Firewall**: Evaluates intent against the regulation before the parent agent generates an external answer, labeling requests as `APPROVED`, `CAUTION`, or `HIGH_RISK_DETECTED`. -## Internal Architecture +## Bundle layout -The skill is self-contained in `skills/compliance/mica_module/`. +The skill is self-contained in `skills/compliance/mica_module/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) +### Directive (`instructions.md`) The system prompt teaches the main Agent to: * Use a **Pure Cognitive Workflow**: The agent recognizes the MiCA skill via its manifest and determines when statutory context is needed. * Formatting: Invokes the skill via a JSON block in the dialogue stream. * **Traceability**: Explicitly cites the Article numbers (e.g., Article 59) found in the RAG context. -### 2. The Body (`skill.py` & `mica_corpus.json`) +### Effect (`skill.py`) + * **In-Memory Caching**: The 1MB corpus is cached on the first run, delivering subsequent RAG lookups in **~1.7ms**. * **Weighted Surgical Router**: Instead of a "shotgun" match, the router uses a weighted scoring system (Mentions > Keywords > collisions) and throttles retrieval to the **Top 10** most relevant Articles to prevent context window asphyxiation. +### Corpus (`mica_corpus.json`) + +Bundled MiCA corpus loaded by Effect at runtime. + ## Environment | Variable | Required | Purpose | @@ -209,6 +214,7 @@ Commits that touched this skill bundle or its catalog page ([`compliance/mica_mo | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`812ec7e`](https://github.com/ARPAHLS/skillware/commit/812ec7e) | Add card ui_schema validation guard and fix drift (#199) (#260) | 20 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/novelty_extractor.md b/docs/skills/novelty_extractor.md index d954d54..43e2f0c 100644 --- a/docs/skills/novelty_extractor.md +++ b/docs/skills/novelty_extractor.md @@ -28,15 +28,15 @@ and multi-turn corpus processing. - **Pluggable chunking**: Supports `paragraph` (default) and `sentence` strategies, with an extensible design for future strategies. -## Internal Architecture +## Bundle layout -The skill is located in `skills/data_engineering/novelty_extractor/`. +The skill is located in `skills/data_engineering/novelty_extractor/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) +### Directive (`instructions.md`) Explains when to invoke the skill, how to interpret outputs, and how to handle multi-turn filtering by passing `distilled_content` as `baseline_chunks`. -### 2. The Body (`skill.py`) +### Effect (`skill.py`) - **Chunking**: Splits input text using the configured strategy before embedding. - **Embedding**: Embeds all chunks in a single batch call using `fastembed` (`BAAI/bge-small-en-v1.5`, ~50 MB, downloaded on first use). @@ -230,6 +230,8 @@ Commits that touched this skill bundle or its catalog page ([`data_engineering/n | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | +| [`4096824`](https://github.com/ARPAHLS/skillware/commit/4096824fbaeb87a2b48a90d1ba2bec29cf3a1766) | docs: document issuer.org policy and align ARPA-driven registry skills (#295) (#316) | 28 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`b994606`](https://github.com/ARPAHLS/skillware/commit/b994606) | fix(novelty_extractor): mock embeddings in bundle tests for offline CI | 13 Jun 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/pdf_form_filler.md b/docs/skills/pdf_form_filler.md index 33d024d..1f0485f 100644 --- a/docs/skills/pdf_form_filler.md +++ b/docs/skills/pdf_form_filler.md @@ -18,18 +18,18 @@ A productivity skill that fills AcroForm-based PDFs by mapping natural language * **Context Awareness**: Extracts nearby text labels to ensure accurate mapping, even if field names are obscure (e.g., `field_123` vs label "First Name"). * **Type Safety**: Automatically converts values to the correct format (booleans for checkboxes, specific options for dropdowns). -## Internal Architecture +## Bundle layout -The skill is self-contained in `skills/office/pdf_form_filler/`. +The skill is self-contained in `skills/office/pdf_form_filler/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) +### Directive (`instructions.md`) The system prompt teaches the internal mapping engine to: * Analyze the provided "User Instructions". * Review the list of "Detected Fields" (ID, Type, Context, Options). * Output a strict JSON mapping of `Field ID -> Value`. * Handle ambiguities by preferring precision over guessing. -### 2. The Body (`skill.py` & `utils.py`) +### Effect (`skill.py` & `utils.py`) * **PDF Processing**: Uses `PyMuPDF` (fitz) for high-fidelity rendering and widget manipulation. * **LLM Integration**: Wraps the Anthropic SDK to perform the semantic reasoning step. * **Validation**: Ensures values match the field type (e.g., selecting a valid option from a dropdown). @@ -205,6 +205,7 @@ Commits that touched this skill bundle or its catalog page ([`office/pdf_form_fi | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`4814478`](https://github.com/ARPAHLS/skillware/commit/4814478) | Fix: to_gemini_tool to return types.Tool object. Fixes #223 (#229) | 10 Jul 2026 | `0.1.0` | [@Areen-09](https://github.com/Areen-09) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/pii_masker.md b/docs/skills/pii_masker.md index 56e2606..569608e 100644 --- a/docs/skills/pii_masker.md +++ b/docs/skills/pii_masker.md @@ -18,6 +18,10 @@ High-precision, local PII (Personally Identifiable Information) detection and re > Reaching production-grade 95%+ enterprise accuracy requires architectural optimizations, hard-negative mining, and dataset-specific fine-tuning. Full implementation of the `micro-f1-mask` privacy middleware should only happen after you rigorously fine-tune and test it exclusively with your own proprietary data structures. > Visit the core project repository for training orchestration and full middleware execution: [github.com/arpahls/micro-f1-mask](https://github.com/arpahls/micro-f1-mask) +## Bundle layout + +The skill lives in `skills/compliance/pii_masker/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — manifest in the bundle. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Assurance** — `test_skill.py`. + ## How It Works Agentic workflows inherently risk leaking sensitive user data (names, physical addresses, emails, crypto wallets, etc.) to external LLM providers. This skill solves this by utilizing a local [Ollama](https://ollama.com/) instance hosting the `arpacorp/micro-f1-mask` edge model. @@ -210,6 +214,7 @@ Commits that touched this skill bundle or its catalog page ([`compliance/pii_mas | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`812ec7e`](https://github.com/ARPAHLS/skillware/commit/812ec7e) | Add card ui_schema validation guard and fix drift (#199) (#260) | 20 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/prompt_injection_firewall.md b/docs/skills/prompt_injection_firewall.md index c3df49b..6ee5477 100644 --- a/docs/skills/prompt_injection_firewall.md +++ b/docs/skills/prompt_injection_firewall.md @@ -23,6 +23,10 @@ An offline, deterministic pre-flight scanner for hostile instructions in untrust 5. Instruction-override lexicon families (negation, role reset, exfiltration, hijack, authority, boundary spoof) 6. Corroboration and mention-vs-use downgrades controlled by `sensitivity` +## Bundle layout + +The skill lives in `skills/security/prompt_injection_firewall/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Assurance** — `test_skill.py`. + ## Manifest Details **Parameters Schema:** @@ -213,6 +217,8 @@ Commits that touched this skill bundle or its catalog page ([`security/prompt_in | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | +| [`4096824`](https://github.com/ARPAHLS/skillware/commit/4096824fbaeb87a2b48a90d1ba2bec29cf3a1766) | docs: document issuer.org policy and align ARPA-driven registry skills (#295) (#316) | 28 Aug 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`1071c08`](https://github.com/ARPAHLS/skillware/commit/1071c08) | Add security/prompt_injection_firewall skill (#267) | 31 Jul 2026 | `0.1.0` | [@mrmasa88](https://github.com/mrmasa88) | diff --git a/docs/skills/prompt_rewriter.md b/docs/skills/prompt_rewriter.md index 756fd13..b96c2a9 100644 --- a/docs/skills/prompt_rewriter.md +++ b/docs/skills/prompt_rewriter.md @@ -14,6 +14,10 @@ A powerful middleware skill that acts as a deterministic compression logic gate This is critical for complex agents facing strict token constraints or high LLM API costs. +## Bundle layout + +The skill lives in `skills/optimization/prompt_rewriter/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details below. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Assurance** — `test_skill.py`. + ## Manifest Details **Parameters Schema:** @@ -167,6 +171,7 @@ Commits that touched this skill bundle or its catalog page ([`optimization/promp | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0f81d1f`](https://github.com/ARPAHLS/skillware/commit/0f81d1f) | Backfill bundle tests for six registry skills missing test_skill.py. | 10 Jun 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/synthetic_generator.md b/docs/skills/synthetic_generator.md index c8243d0..7f66218 100644 --- a/docs/skills/synthetic_generator.md +++ b/docs/skills/synthetic_generator.md @@ -18,14 +18,14 @@ A specialized data engineering capability that combats "model collapse" by gener * **Combinatorial Entropy Injection**: Designed to explicitly seek out edge-case personas via the `diversity_prompt`, significantly raising the variance of training data. * **Zero-Dependency Evaluation Heuristic**: Employs built-in `zlib` string compression ratios to calculate a dynamic entropy score, allowing the coordinating agent to reject low-entropy boilerplate data instantly. -## Internal Architecture +## Bundle layout -The skill is located in `skills/data_engineering/synthetic_generator/`. +The skill is located in `skills/data_engineering/synthetic_generator/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) +### Directive (`instructions.md`) The system instructions emphasize boundary-pushing data generation. It prohibits standard AI tropes and enforces schema obedience. -### 2. The Body (`skill.py`) +### Effect (`skill.py`) * **Data Generation**: The skill handles invoking the LLM behind the scenes, using the configured provider and isolating the `temperature` specifically for the data generation task so the primary coordinating agent doesn't need to run at high temperature. * **Validation**: Attempts to automatically parse out code blocks to extract standard JSON object arrays. * **Entropy Scoring**: Converts text sequences into `zlib` compressed bytes. A poor compression ratio implies high lexical variance (less repetitive syntax). @@ -204,6 +204,7 @@ Commits that touched this skill bundle or its catalog page ([`data_engineering/s | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0f81d1f`](https://github.com/ARPAHLS/skillware/commit/0f81d1f) | Backfill bundle tests for six registry skills missing test_skill.py. | 10 Jun 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/token_limiter.md b/docs/skills/token_limiter.md index dfee8a3..c9712e7 100644 --- a/docs/skills/token_limiter.md +++ b/docs/skills/token_limiter.md @@ -24,11 +24,11 @@ This skill does **not** kill processes, cancel provider sessions, or call billin - **Idempotent retries**: Optional `turn_id` caches the decision for the same turn metrics. - **ROI scaffold (v2)**: Accepts `roi_value_usd`, `expected_outcome`, and `outcome_delivered` for future outcome-aware gates. **Not enforced in v1.** -## Internal Architecture +## Bundle layout -The skill lives in `skills/monitoring/token_limiter/`. +The skill lives in `skills/monitoring/token_limiter/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### The Body (`skill.py` + `budget.py`) +### Effect (`skill.py` + `budget.py`) Pure Python evaluation. Loads pricing data at init, tracks an in-memory turn cache for idempotent retries, and returns JSON-serializable payloads. No network calls. @@ -37,7 +37,7 @@ Pure Python evaluation. Loads pricing data at init, tracks an in-memory turn cac | `check` (default) | Evaluate cumulative token usage against limits | | `reset` | Clear cached turn results for a `task_id` | -### The Mind (`instructions.md`) +### Directive (`instructions.md`) Tells the host agent when to call the tool, that cumulative counts are required, and that `FORCE_TERMINATE` means stop the loop immediately. @@ -275,6 +275,7 @@ Commits that touched this skill bundle or its catalog page ([`monitoring/token_l | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | | [`4814478`](https://github.com/ARPAHLS/skillware/commit/4814478) | Fix: to_gemini_tool to return types.Tool object. Fixes #223 (#229) | 10 Jul 2026 | `1.0.0` | [@Areen-09](https://github.com/Areen-09) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/tos_evaluator.md b/docs/skills/tos_evaluator.md index 9364707..18e384f 100644 --- a/docs/skills/tos_evaluator.md +++ b/docs/skills/tos_evaluator.md @@ -19,6 +19,10 @@ A local-first compliance guardrail that checks whether an intended automated act 3. Clauses related to scraping, crawling, indexing, monitoring, downloading, and API-only access. 4. Optional LLM-backed clause review when local heuristics cannot confidently classify the policy language. +## Bundle layout + +The skill lives in `skills/compliance/tos_evaluator/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Directive** — `instructions.md`. **Effect** — `skill.py`. **Assurance** — `test_skill.py`. + ## Manifest Details **Parameters Schema:** @@ -222,6 +226,7 @@ Commits that touched this skill bundle or its catalog page ([`compliance/tos_eva | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`0d550d0`](https://github.com/ARPAHLS/skillware/commit/0d550d0) | docs: sweep vision, bundle class usage, and README Mermaid | 8 Jul 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | | [`14807be`](https://github.com/ARPAHLS/skillware/commit/14807be) | style: format codebase with Black (#153) | 3 Jun 2026 | `0.1.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/uk_companies_house_handler.md b/docs/skills/uk_companies_house_handler.md index 52a7512..170bded 100644 --- a/docs/skills/uk_companies_house_handler.md +++ b/docs/skills/uk_companies_house_handler.md @@ -23,18 +23,18 @@ A deterministic UK Companies House API handler for agents. Provides structured o - **Intent Mapping**: Translate common user intent keywords (CEO, owner, shareholder) to the correct UK Companies House actions and build suggested action pipelines. - **State Tracking (Context)**: Automatically carries forward session state (like `company_number`, `company_name`, and active filters) between sequential tool calls to seamlessly link multi-step operations. -## Internal Architecture +## Bundle layout -The skill is self-contained in `skills/finance/uk_companies_house_handler/`. +The skill is self-contained in `skills/finance/uk_companies_house_handler/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) +### Directive (`instructions.md`) Skill-context instructions (registry ID opener, not a persona). The host agent: - Passes **clean** `query` / `company_number` parameters and optional `role_hint` — the skill does not strip conversational prefixes. - Handles disambiguation when search returns `needs_input`, then resumes with `context` / `run_pipeline`. - Uses `terminology_map.yaml` as a reference lexicon; maps US/informal terms via reasoning plus `map_intent` hints. - Renders full `officers[]` / `filings[]` lists, including `partial` previews (default limit 10). -### 2. The Body (`skill.py`) +### Effect (`skill.py`) A single `execute()` entry point dispatches to nine action handlers: - **Core actions**: `resolve_company`, `get_company_profile`, `get_officers`, `get_pscs`, `get_filing_history`. - **Pipeline orchestration & composites**: `run_pipeline`, `map_intent`, `resolve_and_get_officers`, `resolve_and_get_filings`. @@ -402,6 +402,7 @@ Commits that touched this skill bundle or its catalog page ([`finance/uk_compani | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `1.2.0` | [@rosspeili](https://github.com/rosspeili) | | [`01cd620`](https://github.com/ARPAHLS/skillware/commit/01cd620) | feat(uk_companies_house_handler): upgrade to v2b with pipeline orchestration and composites (#220) (#308) | 24 Aug 2026 | `1.2.0` | [@Areen-09](https://github.com/Areen-09), [@rosspeili](https://github.com/rosspeili) | | [`84cd790`](https://github.com/ARPAHLS/skillware/commit/84cd790) | feat: complete uk companies house handler v2a (#220) (#255) | 22 Jul 2026 | `1.1.0` | [@Areen-09](https://github.com/Areen-09) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/skills/wallet_screening.md b/docs/skills/wallet_screening.md index 725dd7e..0992087 100644 --- a/docs/skills/wallet_screening.md +++ b/docs/skills/wallet_screening.md @@ -21,30 +21,32 @@ A rigorous compliance and risk assessment tool for Ethereum wallets. This skill * Identifies top counterparties and "most interacted" wallets. * **Risk Scoring**: Flags high-risk patterns based on transaction flow analysis. -## Internal Architecture +## Bundle layout -The skill is self-contained in `skills/finance/wallet_screening/`. +The skill is self-contained in `skills/finance/wallet_screening/`. [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. -### 1. The Mind (`instructions.md`) -The system prompt teaches the AI specifically to: +### Directive (`instructions.md`) + +The skill context teaches the host model to: * ACT as a Senior Compliance Officer. * Analyze the JSON report for boolean flags (`sanctioned`, `malicious_interactions`). * Provide a verdict: "Low Risk", "Medium Risk", or "High Risk". -### 2. The Body (`skill.py`) +### Effect (`skill.py`) + The Python implementation has been engineered for speed and depth: * **Dynamic Loading**: It scans the `data/` directory for *any* `.json` file, automatically indexing it as a sanctions source. * **API Integration**: Uses Etherscan for live transaction history and CoinGecko for real-time pricing. * **Forensic Engine**: Replays the wallet's entire history to build a counterparty graph. -### 3. The Knowledge (`data/`) +### Corpus (`data/`) Contains localized JSON snapshots of global sanctions lists. * `entities.ftm.json`: Core sanctions list. * `malicious_scs_2025.json`: Known malicious smart contracts. * `data/*.json`: Hundreds of normalized lists (UniSwap TRM, FBI Lazarus, etc.). -### 4. Maintenance Subsystem (`maintenance/`) -Tools to keep the knowledge fresh. +### Corpus tooling (`maintenance/`) +Offline tools to refresh Corpus (not loaded by `execute()`). * `normalization_tool.py`: Ingests raw CSVs from authorities (FBI, Israel NBCTF) and converts them to the Skillware JSON schema. * `normalize_uniswap_trm.py`: Converts Uniswap's blocked address list into our risk format. @@ -255,6 +257,7 @@ Commits that touched this skill bundle or its catalog page ([`finance/wallet_scr | Commit | Description | Date | Version | Contributors | | :--- | :--- | :--- | :--- | :--- | +| [`12fbd1a`](https://github.com/ARPAHLS/skillware/commit/12fbd1a11bdf66250008afc59df7048935eafc73) | docs: adopt Skill anatomy vocabulary on catalog page (#319) | 1 Sep 2026 | `1.0.1` | [@rosspeili](https://github.com/rosspeili) | | [`0b308d3`](https://github.com/ARPAHLS/skillware/commit/0b308d3) | feat(wallet_screening): paginate Etherscan txlist and surface warnings (#214) (#215) | 23 Jul 2026 | `1.0.1` | [@Hendobox](https://github.com/Hendobox) | | [`bca8181`](https://github.com/ARPAHLS/skillware/commit/bca8181) | Add category and per-skill pip extras with manifest sync (#236). (#256) | 16 Jul 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | | [`f301088`](https://github.com/ARPAHLS/skillware/commit/f301088) | Implement manifest param validation and standardize outputs key. (#253) | 12 Jul 2026 | `1.0.0` | [@rosspeili](https://github.com/rosspeili) | diff --git a/docs/usage/README.md b/docs/usage/README.md index f6c7986..b580c24 100644 --- a/docs/usage/README.md +++ b/docs/usage/README.md @@ -36,7 +36,7 @@ To list locally available skills, inspect path resolution, show config, check lo Skill-specific **Usage Examples** (sample prompts and execute payloads) live on each [skill catalog page](../skills/README.md). Shared patterns (load bundle, run `execute`, return tool results): -[agent_loops.md](agent_loops.md). After `load_skill`, prefer `bundle["class"]()` to instantiate the skill; explicit `bundle["module"].ClassName()` also works. Runnable script inventory: +[agent_loops.md](agent_loops.md). [Skill anatomy](../introduction.md#skill-anatomy) (Contract, Effect, Directive, Assurance, Interface). After `load_skill`, prefer `bundle["class"]()` to instantiate the skill; explicit `bundle["module"].ClassName()` also works. Runnable script inventory: [examples/README.md](../../examples/README.md). Contributors adding **Usage Examples** to skill catalog pages: [skill_usage_template.md](skill_usage_template.md). diff --git a/docs/usage/claude.md b/docs/usage/claude.md index 4ca9814..166b124 100644 --- a/docs/usage/claude.md +++ b/docs/usage/claude.md @@ -17,8 +17,8 @@ claude_tool = SkillLoader.to_claude_tool(skill) message = client.messages.create( model="claude-3-opus-20240229", max_tokens=1024, - system=skill['instructions'], # Inject the "Mind" - tools=[claude_tool], # Bind the "Body" + system=skill['instructions'], # Directive + tools=[claude_tool], # Interface messages=[ {"role": "user", "content": "Check wallet 0x123..."} ] @@ -41,9 +41,7 @@ Skillware's `manifest.yaml` uses standard JSON Schema for `parameters`. `SkillLoader.to_claude_tool()` maps `manifest['parameters']` directly to `input_schema`, wrapping it in the correct dictionary structure that the Anthropic API expects. ### 2. System Prompt Engineering -Claude excels at following complex instructions. Skillware's `instructions.md` (The Mind) is designed to be passed directly to the `system` parameter of `messages.create()`. - -This ensures Claude adopts the persona (e.g., "Senior Compliance Officer") defined by the skill author. +Claude excels at following complex instructions. Pass `instructions.md` (**Directive**) directly to the `system` parameter of `messages.create()` so the model knows when and how to invoke the skill—not to replace the host agent's persona. ## 🛠️ Handling Tool Use diff --git a/docs/usage/deepseek.md b/docs/usage/deepseek.md index 987aaeb..d96510f 100644 --- a/docs/usage/deepseek.md +++ b/docs/usage/deepseek.md @@ -57,7 +57,7 @@ DeepSeek applies the same function-name rules as other OpenAI-compatible tool AP Match `tool_call.function.name` to `tool["function"]["name"]` from `to_deepseek_tool()`, not the raw manifest `name` string. -### 3. System message (the Mind) +### 3. System message (Directive) Pass `bundle["instructions"]` as the `system` role content so the model knows when to call the skill. diff --git a/docs/usage/gemini.md b/docs/usage/gemini.md index 68a78ce..a27fa74 100644 --- a/docs/usage/gemini.md +++ b/docs/usage/gemini.md @@ -72,9 +72,9 @@ Gemini requires Protobuf types (uppercase `STRING`, `OBJECT`). `SkillLoader.to_gemini_tool()` handles this conversion automatically. It recursively walks your parameter schema, sanitizes the tool name, and returns a ready-to-use `types.Tool` object compatible with Gemini's backend. ### 2. Context Injection -Gemini 1.5+ supports `system_instruction`. Skillware leverages this to inject the "Mind" of the skill (`instructions.md`). +Gemini 1.5+ supports `system_instruction`. Pass `instructions.md` (**Directive**) there so the model knows when and how to use the tool. -This is crucial. Without `system_instruction`, the model knows it *has* a tool, but it doesn't know the nuanced strategy of *when* to use it. By injecting the instructions, you effectively fine-tune the model's behavior for that specific capability during the session. +Without `system_instruction`, the model knows it *has* a tool but lacks the skill's invocation guidance. Injecting `instructions.md` supplies that **Directive** layer for the session. ### 3. Function Calling Loop The `google-genai` SDK returns model parts that can include `function_call` requests. @@ -101,7 +101,7 @@ for part in response.candidates[0].content.parts: if fn := part.function_call: print(f"Model wants to call {fn.name} with {fn.args}") - # 1. Execute Logic + # 1. Run Effect result = skill_instance.execute(dict(fn.args)) # 2. Send Result diff --git a/docs/usage/openai.md b/docs/usage/openai.md index 826fc4d..c6d438f 100644 --- a/docs/usage/openai.md +++ b/docs/usage/openai.md @@ -70,7 +70,7 @@ OpenAI function names must match `[a-zA-Z0-9_-]` and are limited to 64 character In your tool loop, compare `tool_call.function.name` to `tool["function"]["name"]` from `to_openai_tool()`, not necessarily the raw manifest string. -### 3. System message (the Mind) +### 3. System message (Directive) Pass `bundle["instructions"]` as the `system` role content (or equivalent in your orchestration layer). That teaches the model when and how to invoke the skill, not only what parameters exist. diff --git a/docs/usage/skill_usage_template.md b/docs/usage/skill_usage_template.md index eca026a..d169d38 100644 --- a/docs/usage/skill_usage_template.md +++ b/docs/usage/skill_usage_template.md @@ -8,4 +8,28 @@ For Gemini sections, ensure the dispatch matches the sanitized tool name (e.g. ` Link to [agent_loops.md](agent_loops.md), [install_extras.md](install_extras.md), and [README.md](README.md). List skill-specific env vars in an **Environment** table; link to [api_keys.md](api_keys.md) for setup. -Do not duplicate the full API keys guide on skill pages. For authoring `instructions.md` within the skill bundle itself, see [CONTRIBUTING.md (§3 instructions.md)](../../CONTRIBUTING.md#3-instructionsmd-cognition) for append-only skill context guidelines. +Do not duplicate the full API keys guide on skill pages. For authoring `instructions.md` within the skill bundle itself, see [CONTRIBUTING.md (§3 instructions.md)](../../CONTRIBUTING.md#3-instructionsmd-directive) for append-only skill context guidelines. + +## Bundle layout (catalog section) + +Optional but recommended on catalog pages. Link [Introduction — Skill anatomy](../introduction.md#skill-anatomy). + +```markdown +## Bundle layout + +The skill lives in `skills///`. Roles: [Skill anatomy](../introduction.md#skill-anatomy). **Contract** — see Manifest Details above. **Assurance** — `test_skill.py` in the bundle. + +### Effect (`skill.py`) +… + +### Directive (`instructions.md`) +… + +### Corpus (optional) +… `kb/`, `data/`, … + +### Reference (optional) +… `schemas/`, … +``` + +Use **Effect modules** for co-located helpers (`workflow.py`, …). Use **Corpus tooling** for offline maintenance scripts, not loaded by `execute()`. **Interface** (model adapters) is framework code—do not list it as a bundle file. diff --git a/docs/vision.md b/docs/vision.md index 062e34e..b51958e 100644 --- a/docs/vision.md +++ b/docs/vision.md @@ -76,7 +76,7 @@ Skillware follows one thread: modular capability you can install, trust, and ext **In short:** Co-develop deeper skills with industry partners in compliance, finance, supply chain & logistics, manufacturing, among other domains. Higher-assurance datasets, SLAs, and production ownership beyond community contributions alone. -**Example:** An OEM and a plant operator co-maintain a skill chain for production lines: ingest IoT telemetry, normalize units, flag anomalies, and alert on silo levels, line stoppages, and vendor price shifts. Live feeds, audit logs, and signed releases ship inside the bundle. The same skill ids run in staging and on the floor. Logic, governance, and data provenance stay aligned because the bundle is the contract, not a patchwork of prompts and ad-hoc integrations. +**Example:** An OEM and a plant operator co-maintain a skill chain for production lines: ingest IoT telemetry, normalize units, flag anomalies, and alert on silo levels, line stoppages, and vendor price shifts. Live feeds, audit logs, and signed releases ship inside the bundle. The same skill ids run in staging and on the floor. Effect, Contract, and data provenance stay aligned because the bundle is the contract, not a patchwork of prompts and ad-hoc integrations. --- @@ -119,6 +119,6 @@ Skillware is community-built. We welcome human contributors and **supervised age - **[CONTRIBUTING.md](../CONTRIBUTING.md)** — fork, branch, skill standard, pull request process. - **[Agent Contribution Workflow](contributing/ai_native_workflow.md)** — how operators and agents ship reviewable work. -- **[Introduction](introduction.md)** — Mind, Body, Conscience architecture in depth. +- **[Introduction](introduction.md)** — Skill anatomy (Contract, Effect, Directive, Assurance, Interface) in depth. Help us make agent capabilities portable, safe, and reusable. diff --git a/templates/python_skill/README.md b/templates/python_skill/README.md index b3ffb85..c0651be 100644 --- a/templates/python_skill/README.md +++ b/templates/python_skill/README.md @@ -2,16 +2,18 @@ Starter bundle under `skills///`. Copy this template from `templates/python_skill/`, then replace every placeholder before opening a PR. +Roles: [Skill anatomy](../../docs/introduction.md#skill-anatomy) — **Contract** (`manifest.yaml`), **Effect** (`skill.py`), **Directive** (`instructions.md`), **Assurance** (`test_skill.py`), optional **Presentation** (`card.json`). + ## Before you submit 1. **Rename** the folder to match your skill ID (e.g. `skills/finance/my_skill`). 2. **Packaging**: Add empty `__init__.py` files in `skills//` (new categories only) and in your skill folder so PyPI wheels include the full bundle. List runtime packages in `manifest.yaml` `requirements` (PEP 508; pin with `>=` when the skill needs a minimum version — see [Install extras](../../docs/usage/install_extras.md#loader-behavior)), then run `python scripts/sync_extras.py` to update optional extras in `pyproject.toml`. -3. **`manifest.yaml`**: Set real `name` to the full registry ID (`category/skill_name`, matching the folder path), `version`, `description`, `short_description`, `parameters`, `constitution`, and `issuer` (`name` + `email` required; `github` / `org` optional). `SkillLoader.load_skill()` warns when `name` diverges from the path under registry layout; flat private layouts (`skills//`) are not validated. -4. **`skill.py`**: Implement deterministic logic with exactly one `BaseSkill` subclass (loaded as `bundle["class"]`); no LLM-generated code in the skill body. -5. **`instructions.md`**: Tell the agent when and how to use the tool. -6. **`card.json`**: Mirror `issuer` from the manifest; customize UI fields. -7. **`test_skill.py`**: Bundle test (required; enforced by `tests/test_skill_issuer.py`); offline, mock external services, including HTTP clients, LLM APIs, embedding/model loaders, and any first-run model downloads; run `pytest skills///test_skill.py` or `skillware test /`. See [TESTING.md](../../docs/TESTING.md). -8. **`docs/skills/.md`**: Catalog page with **ID**, **Issuer**, **Version**, **Recommended install** (`pip install "skillware[_]"`), **Usage Examples** (all providers; see `docs/usage/skill_usage_template.md`), and **Skill history** (linked GitHub contributors). +3. **`manifest.yaml` (Contract)**: Set real `name` to the full registry ID (`category/skill_name`, matching the folder path), `version`, `description`, `short_description`, `parameters`, `constitution`, and `issuer` (`name` + `email` required; `github` / `org` optional). `SkillLoader.load_skill()` warns when `name` diverges from the path under registry layout; flat private layouts (`skills//`) are not validated. +4. **`skill.py` (Effect)**: Implement deterministic logic with exactly one `BaseSkill` subclass (loaded as `bundle["class"]`); no LLM-generated code in the skill body. Co-located helpers (effect modules) may live in the same folder if imported only by `skill.py`. +5. **`instructions.md` (Directive)**: Tell the host when and how to use the tool (skill context, not host persona). +6. **`card.json` (Presentation)**: Mirror `issuer` from the manifest; customize UI fields. +7. **`test_skill.py` (Assurance)**: Bundle test (required; enforced by `tests/test_skill_issuer.py`); offline, mock external services, including HTTP clients, LLM APIs, embedding/model loaders, and any first-run model downloads; run `pytest skills///test_skill.py` or `skillware test /`. See [TESTING.md](../../docs/TESTING.md). +8. **`docs/skills/.md`**: Catalog page with **ID**, **Issuer**, **Version**, **Recommended install** (`pip install "skillware[_]"`), optional **Bundle layout**, **Usage Examples** (all providers; see `docs/usage/skill_usage_template.md`), and **Skill history** (linked GitHub contributors). 9. **`docs/skills/README.md`**: Add a row (Skill, ID, **Version**, Issuer, Description). Do not commit template placeholders (`Your Name`, `you@example.com`, `YOUR ORG`, etc.) under `skills/`—only real issuer details belong in the registry.