@reunionstudio/airlock-mcp 0.1.3 → 0.1.4
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.
- package/.agents/skills/airlock-mcp/SKILL.md +39 -9
- package/README.md +42 -2
- package/docs/install-surface.md +16 -6
- package/docs/spec-workspace.md +5 -0
- package/docs/workflows.md +40 -0
- package/package.json +1 -1
- package/patterns/manifest.json +6 -0
- package/patterns/okf-knowledge-bundle/README.md +64 -0
- package/patterns/okf-knowledge-bundle/sample.records.json +16 -0
- package/patterns/okf-knowledge-bundle/spec.config.json +64 -0
- package/setup.py +1 -1
- package/src/airlock_mcp/__init__.py +1 -1
- package/src/airlock_mcp/app_context.py +33 -1
- package/src/airlock_mcp/bootstrap.py +16 -0
- package/src/airlock_mcp/summary.py +1 -0
- package/src/mcp.mjs +1 -1
- package/src/text.mjs +44 -9
- package/src/workbench.mjs +2 -2
|
@@ -74,19 +74,28 @@ deterministic checker for local spec drafts.
|
|
|
74
74
|
4. Create `posts` only when the user chooses a feedback loop, asks for humans
|
|
75
75
|
and agents to provide feedback, or explicitly requests the posts pattern.
|
|
76
76
|
If the user is unsure, continue process discovery before creating files.
|
|
77
|
-
5.
|
|
77
|
+
5. Create `okf-knowledge-bundle` when the user needs governed Markdown
|
|
78
|
+
knowledge, accepted agent context, policies, runbooks, metric definitions,
|
|
79
|
+
investigations, or other business context organized as an OKF-style bundle.
|
|
80
|
+
The spec must declare `core_config.payload_adapter =
|
|
81
|
+
"okf_knowledge_bundle"`. Installed Airlock loads validated bundles with
|
|
82
|
+
`airlock.admin.load_okf_bundle(...)`, can sync parsed metadata with
|
|
83
|
+
`airlock.admin.sync_okf_bundle_metadata(...)`, and exposes authoritative
|
|
84
|
+
accepted context through `AIRLOCK_DATA.ACTIVE.V_OKF_CONCEPT_METADATA`.
|
|
85
|
+
Draft and rejected bundles are not authoritative agent context.
|
|
86
|
+
6. Use `airlock-mcp import-spec <json-file> <name>` when starting from a
|
|
78
87
|
spec-library file, an exported `SPEC_CONFIG`, or an existing canonical config.
|
|
79
88
|
If the source is from `airlock-specs`, treat it as a reusable draft pattern.
|
|
80
89
|
Check actual API docs, CSV/Excel/JSON samples, schemas, or other artifacts
|
|
81
90
|
before assuming the source fields match a live third-party system.
|
|
82
|
-
|
|
91
|
+
7. Use `airlock-mcp clone <source-workspace> <name>` when creating a related
|
|
83
92
|
draft from an existing workspace. Treat clone like the old Streamlit UI:
|
|
84
93
|
preserve the shape but deliberately reset spec identity.
|
|
85
|
-
|
|
94
|
+
8. Keep the draft small. Prefer one useful governed output over a large
|
|
86
95
|
speculative system, then keep a plan for later specs.
|
|
87
|
-
|
|
96
|
+
9. On later sessions, run `airlock-mcp list-workspaces` when the target draft
|
|
88
97
|
is not obvious.
|
|
89
|
-
|
|
98
|
+
10. Run `airlock-mcp summary <workspace>` and
|
|
90
99
|
`airlock-mcp next <workspace>` before editing so
|
|
91
100
|
the current shape, sample count, access model, and local check status are
|
|
92
101
|
visible.
|
|
@@ -94,14 +103,14 @@ deterministic checker for local spec drafts.
|
|
|
94
103
|
core, file rules, attachments, guest access, column rules, samples, notes,
|
|
95
104
|
and check status. Do not make the user infer the current spec from file
|
|
96
105
|
links alone.
|
|
97
|
-
|
|
106
|
+
11. Run `airlock-mcp check <workspace>` after changing draft config or sample
|
|
98
107
|
records.
|
|
99
|
-
|
|
108
|
+
12. Keep `sample.records.json` as the agent-friendly authoring shape. Use
|
|
100
109
|
`airlock-mcp export-csv <workspace>` when the same examples need to be
|
|
101
110
|
reviewed or loaded through Airlock's CSV path.
|
|
102
|
-
|
|
111
|
+
13. Use `airlock-mcp rename`, `archive`, and `restore` when organizing
|
|
103
112
|
workspaces so spec identity changes remain deliberate.
|
|
104
|
-
|
|
113
|
+
14. Use `airlock-mcp render-sql <workspace>` only as a validate-only review
|
|
105
114
|
artifact. Installed Airlock validation remains authoritative.
|
|
106
115
|
|
|
107
116
|
## Spec Design Questions
|
|
@@ -199,6 +208,25 @@ Start by identifying:
|
|
|
199
208
|
user's environment.
|
|
200
209
|
6. Identity, evidence, timestamps, approval, and separation-of-duties rules.
|
|
201
210
|
|
|
211
|
+
Use the current installed Airlock procedure grammar when the app talks to
|
|
212
|
+
Airlock:
|
|
213
|
+
|
|
214
|
+
- `airlock.observe.*` is read-only and is the first-class governance
|
|
215
|
+
observation surface for `app_admin` and `app_observer`.
|
|
216
|
+
- `airlock.admin.*` performs administrative changes and operational mutations.
|
|
217
|
+
- `airlock.agent.*` performs governed user or agent work in the actor's scope.
|
|
218
|
+
|
|
219
|
+
For app-first work, prefer `observe.procedures`, `observe.specs`,
|
|
220
|
+
`observe.spec`, `observe.governance_map`, `observe.explain_access`,
|
|
221
|
+
`observe.health`, `observe.activity`, `observe.admin_activity`,
|
|
222
|
+
`observe.spec_admin_activity`, `observe.billing`, `observe.billing_events`, and
|
|
223
|
+
the relevant context packets before inventing
|
|
224
|
+
custom read paths. Do not tell agents to call retired admin read wrappers such
|
|
225
|
+
as `admin.list_specs`, `admin.describe_role`, `admin.get_spec`, or
|
|
226
|
+
`admin.list_events`; use the matching observe list/detail procedure instead.
|
|
227
|
+
Use `admin.*` only when the app is intentionally changing Airlock setup or
|
|
228
|
+
running an admin operation.
|
|
229
|
+
|
|
202
230
|
Help the app follow the loop:
|
|
203
231
|
|
|
204
232
|
- Observe/read: fetch existing governed data through approved Airlock or
|
|
@@ -254,6 +282,8 @@ In co-development mode, keep two tracks visible:
|
|
|
254
282
|
Read only the relevant pattern files:
|
|
255
283
|
|
|
256
284
|
- `patterns/starter-posts/` when the user needs a first feedback loop.
|
|
285
|
+
- `patterns/okf-knowledge-bundle/` when the user needs governed Markdown
|
|
286
|
+
business context for people or agents.
|
|
257
287
|
- `patterns/guest-access/` when isolation or sharing is the hard part.
|
|
258
288
|
- `patterns/spec-types/` when choosing observation, commitment,
|
|
259
289
|
reconciliation, or reference/master-data shape.
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ It covers the full Airlock loop:
|
|
|
14
14
|
Spec building and spec-using app guidance are not second things users install.
|
|
15
15
|
They are bundled inside Airlock MCP.
|
|
16
16
|
|
|
17
|
-
Airlock MCP gives agents
|
|
17
|
+
Airlock MCP gives agents four kinds of Airlock help:
|
|
18
18
|
|
|
19
19
|
1. Spec design: draft, check, revise, import, clone, and prepare specs for
|
|
20
20
|
installed Airlock validation.
|
|
@@ -24,6 +24,31 @@ Airlock MCP gives agents three kinds of Airlock help:
|
|
|
24
24
|
3. App and workflow implementation: build dashboards, queues, decision UIs,
|
|
25
25
|
analyses, and agent workflows that use existing specs through Airlock
|
|
26
26
|
contracts.
|
|
27
|
+
4. Governance observation: use installed Airlock's read-only `observe.*`
|
|
28
|
+
procedures to inspect setup, access, activity, billing events, health,
|
|
29
|
+
context packets, and governance maps before deciding what an app or agent
|
|
30
|
+
should do.
|
|
31
|
+
|
|
32
|
+
## Installed Airlock Contract
|
|
33
|
+
|
|
34
|
+
Current Airlock separates procedure intent:
|
|
35
|
+
|
|
36
|
+
- `airlock.observe.*` is the read-only governance observation surface. It is
|
|
37
|
+
available to `app_admin` and `app_observer` and is the preferred path for
|
|
38
|
+
discovery, health checks, access explanation, governance maps, activity,
|
|
39
|
+
billing event context, and list/detail context packets.
|
|
40
|
+
- `airlock.admin.*` is for admin changes and operational actions such as
|
|
41
|
+
creating specs, changing roles, loading OKF bundles, rerunning setup, or
|
|
42
|
+
deleting purge candidates.
|
|
43
|
+
- `airlock.agent.*` is for governed agent work such as listing my
|
|
44
|
+
specs, validating/loading data, workflow actions, attachments, delegations,
|
|
45
|
+
and references.
|
|
46
|
+
|
|
47
|
+
When building an app or workflow, prefer `observe.*` for read-only setup and
|
|
48
|
+
monitoring questions, `agent.*` for governed submissions in the actor's scope,
|
|
49
|
+
and `admin.*` only for intentional administrative mutation. Do not use retired
|
|
50
|
+
admin read wrappers such as `admin.list_specs`, `admin.describe_role`, or
|
|
51
|
+
`admin.list_events`; use the matching observe procedures instead.
|
|
27
52
|
|
|
28
53
|
## Install
|
|
29
54
|
|
|
@@ -98,7 +123,8 @@ The server exposes orientation plus local spec-building tools:
|
|
|
98
123
|
- `airlock_init_app_context`: seed an app repo with spec snapshots, sample
|
|
99
124
|
records, generated helper folders, and an app manifest.
|
|
100
125
|
- `airlock_list_patterns` and `airlock_show_pattern`: inspect starter patterns.
|
|
101
|
-
- `airlock_init_workspace`: create a workspace from `blank` or
|
|
126
|
+
- `airlock_init_workspace`: create a workspace from `blank`, `posts`, or
|
|
127
|
+
`okf-knowledge-bundle`.
|
|
102
128
|
- `airlock_list_workspaces`: inspect active or archived drafts.
|
|
103
129
|
- `airlock_check_workspace`, `airlock_summary`, and `airlock_next`: validate and re-enter a draft.
|
|
104
130
|
- `airlock_export_csv`: render `sample.records.json` as Airlock-ready CSV.
|
|
@@ -188,3 +214,17 @@ points, patterns, and ideas. Those library specs are not guaranteed to reflect
|
|
|
188
214
|
the current shape of any third-party system. Current API docs, real exports,
|
|
189
215
|
samples, schemas, and user-provided artifacts should override library shapes
|
|
190
216
|
when they conflict.
|
|
217
|
+
|
|
218
|
+
For app-first work against installed Airlock, start with `observe.procedures`,
|
|
219
|
+
`observe.specs`, `observe.spec`, `observe.governance_map`,
|
|
220
|
+
`observe.explain_access`, `observe.health`, and the relevant context packet
|
|
221
|
+
before designing direct SQL helpers. These payloads are intended to be useful
|
|
222
|
+
to agents as well as humans.
|
|
223
|
+
|
|
224
|
+
For governed Markdown knowledge, use the `okf-knowledge-bundle` pattern. It
|
|
225
|
+
sets `core_config.payload_adapter` to `okf_knowledge_bundle` so installed
|
|
226
|
+
Airlock can load locally validated bundles through
|
|
227
|
+
`airlock.admin.load_okf_bundle(...)`, sync parsed metadata through
|
|
228
|
+
`airlock.admin.sync_okf_bundle_metadata(...)`, and expose accepted concept
|
|
229
|
+
metadata from `AIRLOCK_DATA.ACTIVE.V_OKF_CONCEPT_METADATA`. Draft and rejected
|
|
230
|
+
bundles are not authoritative agent context.
|
package/docs/install-surface.md
CHANGED
|
@@ -24,6 +24,13 @@ that reads and submits through Airlock contracts.
|
|
|
24
24
|
The install command is not the spec workspace. It is the connector/setup entry
|
|
25
25
|
point. The specs repo is still the durable memory.
|
|
26
26
|
|
|
27
|
+
For installed Airlock access, teach the current procedure split:
|
|
28
|
+
`airlock.observe.*` is the read-only governance observation surface,
|
|
29
|
+
`airlock.agent.*` is governed agent work, and `airlock.admin.*` is
|
|
30
|
+
administrative mutation. App-first and audit-style workflows should use
|
|
31
|
+
observe payloads for discovery, context, health, access explanation, activity,
|
|
32
|
+
billing events, and governance maps before considering custom SQL helpers.
|
|
33
|
+
|
|
27
34
|
The connector package and MCP server live in `reunionstudio/airlock-mcp`.
|
|
28
35
|
This workbench provides the spec-building implementation inside that one
|
|
29
36
|
installed Airlock MCP experience.
|
|
@@ -118,9 +125,11 @@ The first release should optimize the user journey:
|
|
|
118
125
|
forms, screenshots, PDFs, exports, or message examples
|
|
119
126
|
6. use `airlock-specs` library patterns as starting points when useful, while
|
|
120
127
|
preferring current artifacts over library shapes when they conflict
|
|
121
|
-
7.
|
|
122
|
-
|
|
123
|
-
|
|
128
|
+
7. use the `okf-knowledge-bundle` pattern when the useful artifact is governed
|
|
129
|
+
Markdown knowledge for accepted agent context
|
|
130
|
+
8. map where information comes in and actions go out
|
|
131
|
+
9. create the first workspace only after the user chooses a small first spec
|
|
132
|
+
10. keep a plan for later specs that improve the full loop
|
|
124
133
|
|
|
125
134
|
For users who already have specs and want to build software, optimize a second
|
|
126
135
|
journey:
|
|
@@ -131,10 +140,11 @@ journey:
|
|
|
131
140
|
4. identify read specs and write specs
|
|
132
141
|
5. seed app-local Airlock context with `airlock-mcp init-app-context` when the
|
|
133
142
|
app needs spec snapshots, samples, generated helpers, and a manifest
|
|
134
|
-
6.
|
|
135
|
-
7.
|
|
143
|
+
6. inspect installed setup with read-only `observe.*` procedures when available
|
|
144
|
+
7. build orienting views, dashboards, queues, proposals, or recommendations
|
|
145
|
+
8. capture decisions, approvals, actions, comments, or follow-ups through
|
|
136
146
|
Airlock spec contracts
|
|
137
|
-
|
|
147
|
+
9. avoid direct writes to Airlock-owned tables and avoid bypassing spec workflow
|
|
138
148
|
|
|
139
149
|
For users who are developing the app and specs together, optimize a third
|
|
140
150
|
journey:
|
package/docs/spec-workspace.md
CHANGED
|
@@ -22,6 +22,11 @@ Use `airlock-mcp rename`, `archive`, and `restore` to organize draft folders.
|
|
|
22
22
|
`rename` retitles spec identity by default; pass `--keep-spec-identity` for a
|
|
23
23
|
pure folder move.
|
|
24
24
|
|
|
25
|
+
For `okf-knowledge-bundle` workspaces, `sample.records.json` is only a small
|
|
26
|
+
metadata sample for the draft spec. The governed payload is a locally validated
|
|
27
|
+
Markdown directory or `.zip` bundle loaded through installed Airlock's
|
|
28
|
+
`airlock.admin.load_okf_bundle(...)` path.
|
|
29
|
+
|
|
25
30
|
`review.md` should identify the workspace source mode:
|
|
26
31
|
|
|
27
32
|
- `create`: started from an Airlock MCP pattern
|
package/docs/workflows.md
CHANGED
|
@@ -154,6 +154,24 @@ unless the user asks to change specs. Start by asking for:
|
|
|
154
154
|
- the available Airlock/Snowflake access path
|
|
155
155
|
- identity, evidence, timestamp, approval, and separation-of-duties needs
|
|
156
156
|
|
|
157
|
+
Use the installed Airlock procedure grammar:
|
|
158
|
+
|
|
159
|
+
- `airlock.observe.*` is read-only and should answer discovery, governance,
|
|
160
|
+
audit, health, activity, billing-event, and access-explanation questions.
|
|
161
|
+
- `airlock.agent.*` is for governed work by the current actor, including
|
|
162
|
+
validation, loading, workflow actions, attachments, references, and
|
|
163
|
+
delegations.
|
|
164
|
+
- `airlock.admin.*` is for administrative mutation and operational changes.
|
|
165
|
+
|
|
166
|
+
For app-first work, start with observe payloads such as `observe.procedures`,
|
|
167
|
+
`observe.specs`, `observe.spec`, `observe.governance_map`,
|
|
168
|
+
`observe.explain_access`, `observe.health`, `observe.activity`,
|
|
169
|
+
`observe.admin_activity`, `observe.spec_admin_activity`, `observe.billing`, and
|
|
170
|
+
`observe.billing_events`. For `alter_spec` activity, use `CHANGED_SECTIONS` and
|
|
171
|
+
`CHANGED_FIELDS` to triage what changed before fetching version snapshots. Do not use retired admin read
|
|
172
|
+
wrappers such as `admin.list_specs`, `admin.describe_role`, `admin.get_spec`,
|
|
173
|
+
or `admin.list_events`; use observe list/detail procedures instead.
|
|
174
|
+
|
|
157
175
|
The app should follow the loop:
|
|
158
176
|
|
|
159
177
|
1. Observe/read governed records through approved Airlock or Snowflake surfaces.
|
|
@@ -228,6 +246,28 @@ airlock-mcp check workspaces/feedback-loop
|
|
|
228
246
|
Then ask Codex to help decide what the posts should observe, who responds, and
|
|
229
247
|
what next spec should grow from the feedback.
|
|
230
248
|
|
|
249
|
+
## Start From Governed Knowledge
|
|
250
|
+
|
|
251
|
+
Use this when the user wants accepted Markdown business context for people or
|
|
252
|
+
agents: policies, runbooks, metric definitions, investigations, decisions, or
|
|
253
|
+
operating notes.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
airlock-mcp init sales-context --pattern okf-knowledge-bundle
|
|
257
|
+
airlock-mcp check workspaces/sales-context
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
This pattern sets `core_config.payload_adapter` to `okf_knowledge_bundle`.
|
|
261
|
+
Installed Airlock loads locally validated bundles with
|
|
262
|
+
`airlock.admin.load_okf_bundle(...)`, can refresh parsed metadata with
|
|
263
|
+
`airlock.admin.sync_okf_bundle_metadata(...)`, and exposes authoritative
|
|
264
|
+
accepted concept metadata through
|
|
265
|
+
`AIRLOCK_DATA.ACTIVE.V_OKF_CONCEPT_METADATA`.
|
|
266
|
+
|
|
267
|
+
Do not treat draft or rejected Markdown bundles as authoritative agent context.
|
|
268
|
+
The MCP local checker validates the spec workspace; bundle validation belongs
|
|
269
|
+
to Airlock's OKF validator and installed procedures.
|
|
270
|
+
|
|
231
271
|
## Start From A Known Process
|
|
232
272
|
|
|
233
273
|
Use this when the process is known but the data shape is not.
|
package/package.json
CHANGED
package/patterns/manifest.json
CHANGED
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"title": "Posts feedback loop",
|
|
12
12
|
"summary": "Small governed feedback stream for discovering what to build next.",
|
|
13
13
|
"directory": "starter-posts"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "okf-knowledge-bundle",
|
|
17
|
+
"title": "OKF knowledge bundle",
|
|
18
|
+
"summary": "Governed Markdown knowledge bundles for accepted agent context.",
|
|
19
|
+
"directory": "okf-knowledge-bundle"
|
|
14
20
|
}
|
|
15
21
|
]
|
|
16
22
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Starter Pattern: OKF Knowledge Bundle
|
|
2
|
+
|
|
3
|
+
Use `okf-knowledge-bundle` when the team wants governed Markdown knowledge for
|
|
4
|
+
people and agents to use as accepted business context.
|
|
5
|
+
|
|
6
|
+
This pattern is for Airlock's `okf_knowledge_bundle` payload adapter. It is
|
|
7
|
+
inspired by Google's Open Knowledge Format, but Airlock applies a narrower
|
|
8
|
+
profile so accepted bundles can become governed context instead of loose wiki
|
|
9
|
+
content.
|
|
10
|
+
|
|
11
|
+
## Use When
|
|
12
|
+
|
|
13
|
+
- Policies, runbooks, metrics, definitions, decisions, investigations, or
|
|
14
|
+
operating context need a governed place to land.
|
|
15
|
+
- Agents need business context that can be accepted, audited, and queried from
|
|
16
|
+
Snowflake.
|
|
17
|
+
- The team has useful Markdown knowledge, but needs Airlock workflow, PDP,
|
|
18
|
+
Expectations, evidence, and acceptance boundaries around it.
|
|
19
|
+
|
|
20
|
+
## Bundle Shape
|
|
21
|
+
|
|
22
|
+
- Bundle source is a directory or `.zip` archive of UTF-8 Markdown files.
|
|
23
|
+
- Root `index.md` may contain bundle frontmatter such as `okf_version`,
|
|
24
|
+
`bundle_name`, `bundle_version`, `domain`, `owner`, and `purpose`.
|
|
25
|
+
- Every non-reserved Markdown file is a concept document with YAML frontmatter.
|
|
26
|
+
- Concept documents require `type`.
|
|
27
|
+
- Recommended concept fields are `title`, `description`, `resource`, `tags`,
|
|
28
|
+
`timestamp`, and `source_links`.
|
|
29
|
+
- `index.md` and `log.md` are reserved at every hierarchy level.
|
|
30
|
+
|
|
31
|
+
## Airlock Contract
|
|
32
|
+
|
|
33
|
+
The spec must declare:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"core_config": {
|
|
38
|
+
"payload_adapter": "okf_knowledge_bundle"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Installed Airlock provides two admin procedures for this adapter:
|
|
44
|
+
|
|
45
|
+
- `airlock.admin.load_okf_bundle(...)`: load a locally validated bundle into
|
|
46
|
+
Airlock stage storage and `FILE_MANIFEST`, then project concept metadata.
|
|
47
|
+
- `airlock.admin.sync_okf_bundle_metadata(...)`: project parsed concept
|
|
48
|
+
metadata for an existing active manifest row.
|
|
49
|
+
|
|
50
|
+
Use `validate_only => TRUE` before writing. Treat accepted context as
|
|
51
|
+
authoritative only from:
|
|
52
|
+
|
|
53
|
+
```sql
|
|
54
|
+
AIRLOCK_DATA.ACTIVE.V_OKF_CONCEPT_METADATA
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Draft and rejected bundles are not authoritative agent context.
|
|
58
|
+
|
|
59
|
+
## Local Workbench Notes
|
|
60
|
+
|
|
61
|
+
`airlock-mcp check` validates the Airlock spec draft and sample metadata. It
|
|
62
|
+
does not validate a Markdown bundle. Bundle validation currently lives in the
|
|
63
|
+
Airlock source repo's `airlock.okf_knowledge_bundle.validate_okf_bundle`
|
|
64
|
+
helper and the installed Airlock OKF procedures.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"spec_name": "okf_knowledge",
|
|
3
|
+
"filename": "okf_knowledge_sample.csv",
|
|
4
|
+
"records": [
|
|
5
|
+
{
|
|
6
|
+
"concept_path": "runbooks/monthly-close",
|
|
7
|
+
"concept_type": "Runbook",
|
|
8
|
+
"bundle_version": "2026.06"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"concept_path": "metrics/net-revenue",
|
|
12
|
+
"concept_type": "Metric",
|
|
13
|
+
"bundle_version": "2026.06"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"core_config": {
|
|
3
|
+
"spec_name": "okf_knowledge",
|
|
4
|
+
"spec_alias": "OKF Knowledge",
|
|
5
|
+
"description": "Governed OKF-style Markdown knowledge bundles for accepted agent context.",
|
|
6
|
+
"owner_role": "app_admin",
|
|
7
|
+
"current_mode": "append",
|
|
8
|
+
"is_published": false,
|
|
9
|
+
"is_locked": false,
|
|
10
|
+
"is_archived": false,
|
|
11
|
+
"is_multi_role": false,
|
|
12
|
+
"file_workflow": false,
|
|
13
|
+
"workflow_steps": [],
|
|
14
|
+
"materialize_as_table": false,
|
|
15
|
+
"payload_adapter": "okf_knowledge_bundle"
|
|
16
|
+
},
|
|
17
|
+
"column_config": [
|
|
18
|
+
{
|
|
19
|
+
"name": "concept_path",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Stable normalized Markdown concept path without the .md suffix.",
|
|
22
|
+
"tests": ["not_null", "unique"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "concept_type",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Concept type from OKF frontmatter.",
|
|
28
|
+
"tests": ["not_null"]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "bundle_version",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Bundle version containing the concept.",
|
|
34
|
+
"tests": ["not_null"]
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"rules": [],
|
|
38
|
+
"file_rules": {
|
|
39
|
+
"file_format": {
|
|
40
|
+
"file_type": "csv",
|
|
41
|
+
"record_delimiter": "\n",
|
|
42
|
+
"field_delimiter": ",",
|
|
43
|
+
"field_optionally_enclosed_by": "\"",
|
|
44
|
+
"escape_unenclosed_field": "\\",
|
|
45
|
+
"encoding": "UTF8",
|
|
46
|
+
"parse_header": true,
|
|
47
|
+
"save_header": true
|
|
48
|
+
},
|
|
49
|
+
"filename_rules": {
|
|
50
|
+
"enforce_filename_pattern": false,
|
|
51
|
+
"filename_pattern": null,
|
|
52
|
+
"sample_filenames": null
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"sample_data": {
|
|
56
|
+
"sample_data_acknowledged": true,
|
|
57
|
+
"sample_rows": [],
|
|
58
|
+
"edited_sample_data": "concept_path,concept_type,bundle_version\nrunbooks/monthly-close,Runbook,2026.06\nmetrics/net-revenue,Metric,2026.06\n"
|
|
59
|
+
},
|
|
60
|
+
"attachment_policy": {
|
|
61
|
+
"attachments_enabled": true,
|
|
62
|
+
"attachment_required": false
|
|
63
|
+
}
|
|
64
|
+
}
|
package/setup.py
CHANGED
|
@@ -28,6 +28,22 @@ Use:
|
|
|
28
28
|
- `generated/types/` for generated application types.
|
|
29
29
|
- `generated/sql/` for reviewed SQL helpers or query templates.
|
|
30
30
|
|
|
31
|
+
Installed Airlock separates procedure intent:
|
|
32
|
+
|
|
33
|
+
- `observe.*`: read-only governance observation for discovery, health, access
|
|
34
|
+
explanation, activity, admin activity, billing events, governance maps, and
|
|
35
|
+
context packets.
|
|
36
|
+
- `agent.*`: governed agent work in the actor's scope.
|
|
37
|
+
- `admin.*`: administrative mutation and operational changes.
|
|
38
|
+
|
|
39
|
+
Prefer `observe.*` for app read-side setup and monitoring questions. Use
|
|
40
|
+
`observe.admin_activity` for broad admin mutation and maintenance audit
|
|
41
|
+
questions, and `observe.spec_admin_activity` for one spec's definition-change
|
|
42
|
+
timeline. For `alter_spec` activity, use `CHANGED_SECTIONS` and
|
|
43
|
+
`CHANGED_FIELDS` to triage what changed before fetching version snapshots.
|
|
44
|
+
Do not use retired admin read wrappers such as `admin.list_specs`,
|
|
45
|
+
`admin.describe_role`, or `admin.list_events`; use the matching observe procedure.
|
|
46
|
+
|
|
31
47
|
Do not store credentials here. Do not write directly to Airlock-owned tables,
|
|
32
48
|
stages, generated views, or generated tables. Use approved Airlock/Snowflake
|
|
33
49
|
access paths and submit governed decisions or actions through spec contracts.
|
|
@@ -60,6 +76,15 @@ Use approved Airlock/Snowflake access paths. Do not bypass spec workflow or
|
|
|
60
76
|
write directly to Airlock-owned tables, stages, generated views, or generated
|
|
61
77
|
tables. If the app needs to submit a decision or action and no suitable write
|
|
62
78
|
spec exists, propose a small spec-design step.
|
|
79
|
+
|
|
80
|
+
Installed Airlock procedure grammar:
|
|
81
|
+
|
|
82
|
+
- `observe.*` is read-only governance observation. Use it for discovery,
|
|
83
|
+
health, access explanation, governance maps, activity, billing events, and
|
|
84
|
+
context packets.
|
|
85
|
+
- `agent.*` is governed agent work in the actor's scope.
|
|
86
|
+
- `admin.*` is administrative mutation. Do not use retired admin read wrappers;
|
|
87
|
+
use observe list/detail procedures instead.
|
|
63
88
|
"""
|
|
64
89
|
|
|
65
90
|
|
|
@@ -115,6 +140,11 @@ def _manifest(mode: str, entries: list[dict[str, Any]]) -> dict[str, Any]:
|
|
|
115
140
|
"mode": mode,
|
|
116
141
|
"canonical_source": "specs repo or installed Airlock",
|
|
117
142
|
"snapshot_policy": "Snapshots are app-local development references, not canonical specs.",
|
|
143
|
+
"installed_airlock_contract": {
|
|
144
|
+
"observe": "read-only governance observation, context, activity, health, billing events, and access explanation",
|
|
145
|
+
"agent": "governed agent work in the actor scope",
|
|
146
|
+
"admin": "administrative mutation and operational changes",
|
|
147
|
+
},
|
|
118
148
|
"specs": entries,
|
|
119
149
|
"tracks": {
|
|
120
150
|
"spec_track": "row grain, columns, samples, access, validation, workflow",
|
|
@@ -134,6 +164,7 @@ def _merge_manifest(existing: Any, new_manifest: dict[str, Any]) -> dict[str, An
|
|
|
134
164
|
"mode": new_manifest["mode"],
|
|
135
165
|
"canonical_source": new_manifest["canonical_source"],
|
|
136
166
|
"snapshot_policy": new_manifest["snapshot_policy"],
|
|
167
|
+
"installed_airlock_contract": new_manifest["installed_airlock_contract"],
|
|
137
168
|
"tracks": new_manifest["tracks"],
|
|
138
169
|
}
|
|
139
170
|
)
|
|
@@ -265,7 +296,8 @@ def format_app_context_result(result: AppContextResult) -> str:
|
|
|
265
296
|
"next:",
|
|
266
297
|
"1. Treat spec snapshots as app-local references, not canonical specs.",
|
|
267
298
|
"2. Mark each manifest spec as read, write, or read_write for the app.",
|
|
268
|
-
"3.
|
|
299
|
+
"3. Use observe.* for read-only governance discovery and agent.* for governed actor work.",
|
|
300
|
+
"4. Build governed submissions through approved Airlock/Snowflake access paths.",
|
|
269
301
|
]
|
|
270
302
|
)
|
|
271
303
|
return "\n".join(lines)
|
|
@@ -111,6 +111,22 @@ Identify:
|
|
|
111
111
|
- the Airlock access path available in this environment
|
|
112
112
|
- identity, evidence, timestamp, approval, and separation-of-duties rules
|
|
113
113
|
|
|
114
|
+
Installed Airlock separates procedure intent:
|
|
115
|
+
|
|
116
|
+
- `observe.*`: read-only governance observation for discovery, health, access
|
|
117
|
+
explanation, governance maps, activity, billing events, and context packets.
|
|
118
|
+
- `agent.*`: governed agent work in the actor's scope.
|
|
119
|
+
- `admin.*`: administrative mutation and operational changes.
|
|
120
|
+
|
|
121
|
+
For app-first work, use observe payloads such as `observe.procedures`,
|
|
122
|
+
`observe.specs`, `observe.spec`, `observe.governance_map`,
|
|
123
|
+
`observe.explain_access`, `observe.health`, `observe.activity`,
|
|
124
|
+
`observe.admin_activity`, `observe.spec_admin_activity`, and
|
|
125
|
+
`observe.billing_events` before inventing custom read paths. For `alter_spec`
|
|
126
|
+
activity, use `CHANGED_SECTIONS` and `CHANGED_FIELDS` to triage what changed
|
|
127
|
+
before fetching version snapshots. Do not call retired admin read wrappers such as `admin.list_specs`, `admin.describe_role`,
|
|
128
|
+
or `admin.list_events`; use the matching observe list/detail procedure.
|
|
129
|
+
|
|
114
130
|
The app may orient the user with summaries, comparisons, rankings, exception
|
|
115
131
|
queues, proposals, or dashboards. It should submit governed choices back
|
|
116
132
|
through an Airlock spec contract. Do not write directly to Airlock-owned tables,
|
|
@@ -247,6 +247,7 @@ def workspace_summary(
|
|
|
247
247
|
f" owner_role: {_format_value(core.get('owner_role'))}",
|
|
248
248
|
f" published: {_format_value(core.get('is_published'))}",
|
|
249
249
|
f" archived: {_format_value(core.get('is_archived'))}",
|
|
250
|
+
f" payload_adapter: {_format_value(core.get('payload_adapter'), default='default')}",
|
|
250
251
|
f" description: {_truncate(core.get('description')) or 'none'}",
|
|
251
252
|
"",
|
|
252
253
|
"file_rules:",
|
package/src/mcp.mjs
CHANGED
|
@@ -44,7 +44,7 @@ export function handleMcpRequest(message) {
|
|
|
44
44
|
},
|
|
45
45
|
serverInfo: {
|
|
46
46
|
name: "airlock",
|
|
47
|
-
version: "0.1.
|
|
47
|
+
version: "0.1.4",
|
|
48
48
|
},
|
|
49
49
|
instructions:
|
|
50
50
|
"Airlock MCP helps agents improve processes with Airlock specs and build apps or workflows that use existing specs. Use airlock_start for orientation or the airlock_* tools to bootstrap, draft, check, summarize, export, and render specs.",
|
package/src/text.mjs
CHANGED
|
@@ -53,10 +53,21 @@ and a plan for more. Do not create the first workspace until I choose a path.
|
|
|
53
53
|
|
|
54
54
|
If I want app-first or co-development, ask for the app goal, the specs I can
|
|
55
55
|
access, which specs are read sources, which spec records decisions or actions,
|
|
56
|
-
and where the app should run.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
and where the app should run. Teach the installed Airlock procedure split:
|
|
57
|
+
\`airlock.observe.*\` is read-only governance observation,
|
|
58
|
+
\`airlock.agent.*\` is governed agent work, and \`airlock.admin.*\` is
|
|
59
|
+
administrative mutation. Prefer observe payloads such as
|
|
60
|
+
\`observe.procedures\`, \`observe.specs\`, \`observe.spec\`,
|
|
61
|
+
\`observe.governance_map\`, \`observe.explain_access\`, \`observe.health\`,
|
|
62
|
+
\`observe.activity\`, \`observe.admin_activity\`, \`observe.spec_admin_activity\`,
|
|
63
|
+
and \`observe.billing_events\` before inventing custom read paths. For \`alter_spec\`
|
|
64
|
+
activity, use \`CHANGED_SECTIONS\` and \`CHANGED_FIELDS\` to triage what changed
|
|
65
|
+
before fetching version snapshots. Offer to run \`airlock-mcp init-app-context\`
|
|
66
|
+
in the app repo to seed \`airlock/specs.manifest.json\`, spec snapshots, sample records, and
|
|
67
|
+
generated helper folders. Help code the app using approved Airlock/Snowflake access paths.
|
|
68
|
+
Do not use retired admin read wrappers such as
|
|
69
|
+
\`admin.list_specs\`, \`admin.describe_role\`, or \`admin.list_events\`; use
|
|
70
|
+
the matching observe procedure. Do not write directly to Airlock-owned tables
|
|
60
71
|
or bypass spec workflow.`;
|
|
61
72
|
}
|
|
62
73
|
|
|
@@ -78,11 +89,13 @@ Airlock MCP will offer:
|
|
|
78
89
|
- spec-first, app-first, and co-development planning
|
|
79
90
|
- spec design with the bundled workbench
|
|
80
91
|
- Airlock operating patterns for OODA loops and separation of duties
|
|
92
|
+
- read-only observe procedures for governance maps, health, access explanation, activity, billing events, and context packets
|
|
81
93
|
- app context seeding with spec snapshots and manifests
|
|
82
94
|
- app and workflow coding against existing Airlock specs
|
|
83
95
|
- observe specs for controlled interface ingestion
|
|
84
96
|
- orient specs for proposals, context, scoring, or exception queues
|
|
85
97
|
- decision specs and action specs for governed follow-through
|
|
98
|
+
- OKF-style Markdown knowledge bundles for accepted agent context
|
|
86
99
|
- artifact-grounded drafts from CSV, Excel, JSON, API docs, schemas, forms, screenshots, PDFs, or exports
|
|
87
100
|
- airlock-specs library patterns as starting points, checked against current artifacts`;
|
|
88
101
|
}
|
|
@@ -95,7 +108,7 @@ Airlock. It helps a person and their agent improve processes by designing
|
|
|
95
108
|
specs, using specs for governed data movement, planning OODA loops, and building
|
|
96
109
|
apps or workflows that read from and submit through existing specs.
|
|
97
110
|
|
|
98
|
-
Airlock MCP gives agents
|
|
111
|
+
Airlock MCP gives agents four kinds of Airlock help:
|
|
99
112
|
|
|
100
113
|
1. Spec design: draft, check, revise, import, clone, and prepare specs for
|
|
101
114
|
installed Airlock validation.
|
|
@@ -105,6 +118,10 @@ Airlock MCP gives agents three kinds of Airlock help:
|
|
|
105
118
|
3. App and workflow implementation: build dashboards, queues, decision UIs,
|
|
106
119
|
analyses, and agent workflows that use existing specs without bypassing
|
|
107
120
|
Airlock contracts.
|
|
121
|
+
4. Governance observation: use installed Airlock's read-only \`observe.*\`
|
|
122
|
+
procedures to inspect setup, access, activity, billing events, health,
|
|
123
|
+
context packets, and governance maps before deciding what an app or agent
|
|
124
|
+
should do.
|
|
108
125
|
|
|
109
126
|
Start in a Git-backed specs repo such as ${specsRepoName(project)}. GitHub is
|
|
110
127
|
the recommended default when the user has it set up, but any normal repository
|
|
@@ -146,15 +163,33 @@ points, patterns, and ideas. Library specs are not guaranteed to match the
|
|
|
146
163
|
current shape of any third-party system. Prefer current API docs, real exports,
|
|
147
164
|
samples, and other artifacts when they conflict with the library.
|
|
148
165
|
|
|
166
|
+
For governed Markdown knowledge, use the \`okf-knowledge-bundle\` pattern. It
|
|
167
|
+
creates a spec with \`core_config.payload_adapter\` set to
|
|
168
|
+
\`okf_knowledge_bundle\`. Installed Airlock loads locally validated bundles with
|
|
169
|
+
\`airlock.admin.load_okf_bundle(...)\`, can sync parsed metadata with
|
|
170
|
+
\`airlock.admin.sync_okf_bundle_metadata(...)\`, and exposes authoritative
|
|
171
|
+
accepted context through \`AIRLOCK_DATA.ACTIVE.V_OKF_CONCEPT_METADATA\`.
|
|
172
|
+
|
|
149
173
|
Give Codex the messy version of the process. Airlock MCP should help turn it
|
|
150
174
|
into a small first Airlock spec and a plan for more.
|
|
151
175
|
|
|
152
176
|
For app-first and co-development work, give Codex the app goal and available
|
|
153
177
|
specs. Airlock MCP should identify read specs, write specs, orienting views,
|
|
154
|
-
decision capture, and safe Airlock/Snowflake access paths.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
178
|
+
decision capture, and safe Airlock/Snowflake access paths. Installed Airlock
|
|
179
|
+
uses \`observe.*\` for read-only governance observation, \`agent.*\` for
|
|
180
|
+
governed agent work, and \`admin.*\` for administrative mutation. Start
|
|
181
|
+
read-side discovery with observe payloads such as \`observe.procedures\`,
|
|
182
|
+
\`observe.specs\`, \`observe.spec\`, \`observe.governance_map\`,
|
|
183
|
+
\`observe.explain_access\`, \`observe.health\`, \`observe.activity\`,
|
|
184
|
+
\`observe.admin_activity\`, \`observe.spec_admin_activity\`, and \`observe.billing_events\`;
|
|
185
|
+
for \`alter_spec\` activity, use \`CHANGED_SECTIONS\` and \`CHANGED_FIELDS\` to
|
|
186
|
+
triage what changed before fetching version snapshots. Do not use retired admin
|
|
187
|
+
read wrappers such as \`admin.list_specs\`, \`admin.describe_role\`, or
|
|
188
|
+
\`admin.list_events\`. It can
|
|
189
|
+
seed an app repo with \`airlock/specs.manifest.json\`, spec snapshots, sample
|
|
190
|
+
records, and generated helper folders. The app should submit decisions,
|
|
191
|
+
approvals, actions, comments, or follow-ups through Airlock spec contracts, not
|
|
192
|
+
direct table writes.
|
|
158
193
|
In co-development mode, keep the spec track and app track visible side by side.`;
|
|
159
194
|
}
|
|
160
195
|
|
package/src/workbench.mjs
CHANGED
|
@@ -82,7 +82,7 @@ export const WORKBENCH_TOOLS = [
|
|
|
82
82
|
{
|
|
83
83
|
pattern: {
|
|
84
84
|
type: "string",
|
|
85
|
-
enum: ["blank", "posts"],
|
|
85
|
+
enum: ["blank", "okf-knowledge-bundle", "posts"],
|
|
86
86
|
description: "Pattern to inspect.",
|
|
87
87
|
},
|
|
88
88
|
files: {
|
|
@@ -106,7 +106,7 @@ export const WORKBENCH_TOOLS = [
|
|
|
106
106
|
},
|
|
107
107
|
pattern: {
|
|
108
108
|
type: "string",
|
|
109
|
-
enum: ["blank", "posts"],
|
|
109
|
+
enum: ["blank", "okf-knowledge-bundle", "posts"],
|
|
110
110
|
description: "Starting pattern. Defaults to blank.",
|
|
111
111
|
},
|
|
112
112
|
output: {
|