Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 37 additions & 18 deletions docs/en/docs/reference/configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Configuration
description: PowerContext paths, Server, Client, inference, and Codex environment variables.
description: PowerContext paths, Server, Client, inference, and Agent integration environment variables.
---

# Configuration
Expand Down Expand Up @@ -52,7 +52,7 @@ Server settings use the `POWERCONTEXT_SERVER_` prefix.
| `POWERCONTEXT_SERVER_INFERENCE_GENERATION_TIMEOUT_SECONDS` | `30` | Generation timeout |
| `POWERCONTEXT_SERVER_INFERENCE_EMBEDDING_BATCH_SIZE` | `10` | Maximum texts sent in one embedding request |
| `POWERCONTEXT_SERVER_RUNTIME_EXPERIENCE_SCHEDULE_SECONDS` | unset | Experience incubation interval; unset disables that job |
| `POWERCONTEXT_SERVER_EXTERNAL_SKILLS` | unset | JSON object containing the host identity and explicit Codex Skill roots |
| `POWERCONTEXT_SERVER_EXTERNAL_SKILLS` | unset | JSON object containing the host identity and explicit Agent Skill targets |

Static bearer authentication is disabled by default. When enabled, API and MCP requests must include
`Authorization: Bearer <token>`; the liveness and readiness endpoints remain public. Plain HTTP should remain on a
Expand Down Expand Up @@ -105,35 +105,54 @@ The same configured generation model gates explicit Experience generation, manag
and external Skill import or fork. Without it, these operations return a capability error before persisting a
Candidate. Candidate Review, exact reads, and external Skill scan/list/resolve continue to work.

Experience incubation is a separate APScheduler job with its own persisted Source cursor. It requires both
`POWERCONTEXT_SERVER_RUNTIME_EXPERIENCE_SCHEDULE_SECONDS` and
`POWERCONTEXT_SERVER_INFERENCE_GENERATION_MODEL`. Each activation inspects at most 32 Sources and exposes only Content
Sources whose metadata contains `"kind": "task-outcome"`. The Memory and Experience jobs share the scheduler sidecar
under `POWERCONTEXT_HOME`, but keep independent job identities and business cursors. Unsetting one interval removes
only that job. See [Create and review an Experience](../how-to/create-and-review-experience.md) for setup and
verification steps.
Experience incubation is a separate APScheduler job with its own persisted Source cursor. Enable it with:

### External Codex Skills
```bash
export POWERCONTEXT_SERVER_RUNTIME_EXPERIENCE_SCHEDULE_SECONDS=30
export POWERCONTEXT_SERVER_INFERENCE_GENERATION_MODEL=provider:model-name
powercontext server run
```

Configure host-local roots as one JSON value:
Each activation inspects a fixed window of at most 32 Sources and exposes only Content Sources whose metadata contains
`"kind": "task-outcome"` to the model. It creates pending Experience Candidates in the Review Inbox; it does not
approve them, place them in PreparedContext, create a managed Skill, export it to an Agent target, or execute anything.
The Memory and Experience jobs share the APScheduler sidecar under `POWERCONTEXT_HOME`, but keep independent job
identities and business cursors. Unsetting one interval removes only that job.
See [Create and review an Experience](../how-to/create-and-review-experience.md) for setup and verification steps.

### Agent Skill targets

Configure Codex and Claude Code host-local targets as one JSON value:

```bash
export POWERCONTEXT_SERVER_EXTERNAL_SKILLS='{
"host_id": "workstation-1",
"codex_roots": [
"targets": [
{
"target_id": "codex-project",
"agent_kind": "codex",
"installation_scope": "project",
"path": "/srv/project/.agents/skills",
"allow_managed_publish": true
},
{
"root_id": "repository",
"target_id": "claude-project",
"agent_kind": "claude_code",
"installation_scope": "project",
"path": "/srv/project/.agents/skills"
"path": "/srv/project/.claude/skills",
"allow_managed_publish": true
}
]
}'
```

Root IDs must be unique. Supported installation scopes are `user`, `project`, and `plugin`. PowerContext scans only
the immediate Skill package directories under these explicit roots; it does not infer a home directory, install
packages, or grant execution authority. The `host_id`, locator, and registration are local-environment state, not a
cross-host or cross-Agent contract.
Target IDs must be unique. `agent_kind` supports `codex` and `claude_code`; installation scopes are `user`, `project`,
and `plugin`. PowerContext scans only the immediate Skill package directories under these explicit targets; it does not
infer a home directory, install packages, or grant execution authority. `allow_managed_publish` defaults to `false`;
when true, the authenticated Skills Library or Review page may explicitly create or safely update an approved managed
Skill in that target. The page still cannot submit an arbitrary path or overwrite a foreign or modified package. The
`host_id`, locator, and registration are local-environment state, not a cross-host contract. Existing `codex_roots`
configuration remains accepted as a Codex-only compatibility form; new configuration should use `targets`.

The Server always creates non-recording OpenTelemetry request context so `X-PowerContext-Request-ID` can be derived from the
inbound span. To enable recording and export for a CLI-managed Server, install
Expand Down
45 changes: 33 additions & 12 deletions docs/en/docs/reference/interfaces.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Interfaces
description: Choose between the Codex plugin, DeepSeek Harness plugin, Pi package, CLI, Python SDKs, HTTP, and MCP.
description: Choose between the Codex and Claude Code plugins, DeepSeek Harness plugin, Pi package, CLI, Python SDKs, HTTP, and MCP.
---

# Interfaces
Expand Down Expand Up @@ -202,21 +202,42 @@ For the relationship between evidence, Candidate versions, approved Revisions, r

## Scheduled Experience incubation

The scheduler accepts only Content Sources with metadata `"kind": "task-outcome"`, uses an independent persisted
cursor, and creates pending Experience Candidates. Candidate writes and cursor advancement commit together. The job
does not approve content or include pending content in `PreparedContext`. Setup and verification steps are in
An integration can capture a completed task as a Content Source with metadata `"kind": "task-outcome"`. When the
Experience schedule is configured, APScheduler scans bounded Source windows and asks the configured schema-bound
pipeline for reusable situation, action, outcome, and lesson proposals. Each proposal cites exact Sources and enters
the Review Inbox as a pending Experience Candidate.

Experience incubation has its own persisted Source cursor, independent from Memory extraction. Candidate writes and
cursor advancement commit together; a generation or write failure leaves the window available for retry. Ordinary
prompt Sources are not Task Outcomes and are ignored by this job.

Scheduling stops at the review boundary. It never approves an Experience, includes pending content in
PreparedContext, derives a managed Skill, exports a Skill for an Agent target, or executes instructions. Skill authoring and
export remain explicit steps after the supporting Experience is approved.
Setup and verification steps are in
[Create and review an Experience](../how-to/create-and-review-experience.md).

## Managed Skill export to Codex
## Managed Skill export to Agent targets

A configured generator can produce complete managed Skill content through `generate_skill`; a human or integration
can submit already-complete typed content through `propose_skill`. The proposal contains a name, discovery
description, instructions, validation checks, and exact Source or Artifact lineage. It remains a Candidate until a
reviewer approves the exact Candidate version.

Approval creates an immutable Skill Revision. It does not install the Skill or grant execution authority. To make one
approved Revision available to Codex or Claude Code, export it explicitly into a configured repository, user, or plugin
Skill target. The projection writes `SKILL.md` and `powercontext.json`; the manifest records the Agent kind, exact
Artifact reference and rendered-content hash. It refuses to replace an existing destination, so updates require an
intentional new export rather than a silent overwrite.

Approval creates an immutable Skill Revision but does not install it or grant execution authority. The Codex exporter
writes `SKILL.md` and `powercontext.json` into a new destination and refuses to replace an existing directory. The
manifest binds the projection to one exact Artifact Revision and rendered-content hash. See
[Create and export a managed Skill](../how-to/create-and-export-skill.md) for the procedure.
Codex can discover a repository-local export under `.agents/skills/<name>/SKILL.md`. The Artifact Revision remains
the content authority; Claude Code uses `.claude/skills/<name>/SKILL.md` for the equivalent project target. Both
directories are host-local projections that can be rebuilt from the same exact Revision.
See [Create and export a managed Skill](../how-to/create-and-export-skill.md) for the procedure.

## External Agent-native Skills

External Skills remain authoritative in their original local packages. With explicitly configured Codex roots, the
External Skills remain authoritative in their original local packages. With explicitly configured Agent targets, the
Server can scan a scope-local, rebuildable Registry and report name, description, provider, Agent kind, host,
installation scope, locator, and whole-package fingerprint. Exact resolve succeeds only when the same package remains
readable on the configured host and its fingerprint still matches. It never installs a package or falls back to a
Expand All @@ -234,8 +255,8 @@ managed Artifact.
| --- | --- | --- | --- | --- |
| External Agent-native Skill | Original package | No for scan/list/resolve; yes for import/fork | No for discovery; yes after import/fork | Host-local Registry and exact resolve |
| Experience | Exact approved Artifact Revision | Yes for generate/evolve; no for typed `propose` | Yes | Exact read and approved-head FTS recall in PreparedContext |
| Managed Skill | Exact approved Artifact Revision | Yes for generate/evolve/import/fork; no for typed `propose` | Yes | Exact read and explicit Codex projection |
| Codex projection | Its source managed Skill Revision | No | No additional review | Rebuildable host-local copy |
| Managed Skill | Exact approved Artifact Revision | Yes for generate/evolve/import/fork; no for typed `propose` | Yes | Exact read and explicit Agent projection |
| Agent projection | Its source managed Skill Revision | No | No additional review | Rebuildable Codex or Claude Code host-local copy |

## Core SDK

Expand Down
Loading
Loading