# teodorofodocrispin-cmyk/trustboost-pii-sanitizer architecture

> Architecture diagram of the GitHub repository teodorofodocrispin-cmyk/trustboost-pii-sanitizer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer
- Repository: https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer

## Overview

#### 1. Repository Role

This is a distribution and integration package for the hosted TrustBoost PII Sanitizer API, rather than the sanitizer service implementation itself. It publishes agent-facing metadata, a browser landing page, and an installable skill directing AI-agent clients to `api.trustboost.dev`.

Primary user entry points:
- Landing page: `index.html`
- Agent/plugin descriptors: `ai-plugin.json`, `plugin.json`, `manifest.json`
- Installable skill: `skills/trustboost-pii-sanitizer/SKILL.md`

#### 2. Hosted Sanitization Boundary

The core processing boundary is external: clients submit text to the TrustBoost API before forwarding it to downstream LLMs. The API returns redacted content, entity metadata, a safety score, risk classification, and quota information.

The package does not contain API handlers, PII detectors, persistence, or Solana integration code. Those belong to the separately linked `trustboost-api` service. This repository’s integration contract is documented in `README.md` and conveyed through the skill definition at `skills/trustboost-pii-sanitizer/SKILL.md`.

#### 3. Agent Skill Integration

The main operational artifact is the TrustBoost skill:
- `skills/trustboost-pii-sanitizer/SKILL.md`
- `SKILL.md`

It is intended for AI coding/agent environments installed via ClawHub. The skill instructs an agent to treat sanitization as a pre-LLM inspection stage: identify potentially sensitive outbound text, call the hosted sanitizer, then use only the sanitized result in external model/API requests.

#### 4. Protocol and Discovery Surface

Multiple metadata files expose the same hosted capability to different agent ecosystems:
- `ai-plugin.json`
- `plugin.json`
- `manifest.json`
- `molt.json`
- `glama.json`

These descriptors are the repository’s machine-readable integration layer. The externally hosted API supports REST sanitization plus MCP JSON-RPC, Google A2A messaging, ANP discovery, and x402 payment discovery; clients discover or invoke those services through the published metadata rather than local runtime code.

#### 5. Request, Payment, and Proof Flow

The intended control flow is:

1. Agent receives text that may contain PII or credentials.
2. Agent calls hosted preview or paid sanitization endpoints.
3. TrustBoost redacts detected entities and reports policy/risk information.
4. Agent sends sanitized text to its target LLM or external service.
5. Paid requests are authorized through Solana USDC transaction data and generate a verifiable on-chain sanitization proof.

Key external boundaries are the hosted TrustBoost API, Solana mainnet, and Helius for proof anchoring, as described in `README.md`.

#### 6. Presentation and Package Metadata

`index.html` is the static public landing surface, likely deployable without an application server. `health.json` provides a lightweight package/service-status-oriented artifact. Marketplace and package identity are represented by:
- `manifest.json`
- `plugin.json`
- `ai-plugin.json`

There is no evidence in the tree of a backend runtime, database schema, frontend build system, or infrastructure-as-code. `benchmark.py` is a standalone evaluation artifact, not an apparent production execution path.

#### 7. Policy and Privacy Positioning

The package defines a privacy-oriented agent boundary: raw input should not be retained or propagated after sanitization, while sanitized output and paid-proof metadata support auditing. Supporting policy material is located in:
- `PRIVACY.md`
- `AGENTS.md`
- `Digital Consciousness Manifesto`

For implementation planning, treat the hosted API and its endpoint contract as the system of record; this repository is the client-distribution, discovery, and instruction layer around it.

Main entry points: [`skills/trustboost-pii-sanitizer/SKILL.md`](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/skills/trustboost-pii-sanitizer/SKILL.md) (TrustBoost skill), [`README.md`](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/README.md) (Integration contract), [`index.html`](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/index.html) (Public landing page), [`health.json`](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/health.json) (Status artifact)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_package["Distribution Package"]
  node_landing["Public landing page<br/>static site<br/>[index.html]"]
  node_readme["Integration contract<br/>documentation<br/>[README.md]"]
  node_health["Status artifact<br/>status metadata<br/>[health.json]"]
  node_privacy["Privacy policy<br/>policy document<br/>[PRIVACY.md]"]
end

subgraph group_agent["Agent Integration"]
  node_agent_guidance["Agent guidance<br/>policy document<br/>[AGENTS.md]"]
  node_skill["TrustBoost skill<br/>ClawHub skill<br/>[SKILL.md]"]
  node_root_skill["Root skill instructions<br/>skill document<br/>[SKILL.md]"]
  node_ai_plugin["AI plugin descriptor<br/>agent metadata<br/>[ai-plugin.json]"]
  node_plugin["Plugin descriptor<br/>agent metadata<br/>[plugin.json]"]
  node_manifest["Package manifest<br/>marketplace metadata<br/>[manifest.json]"]
  node_discovery["Protocol discovery metadata<br/>agent metadata<br/>[molt.json]"]
  node_agent_client["Agent client<br/>consumer runtime"]
end

subgraph group_external["Hosted Boundaries"]
  node_hosted_api{{"TrustBoost API<br/>hosted sanitizer"}}
  node_sanitized_result["Sanitized result<br/>redacted content"]
  node_target_service{{"Target LLM or API<br/>downstream service"}}
  node_solana{{"Solana mainnet<br/>payment network"}}
  node_helius{{"Helius<br/>proof anchoring provider"}}
  node_proof["Sanitization proof<br/>on-chain proof"]
end

node_landing -->|"explains integration"| node_readme
node_readme -->|"documents contract"| node_hosted_api
node_privacy -.->|"informs privacy boundary"| node_skill
node_agent_guidance -.->|"guides agent behavior"| node_skill
node_root_skill -.->|"reinforces workflow"| node_skill
node_ai_plugin -->|"advertises capability"| node_hosted_api
node_plugin -->|"advertises capability"| node_hosted_api
node_manifest -->|"packages installation"| node_skill
node_discovery -->|"discovers protocols"| node_hosted_api
node_health -.->|"reports package status"| node_hosted_api
node_skill -->|"installed by"| node_agent_client
node_agent_client -->|"submits raw text"| node_hosted_api
node_hosted_api -->|"returns redaction and risk"| node_sanitized_result
node_sanitized_result -->|"provides safe content"| node_agent_client
node_agent_client -->|"forwards sanitized text"| node_target_service
node_agent_client -->|"authorizes paid request"| node_solana
node_hosted_api -->|"anchors proof"| node_helius
node_helius -->|"records verification data"| node_proof
node_solana -->|"backs paid proof"| node_proof

click node_landing "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/index.html"
click node_readme "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/README.md"
click node_health "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/health.json"
click node_privacy "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/PRIVACY.md"
click node_agent_guidance "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/AGENTS.md"
click node_skill "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/skills/trustboost-pii-sanitizer/SKILL.md"
click node_root_skill "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/SKILL.md"
click node_ai_plugin "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/ai-plugin.json"
click node_plugin "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/plugin.json"
click node_manifest "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/manifest.json"
click node_discovery "https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/molt.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_landing,node_readme,node_health,node_privacy toneBlue
class node_agent_guidance,node_skill,node_root_skill,node_ai_plugin,node_plugin,node_manifest,node_discovery,node_agent_client toneAmber
class node_hosted_api,node_sanitized_result,node_target_service,node_solana,node_helius,node_proof toneMint
```

## Components

### Distribution Package

Static artifacts that publish the TrustBoost integration.

- [Public landing page](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/index.html): static site · `index.html`
- [Integration contract](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/README.md): documentation · Documents the hosted API contract and proof flow. · `README.md`
- [Status artifact](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/health.json): status metadata · `health.json`
- [Privacy policy](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/PRIVACY.md): policy document · `PRIVACY.md`

### Agent Integration

Instructions and discovery metadata for agent clients.

- [Agent guidance](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/AGENTS.md): policy document · `AGENTS.md`
- [TrustBoost skill](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/skills/trustboost-pii-sanitizer/SKILL.md): ClawHub skill · Makes sanitization a mandatory pre-LLM stage. · `skills/trustboost-pii-sanitizer/SKILL.md`
- [Root skill instructions](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/SKILL.md): skill document · `SKILL.md`
- [AI plugin descriptor](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/ai-plugin.json): agent metadata · `ai-plugin.json`
- [Plugin descriptor](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/plugin.json): agent metadata · `plugin.json`
- [Package manifest](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/manifest.json): marketplace metadata · `manifest.json`
- [Protocol discovery metadata](https://github.com/teodorofodocrispin-cmyk/trustboost-pii-sanitizer/blob/main/molt.json): agent metadata · Advertises MCP, A2A, ANP, and x402 discovery. · `molt.json`
- **Agent client**: consumer runtime · Inspects outbound text before calling external models.

### Hosted Boundaries

Systems operated outside this repository.

- **TrustBoost API**: hosted sanitizer · External system of record for sanitization and policy results.
- **Sanitized result**: redacted content · Includes entities, safety score, risk classification, and quota data.
- **Target LLM or API**: downstream service · Receives only sanitized outbound text.
- **Solana mainnet**: payment network · Authorizes paid requests with USDC transaction data.
- **Helius**: proof anchoring provider
- **Sanitization proof**: on-chain proof · Verifiable metadata for paid sanitization.

## Connections

- Public landing page → Integration contract: explains integration
- Integration contract → TrustBoost API: documents contract
- Privacy policy → TrustBoost skill: informs privacy boundary
- Agent guidance → TrustBoost skill: guides agent behavior
- Root skill instructions → TrustBoost skill: reinforces workflow
- AI plugin descriptor → TrustBoost API: advertises capability
- Plugin descriptor → TrustBoost API: advertises capability
- Package manifest → TrustBoost skill: packages installation
- Protocol discovery metadata → TrustBoost API: discovers protocols
- Status artifact → TrustBoost API: reports package status
- TrustBoost skill → Agent client: installed by
- Agent client → TrustBoost API: submits raw text
- TrustBoost API → Sanitized result: returns redaction and risk
- Sanitized result → Agent client: provides safe content
- Agent client → Target LLM or API: forwards sanitized text
- Agent client → Solana mainnet: authorizes paid request
- TrustBoost API → Helius: anchors proof
- Helius → Sanitization proof: records verification data
- Solana mainnet → Sanitization proof: backs paid proof
