# CarrySkills v3.9.1 — Technical Documentation

## Active Workspace
v3.9.1 adds a browser-local workspace around the existing portable Skill library. The workspace stores preferences and selected Skill identifiers in `localStorage`; task text is not persisted unless the user explicitly enables **Remember task text**.

No workspace preference is sent to a model provider. Prompt-pack generation remains local WordPress processing and Bring Your Own Account (BYOA).

## Prompt-pack safety preflight
Before a prompt pack is created, CarrySkills now reads each selected local `SKILL.md` and applies:
1. existing high-risk instruction/prompt-injection checks;
2. hidden Unicode and local metadata-network checks;
3. a 1 MB per-Skill size limit;
4. suspected live credential/private-key checks;
5. capability scoring for destructive, privileged, shell, credential, filesystem, and network behavior;
6. profile policy enforcement.

Safety levels are `lower-risk`, `caution`, `restricted`, and `blocked`.

Hard-blocked Skills are rejected for every safety profile. Strict additionally rejects `restricted` Skills. Balanced and Explorer can include restricted but non-blocked Skills and inject stronger guardrails into the generated prompt.

## Workspace preference payload
`fourbr_build_no_token_prompt` accepts the following additional scalar settings:
- `safety_profile`: strict | balanced | explorer
- `read_only_first`: boolean
- `confirm_changes`: boolean
- `redact_secrets`: boolean
- `require_evidence`: boolean
- `detail`: concise | standard | thorough

The server re-sanitizes all values; browser settings are not trusted as authorization.

## Active-use actions
The browser can now:
- save/restore selected Skill IDs and workspace preferences;
- download a Markdown Active Stack summary;
- download the selected Skills as a portable ZIP using the existing guarded bundle endpoint;
- open the chosen user-owned AI service in a separate tab;
- show a safety-preflight summary with the generated prompt.

## Release/update architecture
The v3.8.x direct-push and rollback controls remain unchanged. v3.9.1 does not introduce model API execution.


## WPWriter Release Mailbox
CarrySkills maintains a private page at the internal slug `4br-skills-release-mailbox`. WPWriter can replace that page body with a JSON release envelope containing version, filename, SHA-256 and Base64 ZIP bytes. Saving the private page triggers server-side ZIP decoding, checksum verification, package identity/integrity validation, local release publication and—when automatic install is enabled—installation. The mailbox acknowledgement replaces the payload after processing so the binary is not retained in page content.

## Full-State Recovery
Before updates and rollbacks, CarrySkills keeps a versioned plugin-directory ZIP and a paired `.state.php` snapshot. The snapshot contains only approved CarrySkills options; secret-looking keys such as passwords, tokens, API keys, private keys, OAuth/session values and cookies are excluded. Rollback first makes a rescue backup, restores the selected plugin ZIP, validates the restored target version, restores safe state, and leaves secrets untouched.
