wisk 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. wisk/__init__.py +12 -0
  2. wisk/_assets/canonical/run-specs/experience.md +26 -0
  3. wisk/_assets/canonical/run-specs/skill.md +31 -0
  4. wisk/_assets/canonical/run-specs/wiki.md +27 -0
  5. wisk/_assets/canonical/session-types/experience.md +15 -0
  6. wisk/_assets/canonical/session-types/skill.md +16 -0
  7. wisk/_assets/canonical/session-types/wiki.md +16 -0
  8. wisk/_assets/specs/accesspolicy.md +25 -0
  9. wisk/_assets/specs/accesspolicy.schema.sql +9 -0
  10. wisk/_assets/specs/agentskill.md +33 -0
  11. wisk/_assets/specs/agentskill.schema.sql +8 -0
  12. wisk/_assets/specs/cadencepolicy.md +31 -0
  13. wisk/_assets/specs/cadencepolicy.schema.sql +15 -0
  14. wisk/_assets/specs/changelog.md +7 -0
  15. wisk/_assets/specs/changelog.schema.sql +4 -0
  16. wisk/_assets/specs/contextpolicy.md +24 -0
  17. wisk/_assets/specs/contextpolicy.schema.sql +8 -0
  18. wisk/_assets/specs/experience.md +35 -0
  19. wisk/_assets/specs/experience.schema.sql +12 -0
  20. wisk/_assets/specs/handoff.md +41 -0
  21. wisk/_assets/specs/handoff.schema.sql +15 -0
  22. wisk/_assets/specs/looprun.md +71 -0
  23. wisk/_assets/specs/looprun.schema.sql +21 -0
  24. wisk/_assets/specs/outputpolicy.md +32 -0
  25. wisk/_assets/specs/outputpolicy.schema.sql +17 -0
  26. wisk/_assets/specs/runcheck.md +28 -0
  27. wisk/_assets/specs/runcheck.schema.sql +10 -0
  28. wisk/_assets/specs/rundecision.md +28 -0
  29. wisk/_assets/specs/rundecision.schema.sql +10 -0
  30. wisk/_assets/specs/runevidence.md +28 -0
  31. wisk/_assets/specs/runevidence.schema.sql +10 -0
  32. wisk/_assets/specs/rungoal.md +31 -0
  33. wisk/_assets/specs/rungoal.schema.sql +9 -0
  34. wisk/_assets/specs/runoutcome.md +32 -0
  35. wisk/_assets/specs/runoutcome.schema.sql +12 -0
  36. wisk/_assets/specs/runreading.md +23 -0
  37. wisk/_assets/specs/runreading.schema.sql +8 -0
  38. wisk/_assets/specs/runspec.md +39 -0
  39. wisk/_assets/specs/runspec.schema.sql +15 -0
  40. wisk/_assets/specs/sessiontype.md +32 -0
  41. wisk/_assets/specs/sessiontype.schema.sql +12 -0
  42. wisk/_assets/specs/skillevaluation.md +34 -0
  43. wisk/_assets/specs/skillproposal.md +33 -0
  44. wisk/_assets/specs/wikientry.md +28 -0
  45. wisk/_assets/specs/wikientry.schema.sql +7 -0
  46. wisk/bootstrap.py +302 -0
  47. wisk/cadence.py +263 -0
  48. wisk/cli.py +430 -0
  49. wisk/handoff.py +290 -0
  50. wisk/live_run.py +356 -0
  51. wisk/mcp.py +416 -0
  52. wisk/models.py +28 -0
  53. wisk/pinning.py +257 -0
  54. wisk/policy.py +209 -0
  55. wisk/profiles/standard/policies/cadence/standard-experience.md +12 -0
  56. wisk/profiles/standard/policies/cadence/standard-skill.md +14 -0
  57. wisk/profiles/standard/policies/cadence/standard-wiki.md +14 -0
  58. wisk/profiles/standard/policies/context/standard-experience.md +18 -0
  59. wisk/profiles/standard/policies/context/standard-skill.md +17 -0
  60. wisk/profiles/standard/policies/context/standard-wiki.md +17 -0
  61. wisk/profiles/standard/session-types/standard-experience.md +17 -0
  62. wisk/profiles/standard/session-types/standard-skill.md +17 -0
  63. wisk/profiles/standard/session-types/standard-wiki.md +17 -0
  64. wisk/runtime.py +406 -0
  65. wisk/session.py +146 -0
  66. wisk-0.3.0.dist-info/METADATA +193 -0
  67. wisk-0.3.0.dist-info/RECORD +69 -0
  68. wisk-0.3.0.dist-info/WHEEL +4 -0
  69. wisk-0.3.0.dist-info/entry_points.txt +2 -0
wisk/__init__.py ADDED
@@ -0,0 +1,12 @@
1
+ """Wisk compatibility runtime built on OKF.
2
+
3
+ The public product/package name is ``wisk``. ``wisk`` remains importable
4
+ for compatibility with existing consumers during the rename transition.
5
+ """
6
+
7
+ from wisk.live_run import LiveRunWisk as Wisk
8
+
9
+ Wisk = Wisk
10
+
11
+ __version__ = "0.3.0"
12
+ __all__ = ["Wisk", "Wisk", "__version__"]
@@ -0,0 +1,26 @@
1
+ ---
2
+ type: RunSpec
3
+ id: run-specs/experience
4
+ title: Experience run
5
+ version: "1.0.0"
6
+ status: experimental
7
+ required_reading_kinds:
8
+ - active-handoffs
9
+ - active-skills
10
+ required_goal_kinds:
11
+ - task-advance
12
+ required_evidence_kinds:
13
+ - execution
14
+ required_check_kinds:
15
+ - verification
16
+ allowed_result_states:
17
+ - success
18
+ - partial
19
+ - blocked
20
+ - no-useful-change
21
+ completion_notes: "Do useful work when available, verify the observed result, and preserve truthful episodic evidence including the skill/version actually used."
22
+ ---
23
+
24
+ # Experience RunSpec
25
+
26
+ The canonical execution contract. `verification` asks whether the claimed observed effect is supported by the execution evidence. It does not decide whether a skill should be promoted globally.
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: RunSpec
3
+ id: run-specs/skill
4
+ title: Skill evolution run
5
+ version: "1.0.0"
6
+ status: experimental
7
+ required_reading_kinds:
8
+ - wiki
9
+ - experiences
10
+ - active-skills
11
+ - active-handoffs
12
+ required_goal_kinds:
13
+ - evolve-skill
14
+ required_evidence_kinds:
15
+ - intervention
16
+ required_check_kinds:
17
+ - lineage
18
+ allowed_result_states:
19
+ - proposed
20
+ - refined
21
+ - promoted
22
+ - rejected
23
+ - no-change
24
+ - partial
25
+ - blocked
26
+ completion_notes: "Make a justified procedural intervention or lifecycle decision, preserving lineage to the WikiEntry and Experience evidence that supports it."
27
+ ---
28
+
29
+ # Skill RunSpec
30
+
31
+ The canonical procedural-evolution contract. `lineage` asks whether the intervention or lifecycle action is supported by durable knowledge and traceable execution evidence. Creating a candidate does not satisfy promotion; promotion is a later possible result after evidence accumulates.
@@ -0,0 +1,27 @@
1
+ ---
2
+ type: RunSpec
3
+ id: run-specs/wiki
4
+ title: Wiki synthesis run
5
+ version: "1.0.0"
6
+ status: experimental
7
+ required_reading_kinds:
8
+ - experiences
9
+ - wiki
10
+ - active-handoffs
11
+ required_goal_kinds:
12
+ - consolidate-knowledge
13
+ required_evidence_kinds:
14
+ - consolidation
15
+ required_check_kinds:
16
+ - grounding
17
+ allowed_result_states:
18
+ - updated
19
+ - no-change
20
+ - partial
21
+ - blocked
22
+ completion_notes: "Synthesize durable knowledge from Experience evidence; when variants differ, preserve that distinction and comparative evidence rather than collapsing it."
23
+ ---
24
+
25
+ # Wiki RunSpec
26
+
27
+ The canonical synthesis contract. `grounding` asks whether the WikiEntry claims are traceable to Experience evidence and whether meaningful counterevidence or variant differences were preserved.
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: SessionType
3
+ id: session-types/experience
4
+ title: Experience
5
+ purpose: "Execute real work under available skills and record truthful episodic evidence of what happened."
6
+ run_spec: run-specs/experience
7
+ nudges:
8
+ - "Do useful external work; the session exists to generate experience, not to judge a skill globally."
9
+ - "Record which AgentSkill and version actually guided the execution so incumbent and experimental candidates remain distinguishable."
10
+ - "Treat one successful or failed execution as evidence, not as automatic promotion or rejection of a skill."
11
+ ---
12
+
13
+ # Experience session
14
+
15
+ Canonical execution role in the Wisk learning cycle. It deliberately carries no context, access, output, or cadence policy: consumer work sessions specialize this role and compose the policies appropriate to their environment.
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: SessionType
3
+ id: session-types/skill
4
+ title: Skill
5
+ purpose: "Change future procedural behavior using durable knowledge and supporting execution evidence."
6
+ run_spec: run-specs/skill
7
+ nudges:
8
+ - "Create or revise a candidate only when accumulated knowledge supports a procedural intervention."
9
+ - "Keep an incumbent available while an experimental candidate is gathering evidence; creating a candidate is not promotion."
10
+ - "Use later Wiki synthesis to decide whether to refine, continue experimenting, promote, reject, deprecate, or replace a candidate."
11
+ - "Preserve lineage from the decision back to WikiEntry and Experience evidence."
12
+ ---
13
+
14
+ # Skill session
15
+
16
+ Canonical procedural-evolution role in the Wisk learning cycle. It is policy-neutral; consumers compose access, context, output, and cadence in their own specializations.
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: SessionType
3
+ id: session-types/wiki
4
+ title: Wiki
5
+ purpose: "Synthesize episodic evidence into durable knowledge, including comparison across skill variants when relevant."
6
+ run_spec: run-specs/wiki
7
+ nudges:
8
+ - "Ground durable knowledge in Experience records rather than intuition or one-off narrative."
9
+ - "When incumbent and candidate skills were both exercised, keep their evidence distinguishable and synthesize the comparison explicitly."
10
+ - "Describe scope, strengths, regressions, trade-offs, failure modes, and counterevidence when the experiences support them."
11
+ - "Do not promote or reject a skill; produce knowledge that a later Skill session can act on."
12
+ ---
13
+
14
+ # Wiki session
15
+
16
+ Canonical synthesis role in the Wisk learning cycle. It is policy-neutral; consumers decide what context it can read, what it can write, and when it should run.
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: AccessPolicy
4
+ description: "Declares repositories, paths, connectors, and tools a SessionType should or may be restricted to using."
5
+ ---
6
+
7
+ # Concept: AccessPolicy
8
+
9
+ `AccessPolicy` is separate from context curation. It describes the desired access boundary and whether the host should treat it as advisory, scoped, or enforced.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"AccessPolicy"`
14
+ - `id`: Stable identifier
15
+ - `title`: Human-readable name
16
+ - `mode`: `advisory`, `scoped`, or `enforced`
17
+
18
+ ## Optional Frontmatter Fields
19
+
20
+ - `repositories`: Repository identifiers or URLs
21
+ - `paths`: Repository/workspace path scopes
22
+ - `connectors`: Connector/tool families relevant to the session
23
+ - `instructions`: Human-readable access guidance
24
+
25
+ Wisk always exposes the requested policy. Actual coercive enforcement is a capability of the host environment and must not be claimed when unavailable.
@@ -0,0 +1,9 @@
1
+ CREATE TABLE "AccessPolicy" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "mode" VARCHAR,
5
+ "repositories" VARCHAR[],
6
+ "paths" VARCHAR[],
7
+ "connectors" VARCHAR[],
8
+ "instructions" VARCHAR[]
9
+ );
@@ -0,0 +1,33 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: AgentSkill
4
+ description: "Actionable, procedural guidance and policies executed by agents."
5
+ ---
6
+
7
+ # Concept: AgentSkill
8
+
9
+ An `AgentSkill` is a concise, procedural rulebook. It answers: *given what we learned, how should the agent act?*
10
+
11
+ A skill may also reference a `RunSpec` that turns the skill into a contract-guided execution protocol. The skill describes reusable procedure; the `RunSpec` describes what a well-formed live run must establish, read, evidence and verify.
12
+
13
+ ## Required Frontmatter Fields
14
+
15
+ - `type`: Must be `"AgentSkill"`
16
+ - `id`: Skill identifier (e.g. `skill-develop-feature`)
17
+ - `title`: Human-readable skill name
18
+ - `version`: Semver or incremental version string (e.g. `"1.0.0"`)
19
+ - `status`: Skill lifecycle state (`"active"`, `"deprecated"`, `"experimental"`)
20
+
21
+ ## Optional Frontmatter Fields
22
+
23
+ - `derived_from`: Links to `[WikiEntry](../wiki/...)` justifying this procedure
24
+ - `tags`: List of domain/tool tags
25
+ - `run_spec`: Link to the default `RunSpec` that operationalizes this skill
26
+
27
+ ## Content Structure
28
+
29
+ The body must be:
30
+ - Concise, procedural, step-by-step.
31
+ - Free of raw conversation dumps or unverified notes.
32
+
33
+ An `experimental` AgentSkill may coexist with the active incumbent while Experience sessions gather evidence under each version. Wiki sessions synthesize and compare those experiences; later Skill sessions decide whether to refine, continue experimenting, promote, reject, deprecate, or replace the candidate. `SkillEvaluation` may record an explicit benchmark when useful, but it is not a mandatory fourth stage of the learning cycle.
@@ -0,0 +1,8 @@
1
+ CREATE TABLE "AgentSkill" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "version" VARCHAR,
5
+ "status" VARCHAR,
6
+ "derived_from" VARCHAR[],
7
+ "tags" VARCHAR[]
8
+ );
@@ -0,0 +1,31 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: CadencePolicy
4
+ description: "Declares when a SessionType becomes eligible to start and the execution limits used to rank candidates."
5
+ ---
6
+
7
+ # Concept: CadencePolicy
8
+
9
+ `CadencePolicy` models session eligibility rather than reducing orchestration to cron.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"CadencePolicy"`
14
+ - `id`: Stable identifier
15
+ - `title`: Human-readable name
16
+
17
+ ## Optional Frontmatter Fields
18
+
19
+ - `on_demand`: Session may always be selected explicitly
20
+ - `event_triggers`: Named events that make the session eligible
21
+ - `interval_seconds`: Regular interval trigger
22
+ - `threshold_metric`: Named runtime metric
23
+ - `threshold_gte`: Minimum metric value for eligibility
24
+ - `cooldown_seconds`: Minimum time after a prior run before automatic re-entry
25
+ - `max_delay_seconds`: Maximum tolerated time without a run; exceeding it makes the session eligible
26
+ - `priority`: Higher values rank first among eligible sessions
27
+ - `max_parallel`: Maximum simultaneous active runs of this type
28
+ - `max_runs_per_hour`: Rolling run budget
29
+ - `handoff_compatible`: Whether a targeted active Handoff may activate this type
30
+
31
+ Eligibility is inspectable: the runtime reports triggering reasons and blocking controls separately.
@@ -0,0 +1,15 @@
1
+ CREATE TABLE "CadencePolicy" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "on_demand" BOOLEAN,
5
+ "event_triggers" VARCHAR[],
6
+ "interval_seconds" BIGINT,
7
+ "threshold_metric" VARCHAR,
8
+ "threshold_gte" BIGINT,
9
+ "cooldown_seconds" BIGINT,
10
+ "max_delay_seconds" BIGINT,
11
+ "priority" BIGINT,
12
+ "max_parallel" BIGINT,
13
+ "max_runs_per_hour" BIGINT,
14
+ "handoff_compatible" BOOLEAN
15
+ );
@@ -0,0 +1,7 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: Changelog
4
+ description: Changelog card
5
+ ---
6
+
7
+ # Changelog
@@ -0,0 +1,4 @@
1
+ CREATE TABLE "Changelog" (
2
+ "version" VARCHAR,
3
+ "date" VARCHAR
4
+ );
@@ -0,0 +1,24 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: ContextPolicy
4
+ description: "Declares what information is appropriate to surface to a SessionType and how strongly that curation is applied."
5
+ ---
6
+
7
+ # Concept: ContextPolicy
8
+
9
+ `ContextPolicy` separates epistemic guidance from technical access control.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"ContextPolicy"`
14
+ - `id`: Stable identifier
15
+ - `title`: Human-readable name
16
+ - `mode`: `advisory` or `curated`
17
+
18
+ ## Optional Frontmatter Fields
19
+
20
+ - `include`: Context categories to surface by default
21
+ - `exclude`: Context categories that are off-limits or omitted from curated context
22
+ - `instructions`: Human-readable guidance shown to the agent
23
+
24
+ `advisory` explains the intended boundary without coercion. `curated` also filters the context returned by the Wisk runtime, while still not pretending to restrict external tools the host makes available.
@@ -0,0 +1,8 @@
1
+ CREATE TABLE "ContextPolicy" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "mode" VARCHAR,
5
+ "include" VARCHAR[],
6
+ "exclude" VARCHAR[],
7
+ "instructions" VARCHAR[]
8
+ );
@@ -0,0 +1,35 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: Experience
4
+ description: "Raw episodic execution trace or observation recorded by an agent."
5
+ ---
6
+
7
+ # Concept: Experience
8
+
9
+ An `Experience` represents an episodic record of what happened during an execution. It is historical evidence, not a consolidated rule.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: Must be `"Experience"`
14
+ - `id`: Unique identifier (e.g. `exp-2026-09-02-01`)
15
+ - `title`: Short descriptive title of what was attempted
16
+ - `timestamp`: ISO-8601 timestamp
17
+ - `status`: Execution outcome (`"success"`, `"failure"`, `"partial"`, `"observation"`)
18
+
19
+ ## Optional Frontmatter Fields
20
+
21
+ - `skill_used`: Link or identifier of the skill executed
22
+ - `skill_version`: Version of the skill used
23
+ - `task`: High-level goal or task description
24
+ - `error_code`: Error identifier if applicable
25
+ - `context`: Contextual notes or environment flags
26
+ - `run`: Link to the `LoopRun` whose execution produced this Experience
27
+
28
+ ## Content Structure
29
+
30
+ The body should describe:
31
+ 1. **Context & Intent**: What the agent wanted to achieve.
32
+ 2. **Action & Observed Output**: Concrete trace, response, or command output.
33
+ 3. **Findings**: What was surprising, what broke, or what succeeded.
34
+
35
+ When the Experience emerges from a contract-guided run, `run` preserves provenance back to the operational state and evidence that produced the learning.
@@ -0,0 +1,12 @@
1
+ CREATE TABLE "Experience" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "timestamp" TIMESTAMPTZ,
5
+ "status" VARCHAR,
6
+ "skill_used" VARCHAR,
7
+ "skill_version" VARCHAR,
8
+ "task" VARCHAR,
9
+ "error_code" VARCHAR,
10
+ "context" VARCHAR,
11
+ "run" VARCHAR
12
+ );
@@ -0,0 +1,41 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: Handoff
4
+ description: "Resumable unfinished work transferred from one LoopRun to a future LoopRun."
5
+ ---
6
+
7
+ # Concept: Handoff
8
+
9
+ A `Handoff` represents material work intentionally transferred between agent sessions.
10
+
11
+ ## Required frontmatter
12
+
13
+ - `type`: `Handoff`
14
+ - `id`: stable identifier
15
+ - `title`: concise description of the unfinished work
16
+ - `created_at`: ISO-8601 timestamp
17
+ - `status`: `active` or `archived`
18
+ - `created_by_run`: LoopRun that emitted the handoff
19
+ - `state`: concrete state in which the work was left
20
+ - `next_action`: natural resumption point
21
+ - `references`: relevant PRs, issues, files, concepts, evidence or other identifiers
22
+
23
+ ## Goal accountability
24
+
25
+ - `goals`: RunGoals from `created_by_run` whose unfinished intent this Handoff carries forward.
26
+
27
+ A LoopRun may close only after every owned RunGoal reaches a terminal state. `achieved` means the run resolved that intent itself. `carried_forward` means responsibility moved to a Handoff, and the corresponding RunGoal must therefore appear in the Handoff's `goals` list. The Handoff continues to satisfy that historical provenance after it is archived by a later run.
28
+
29
+ ## Optional routing
30
+
31
+ - `target_session_type`: SessionType that is the natural continuation owner. A compatible cadence policy may treat this active Handoff as an eligibility trigger.
32
+
33
+ ## Archived handoffs
34
+
35
+ When a later session continues the work, the handoff is archived and records:
36
+
37
+ - `continued_by_run`: LoopRun that resumed it
38
+ - `archived_at`: ISO-8601 timestamp
39
+ - `resolution`: what the continuing session did with the handoff
40
+
41
+ Archiving is semantic rather than destructive: the document remains queryable as provenance between sessions.
@@ -0,0 +1,15 @@
1
+ CREATE TABLE "Handoff" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "created_at" TIMESTAMPTZ,
5
+ "status" VARCHAR,
6
+ "created_by_run" VARCHAR,
7
+ "target_session_type" VARCHAR,
8
+ "state" VARCHAR,
9
+ "next_action" VARCHAR,
10
+ "references" VARCHAR[],
11
+ "goals" VARCHAR[],
12
+ "continued_by_run" VARCHAR,
13
+ "archived_at" TIMESTAMPTZ,
14
+ "resolution" VARCHAR
15
+ );
@@ -0,0 +1,71 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: LoopRun
4
+ description: "Live execution instance scaffolded from a RunSpec and progressively satisfied through typed evidence and checks."
5
+ ---
6
+
7
+ # Concept: LoopRun
8
+
9
+ A `LoopRun` is the live state of one agent execution round.
10
+
11
+ It exists before substantive work begins, starts intentionally incomplete, and accumulates typed readings, goals, decisions, evidence, checks and an outcome as the session progresses.
12
+
13
+ The applicable `RunSpec` defines what a well-formed run of this class requires. The `SessionType` records what kind of session created the run and supplies its purpose, inherited nudges, and default RunSpec selection. Repeated `okf-parser` validation provides operational feedback about missing or inconsistent state.
14
+
15
+ ## Required Frontmatter Fields
16
+
17
+ - `type`: `"LoopRun"`
18
+ - `id`: Run identifier
19
+ - `title`: Short summary of the run
20
+ - `timestamp`: ISO-8601 start timestamp
21
+ - `status`: `"scaffold"`, `"in_progress"`, or `"closed"`
22
+ - `run_spec`: Link to the governing `RunSpec`
23
+ - `session_type`: Link to the effective `SessionType`
24
+ - `task`: Task or session intent
25
+
26
+ ## Pinned RunSpec provenance
27
+
28
+ New LoopRuns freeze the complete RunSpec frontmatter that governed the run at creation time:
29
+
30
+ - `run_spec_version`: authored version of the governing RunSpec;
31
+ - `run_spec_digest`: `sha256:` digest of the canonical snapshot;
32
+ - `run_spec_snapshot`: deterministic JSON serialization of the complete RunSpec frontmatter.
33
+
34
+ `check_run()` validates a pinned run against this snapshot rather than the mutable current RunSpec. The digest and version make tampering or accidental divergence explicit. Legacy LoopRuns that predate pinning may omit these fields and continue to resolve their current `run_spec` reference as a compatibility fallback.
35
+
36
+ ## Progressive Frontmatter Fields
37
+
38
+ These fields are expected to be populated as the run advances according to its `RunSpec`:
39
+
40
+ - `readings`: Links to `RunReading`
41
+ - `goals`: Links to `RunGoal`
42
+ - `decisions`: Links to `RunDecision`
43
+ - `evidence`: Links to `RunEvidence`
44
+ - `checks`: Links to `RunCheck`
45
+ - `outcome`: Link to `RunOutcome`
46
+ - `skills_consulted`: Links to `AgentSkill`
47
+ - `experiences_recorded`: Links to `Experience`
48
+ - `proposals_generated`: Links to `SkillProposal`
49
+
50
+ ## Operational semantics
51
+
52
+ A new run should be created from a scaffold before meaningful execution work. It is normal for that scaffold to fail completion validation initially.
53
+
54
+ The agent then cycles through:
55
+
56
+ ```text
57
+ validate live run
58
+ -> inspect unsatisfied requirements
59
+ -> perform the next useful action
60
+ -> record typed state/evidence
61
+ -> validate again
62
+ ```
63
+
64
+ Closing is stronger than merely filling the RunSpec fields. Every RunGoal owned by the run must have a terminal destination before `RunOutcome` may close it:
65
+
66
+ - `achieved`: the current run resolved the intent;
67
+ - `carried_forward`: a Handoff created by this run explicitly lists the goal and transfers it onward.
68
+
69
+ Goals left `planned`, `active`, or `advanced` keep the run incomplete. A partial outcome also requires a Handoff to exist before the close is written. Archived Handoffs remain valid provenance for the historical source run.
70
+
71
+ The final run is both an auditable record of what happened and a structured handoff describing the state reached and the next natural move.
@@ -0,0 +1,21 @@
1
+ CREATE TABLE "LoopRun" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "timestamp" VARCHAR,
5
+ "status" VARCHAR,
6
+ "run_spec" VARCHAR,
7
+ "run_spec_version" VARCHAR,
8
+ "run_spec_digest" VARCHAR,
9
+ "run_spec_snapshot" VARCHAR,
10
+ "session_type" VARCHAR,
11
+ "task" VARCHAR,
12
+ "readings" VARCHAR[],
13
+ "goals" VARCHAR[],
14
+ "decisions" VARCHAR[],
15
+ "evidence" VARCHAR[],
16
+ "checks" VARCHAR[],
17
+ "outcome" VARCHAR,
18
+ "skills_consulted" VARCHAR[],
19
+ "experiences_recorded" VARCHAR[],
20
+ "proposals_generated" VARCHAR[]
21
+ );
@@ -0,0 +1,32 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: OutputPolicy
4
+ description: "Maps Wisk concept families to semantic output namespaces inside the repository knowledge tree."
5
+ ---
6
+
7
+ # Concept: OutputPolicy
8
+
9
+ `OutputPolicy` keeps storage conventions explicit while preserving the three primary Wisk stages: `experiences/`, `wiki/`, and `skills/`.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"OutputPolicy"`
14
+ - `id`: Stable identifier
15
+ - `title`: Human-readable name
16
+
17
+ ## Route Fields
18
+
19
+ - `experience_path`
20
+ - `run_path`
21
+ - `handoff_path`
22
+ - `wiki_path`
23
+ - `skill_path`
24
+ - `proposal_path`
25
+ - `evaluation_path`
26
+ - `session_type_path`
27
+ - `run_spec_path`
28
+ - `context_policy_path`
29
+ - `access_policy_path`
30
+ - `output_policy_path`
31
+
32
+ Paths are relative to the knowledge bundle root. The default policy keeps all outputs beneath exactly three principal namespaces: `experiences`, `wiki`, and `skills`.
@@ -0,0 +1,17 @@
1
+ CREATE TABLE "OutputPolicy" (
2
+ "id" VARCHAR,
3
+ "title" VARCHAR,
4
+ "experience_path" VARCHAR,
5
+ "run_path" VARCHAR,
6
+ "handoff_path" VARCHAR,
7
+ "wiki_path" VARCHAR,
8
+ "skill_path" VARCHAR,
9
+ "proposal_path" VARCHAR,
10
+ "evaluation_path" VARCHAR,
11
+ "session_type_path" VARCHAR,
12
+ "run_spec_path" VARCHAR,
13
+ "context_policy_path" VARCHAR,
14
+ "access_policy_path" VARCHAR,
15
+ "output_policy_path" VARCHAR,
16
+ "cadence_policy_path" VARCHAR
17
+ );
@@ -0,0 +1,28 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: RunCheck
4
+ description: "A verification performed during a live run, including procedure, result, and supporting evidence."
5
+ ---
6
+
7
+ # Concept: RunCheck
8
+
9
+ A `RunCheck` records an explicit verification of the current run state.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"RunCheck"`
14
+ - `id`: Check identifier
15
+ - `run`: Link to the `LoopRun`
16
+ - `kind`: Check category defined by the applicable `RunSpec`
17
+ - `procedure`: Command, query, review procedure, or other verification method
18
+ - `result`: Concise observed result
19
+ - `status`: `"pass"`, `"fail"`, or `"inconclusive"`
20
+
21
+ ## Optional Frontmatter Fields
22
+
23
+ - `evidence`: Link to supporting `RunEvidence`
24
+ - `goal`: Link to the `RunGoal` being verified
25
+
26
+ ## Semantics
27
+
28
+ Checks turn evidence into explicit verification. The generic type is domain-neutral; RunSpecs define which checks matter for a particular class of work.
@@ -0,0 +1,10 @@
1
+ CREATE TABLE "RunCheck" (
2
+ "id" VARCHAR,
3
+ "run" VARCHAR,
4
+ "kind" VARCHAR,
5
+ "procedure" VARCHAR,
6
+ "result" VARCHAR,
7
+ "status" VARCHAR,
8
+ "evidence" VARCHAR,
9
+ "goal" VARCHAR
10
+ );
@@ -0,0 +1,28 @@
1
+ ---
2
+ type: ConceptSpecification
3
+ concept_type: RunDecision
4
+ description: "A consequential choice made during a live run, with rationale and linkage to the goal it advances."
5
+ ---
6
+
7
+ # Concept: RunDecision
8
+
9
+ A `RunDecision` records a meaningful choice that changes how the run proceeds.
10
+
11
+ ## Required Frontmatter Fields
12
+
13
+ - `type`: `"RunDecision"`
14
+ - `id`: Decision identifier
15
+ - `run`: Link to the `LoopRun`
16
+ - `question`: Decision point or problem being resolved
17
+ - `decision`: Chosen direction
18
+ - `rationale`: Why this choice is appropriate given current evidence
19
+
20
+ ## Optional Frontmatter Fields
21
+
22
+ - `goal`: Link to the `RunGoal` advanced by the decision
23
+ - `alternatives`: Other options materially considered
24
+ - `evidence`: Links to supporting `RunEvidence`
25
+
26
+ ## Semantics
27
+
28
+ The purpose is not to log every thought. Record decisions that affect architecture, scope, interpretation, prioritization, validation, or the next state of the run.