Skip to content
Open
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
3 changes: 2 additions & 1 deletion docs/apps-module-migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"tests/harness/test_harness_entry_verification.py",
"tests/harness/test_harness_generation_lineage.py",
"tests/apps/test_result_delivery.py",
"src/inferrsi/apps/legacy/records.py"
"src/inferrsi/apps/legacy/records.py",
"tools/optimization_records.py"
],
"status": "retired",
"first_removal_version": "0.3.4"
Expand Down
6 changes: 3 additions & 3 deletions docs/knowledge-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,20 +282,20 @@ Complete procedures, references and cases are packaged together. Browse by
system, engineering task, workflow or prior outcome. Backend is recorded independently. The 21 engine and research-router skills
use the same ownership layout under `systems/engines/<engine>/` and
`workflows/research/inference-engine-research/`, including their sub-skills and references.
The library contains 152 `SKILL.md` files, all in English. The registered
The library contains 153 `SKILL.md` files, all in English. The registered
[Lithos Metal candidate](../src/inferrsi/knowledge/data/skill_library/systems/engines/lithos-metal/SKILL.md)
adds three owner-local subskills for compiler/fusion, generation state and
serving/cache contracts; it adds no executable repository target.
The collection overview, import notes and source manifest belong to the research
workflow's references; Strata design-space analysis belongs to Strata. The library root holds the registry, configuration, compiled inputs, authored findings and skill directories.

The [runtime catalog](../src/inferrsi/knowledge/data/skill_library/README.md)
projects the 89 registered skills into the contribution catalog. Its records
projects the 90 registered skills into the contribution catalog. Its records
use `inferrsi.<backend>.skills.<name_with_underscores>` IDs, with `ascend` and
`cuda` for scopes that depend on those backends and `common` for the remaining skills.
Each `skill_documents.original` points to the full packaged procedure. The
`skills` CLI retains the original hyphenated skill IDs and defaults to this
89-ID registry; engine procedures remain available through library navigation
90-ID registry; engine procedures remain available through library navigation
and catalog document pointers.

The registered [PyTorch](../src/inferrsi/knowledge/data/skill_library/systems/frameworks/pytorch/pytorch/SKILL.md)
Expand Down
5 changes: 3 additions & 2 deletions docs/searchspace-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"catalog_path": "src/inferrsi/knowledge/data/skill_library/skill-index.json",
"skill_root": "src/inferrsi/knowledge/data/skill_library",
"matrix_sha256": "8e47da7aa4824d160710dee6ec63e91011f399def948b25a6bf74abe1bc45db9",
"catalog_sha256": "d243e2ae44c7badc8e68788153de35fe6ac31de618b7499fef6339eadf396871",
"metadata_sha256": "f4399276c8389f33ad81a2a25ccd0ff4392a37635ae9c53943ece4995c84d246"
"catalog_sha256": "2e8e852a4b8fd97cdb1c48f0f5cb6eea4dbc2d27492e9572b89bd83428238d89",
"metadata_sha256": "37dadb5c1b8be84f8525bc842a47c815c924fa07a7601191e02de447cf4979b6"
},
"skills": {
"ascend-aclgraph-capture-replay": {"path": "systems/platforms/ascend/ascend-aclgraph-capture-replay/SKILL.md", "state": "covered", "coordinates": [["Accelerator", "Configure"], ["Accelerator", "Diagnose"], ["Accelerator", "Optimize"], ["Accelerator", "Verify"]]},
Expand Down Expand Up @@ -82,6 +82,7 @@
"skill-evolution-playbook": {"path": "workflows/maintenance/skill-evolution-playbook/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "SKILL.md §§ When should one trajectory update a skill?, How large should a skill edit be?, and When should skills split or merge? govern skill-text evolution and held-out evaluation, not hardware-resource state or control."},
"splash": {"path": "systems/engines/splash/SKILL.md", "state": "supplementary", "coordinates": []},
"storage-io-measurement": {"path": "systems/platforms/host/storage-io-measurement/SKILL.md", "state": "covered", "coordinates": [["SSD", "Diagnose"], ["SSD", "Observe"], ["SSD", "Profile"], ["SSD", "Verify"]]},
"submit-optimization-record": {"path": "workflows/governance/submit-optimization-record/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "This workflow publishes optional run feedback and does not choose a search candidate."},
"task-accuracy": {"path": "tasks/task-accuracy/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."},
"task-day-0": {"path": "tasks/task-day-0/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."},
"task-debug": {"path": "tasks/task-debug/SKILL.md", "state": "not-applicable", "coordinates": [], "exclusion_reason": "The procedure selects supporting evidence and tests within the caller's declared search space."},
Expand Down
21 changes: 11 additions & 10 deletions docs/skill-coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Generated from the registry, SKILL.md frontmatter and the two maintained
matrices. **Do not edit by hand**; regenerate after any registry, skill,
matrix or frozen-plan change.

- Input digest: `sha256:b1f3b477729a45ae923a5365d905c2715c5aac9d08a09d2dde92017c7aea2a09`
- Input digest: `sha256:cec24f374af41c08dfcbc6ab9928a4785eb511e61fb58f98b4a1dead2983880a`
- Regenerate: `python tools/build_skill_coverage.py`
- Verify without writing: `python tools/build_skill_coverage.py --check`

Expand Down Expand Up @@ -33,17 +33,17 @@ matrix: every field is copied from an owner that already maintains it.

| Measure | Value |
|---|---|
| Registered skill ids | 89 |
| By category | casebooks 2, playbooks 18, systems 53, tasks 8, workflows 8 |
| By backend | ascend 16, common 68, cuda 5 |
| Registered skill ids | 90 |
| By category | casebooks 2, playbooks 18, systems 53, tasks 8, workflows 9 |
| By backend | ascend 16, common 69, cuda 5 |
| Recorded on a numbered SearchSpace resource layer | 52 |
| Recorded only in a supplementary guidance table (†) | 21 |
| Resource layers explicitly not applicable | 15 |
| Resource layers explicitly not applicable | 16 |
| Conflicting resource-layer declarations | 0 |
| Recorded on two or more resource layers | 25 |
| Recorded in the Reference Matrix | 73 |
| Selected by a frozen evaluation plan | 2 |
| `SKILL.md` documents in the library | 152 |
| `SKILL.md` documents in the library | 153 |
| Unregistered documents (excluded from every count above) | 63 |

A complete inventory is not a coverage claim. Every registered row below
Expand Down Expand Up @@ -151,7 +151,7 @@ optimization is fully covered or that any procedure has measured benefit.
| [task-performance](../src/inferrsi/knowledge/data/skill_library/tasks/task-performance/SKILL.md) | common | Use when a correct inference baseline misses a latency, throughput, memory or cost target. Compare compatible changes ... | Optimization of a specified metric under fixed workload, quality and resource constraints. | input_contract, produced_artifact, refusal_point | N/A: The procedure selects supporting evidence and tests within the caller's declared search space. | — | candidate · not_run · 0 readset(s) | no-Reference-Matrix-row, no-eval |
| [task-version-alignment](../src/inferrsi/knowledge/data/skill_library/tasks/task-version-alignment/SKILL.md) | common | Use for upgrades spanning inference engines, plugins, drivers or operator libraries. Isolate the incompatible boundary ... | Compatibility of explicit working and target version combinations. | input_contract, produced_artifact, refusal_point | N/A: The procedure selects supporting evidence and tests within the caller's declared search space. | — | candidate · not_run · 0 readset(s) | no-Reference-Matrix-row, no-eval |

## Registered: Cross-stage workflows (8)
## Registered: Cross-stage workflows (9)

| Skill | Backend | Declared task | Applicability | Conditions | SearchSpace layer / stage | Reference Matrix | State | Gaps |
|---|---|---|---|---|---|---|---|---|
Expand All @@ -163,6 +163,7 @@ optimization is fully covered or that any procedure has measured benefit.
| [repository-evolution-analysis](../src/inferrsi/knowledge/data/skill_library/workflows/research/repository-evolution-analysis/SKILL.md) | common | Analyze a repository's commit history to build a capability-evolution model: what the system can do, how it got there ... | any software repository with a recoverable git history | — | 5 OS · Diagnose / Configure / Verify | 2 · Methodology and corpus references (LearningToCommit/LearningToCommit @ 7e5a1d7)<br>2 · Methodology and corpus references (yetone/magpie @ 77800032) | candidate · not_run · 0 readset(s) | no-eval |
| [rsi-evidence](../src/inferrsi/knowledge/data/skill_library/workflows/governance/rsi-evidence/SKILL.md) | common | Guide agents to establish acceptance criteria, freeze and cite RSI evidence using plan/results/patch/validator paths ... | Preparing acceptance criteria, documenting or reviewing an optimization campaign whose ... | failure_modes, input_contract, produced_artifact, refusal_point<br>6 advice | 1 Accelerator · Verify | — | candidate · not_run · 1 readset(s) | no-Reference-Matrix-row, no-eval |
| [skill-evolution-playbook](../src/inferrsi/knowledge/data/skill_library/workflows/maintenance/skill-evolution-playbook/SKILL.md) | common | Practical design choices for evolving agent skills from execution traces: when one trajectory should update a skill ... | Design choices for evolving agent skills from execution traces, drawn from Trace2Skill ... | failure_modes, input_contract, produced_artifact, refusal_point<br>4 advice | N/A: SKILL.md §§ When should one trajectory update a skill?, How large should a skill edit be?, and When should skills split or merge? govern skill-text evolution and held-out evaluation, not hardware-resource state or control. | 2 · Methodology and corpus references (Qwen-Applications/Trace2Skill @ 3d0b52a)<br>2 · Methodology and corpus references (microsoft/SkillOpt @ 343db22) | candidate · not_run · 0 readset(s) | no-eval |
| [submit-optimization-record](../src/inferrsi/knowledge/data/skill_library/workflows/governance/submit-optimization-record/SKILL.md) | common | Prepare and submit one user-selected InferRSI run as a redacted evidence record after a completed, failed, or ... | User-authorized submission of one retained native campaign run to InferRSI | input_contract, produced_artifact | N/A: This workflow publishes optional run feedback and does not choose a search candidate. | — | candidate · not_run · 0 readset(s) | no-Reference-Matrix-row, no-eval |

## Documents outside the registry

Expand Down Expand Up @@ -239,7 +240,7 @@ an entrypoint routes to procedures below it rather than adding one.

## Integrity checks

- Registered ids resolve to an existing `SKILL.md`: 89 of 89.
- Registered ids resolve to an existing `SKILL.md`: 90 of 90.
- Duplicate ids or paths: none; `skill_catalog` rejects them before this view is built.
- Skill links in the two matrices that do not resolve: 0.

Expand All @@ -249,9 +250,9 @@ an entrypoint routes to procedures below it rather than adding one.
|---|---|
| `no-SearchSpace-layer` | 1: husky |
| `conflicting-SearchSpace-layer` | 0: — |
| `no-Reference-Matrix-row` | 16: ascend-video-diffusion-optimization, audit-fixed-workload-claim, cite-check-downstream-pr, claim-contract, competitor-scan, draft-acceptance-issue, inference-task-router, rsi-evidence, task-accuracy, task-day-0, task-debug, task-derived-engine, task-independent-engine, task-performance, task-version-alignment, video-diffusion-optimization |
| `no-Reference-Matrix-row` | 17: ascend-video-diffusion-optimization, audit-fixed-workload-claim, cite-check-downstream-pr, claim-contract, competitor-scan, draft-acceptance-issue, inference-task-router, rsi-evidence, submit-optimization-record, task-accuracy, task-day-0, task-debug, task-derived-engine, task-independent-engine, task-performance, task-version-alignment, video-diffusion-optimization |
| `no-applicability` | 0: — |
| `no-eval` | 87: as listed in the Gaps column above |
| `no-eval` | 88: as listed in the Gaps column above |

These are inventory gaps, not efficacy results. Missing layer mappings stay
unknown unless the owner records a reasoned N/A. N/A is not coverage;
Expand Down
4 changes: 4 additions & 0 deletions evidence/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Evidence tree

[Optimization run submissions](records/README.md) document individual
user-selected runs under `records/`. Campaign acceptance evidence uses the
structure below.

First-class paths for every campaign (see [contribution guide](../docs/contributing.md#evidence-and-claims)).

| Segment | Purpose |
Expand Down
47 changes: 47 additions & 0 deletions evidence/records/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Optimization run records

Load the workflow with `inferrsi skills show submit-optimization-record` to prepare
an optional public feedback record after a run. Select one native campaign's v1 result-delivery
bundle and a prompt you may share. The skill creates a redacted derivative and
shows the exact staged files and PR text for user review before publication.
The campaign directory remains the runtime trace source and may hold private
material. Keep it and the original prompt outside the public commit.

## Layout

```text
evidence/records/<YYYYMMDDTHHMMSSZ>-<12-hex>/
record.json
model-config.json
prompt.md
trace/
01-execution.json
02-result.json
```

- `record.json` is the v1 manifest. It identifies the run's user-reported
agent and InferRSI versions, source export schema, original execution and
assessment status, gaps, and the relative paths and SHA-256 digests of
included files. A public project acceptance issue or approved archive
reference can accompany the snapshot.
- `model-config.json` separates allowlisted agent sampling/reasoning settings
from optimized-model identity and runtime settings. Unavailable values are
null with a corresponding omission.
- `prompt.md` includes only redacted user prompt text and selected user
refinements. Its manifest entry records `withheld` or `unavailable` when
omitted.
- The trace JSON files retain the source execution state, attempt history,
result, existing verdict and its verification state. Metrics require a
matching public acceptance issue and permission under the repository's
[claim rules](../../docs/contributing.md#evidence-and-claims).

The UTC prefix uses the source's timezone-qualified run start truncated to a
second. The fallback is first preparation time. The manifest records the
timestamp basis. Keep the generated ID and prepared directory for retries.

Validate the inventory with `python tools/validate_evidence.py` from a checkout.
This checks layout and file digests offline. User and PR review remain essential
for [privacy](../../docs/privacy-security.md). Follow the
[archive guide](../../docs/guides/evidence-archiving.md) for raw and oversized
records. The usual R6 reporting thresholds apply. The skill can reference a
previously approved versioned public archive or record an availability gap.
8 changes: 8 additions & 0 deletions src/inferrsi/apps/storage/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,14 @@ def _write_file(path: Path, data: bytes) -> None:
os.fsync(handle.fileno())


def publish_directory(staging: Path, destination: Path) -> None:
"""Atomically move a staged directory into an unused destination on the same filesystem.

The caller owns staging and any durability syncs. An existing destination is preserved.
"""
_publish_directory(staging, destination)


def _publish_directory(staging: Path, destination: Path) -> None:
"""Atomically publish a complete directory without replacing any entry."""
if os.name == "nt":
Expand Down
6 changes: 3 additions & 3 deletions src/inferrsi/knowledge/data/skill_library/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ by the requested outcome, runs `inferrsi skills enter <task-id>` and reads
the returned procedure before the first supporting evidence search. Use the actual model, device, engine version, script, gates
and diagnosis to decide which supporting skill to load next. The
[compatibility router](tasks/inference-task-router/SKILL.md) retains older route
resource paths. The library has 89 registered bundles and 152 English
resource paths. The library has 90 registered bundles and 153 English
`SKILL.md` documents, including nested and unregistered entries.

| Question | Directory | Choose a second-level category |
Expand All @@ -27,7 +27,7 @@ existing resource directory.

## Read registered skills

[`skill-index.json`](skill-index.json) maps 89 stable skill IDs to their canonical
[`skill-index.json`](skill-index.json) maps 90 stable skill IDs to their canonical
paths and backend scopes. Install the optional `skills` extra for these commands:

```bash
Expand Down Expand Up @@ -162,7 +162,7 @@ scheduling/placement proposals remain separate from both implementation pins.

Five repository entry skills, 15 focused sub-skills and one research router
provide source-grounded procedures. These 21 documents are available through
the links and catalog records below, separately from the 89-ID registry.
the links and catalog records below, separately from the 90-ID registry.
The registered ComfyUI and stable-diffusion.cpp audits are listed alongside
these imports and use generated abstracts rather than runtime repository packs.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"schema_version": 1,
"repository": "https://github.com/InferMatrixLab/InferRSI",
"source_revision": "bf14fec0bd909efcfeb2bc02d69fe227d0c51ce6",
"source_revision": "6c2e4279e81938a64d0e3f3121370e63422c4251",
"registry": {
"path": "src/inferrsi/knowledge/data/skill_library/skill-index.json",
"sha256": "d243e2ae44c7badc8e68788153de35fe6ac31de618b7499fef6339eadf396871"
"sha256": "2e8e852a4b8fd97cdb1c48f0f5cb6eea4dbc2d27492e9572b89bd83428238d89"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,15 @@
"SKILL.md": "7faf89f304d6fdad2d27978f9c4bb828400e57e7fbb294dbd43e045bcf94bcc3"
}
},
"submit-optimization-record": {
"header": {
"name": "submit-optimization-record",
"description": "Prepare and submit one user-selected InferRSI run as a redacted evidence record after a completed, failed, or interrupted optimization."
},
"files": {
"SKILL.md": "9f98467fb6194b2815882de8b65f8702b1b022fb887e1f3a4a4c3ad3f10688b9"
}
},
"task-accuracy": {
"header": {
"name": "task-accuracy",
Expand Down
4 changes: 4 additions & 0 deletions src/inferrsi/knowledge/data/skill_library/skill-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@
"path": "systems/platforms/host/storage-io-measurement",
"backend": "common"
},
"submit-optimization-record": {
"path": "workflows/governance/submit-optimization-record",
"backend": "common"
},
"task-accuracy": {
"path": "tasks/task-accuracy",
"backend": "common"
Expand Down
Loading
Loading