@reunionstudio/airlock-mcp 0.1.0
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 +122 -0
- package/.agents/skills/airlock-mcp/agents/openai.yaml +4 -0
- package/LICENSE +187 -0
- package/README.md +126 -0
- package/SECURITY.md +31 -0
- package/bin/airlock-mcp.mjs +5 -0
- package/docs/architecture.md +82 -0
- package/docs/install-surface.md +112 -0
- package/docs/ooda-loop.md +40 -0
- package/docs/spec-workbench-architecture.md +161 -0
- package/docs/spec-workspace.md +33 -0
- package/docs/workflows.md +229 -0
- package/package.json +46 -0
- package/patterns/blank/README.md +14 -0
- package/patterns/blank/sample.records.json +19 -0
- package/patterns/blank/spec.config.json +72 -0
- package/patterns/guest-access/individual-isolation.md +27 -0
- package/patterns/guest-access/role-isolation.md +26 -0
- package/patterns/guest-access/shared-contribution.md +25 -0
- package/patterns/manifest.json +16 -0
- package/patterns/spec-types/commitment.md +24 -0
- package/patterns/spec-types/observation.md +22 -0
- package/patterns/spec-types/reconciliation.md +19 -0
- package/patterns/spec-types/reference-master-data.md +21 -0
- package/patterns/starter-posts/README.md +32 -0
- package/patterns/starter-posts/sample.records.json +27 -0
- package/patterns/starter-posts/spec.config.json +135 -0
- package/schemas/airlock-mcp-workspace.schema.json +14 -0
- package/setup.py +41 -0
- package/src/airlock_mcp/__init__.py +3 -0
- package/src/airlock_mcp/__main__.py +5 -0
- package/src/airlock_mcp/art.py +26 -0
- package/src/airlock_mcp/bootstrap.py +161 -0
- package/src/airlock_mcp/cli.py +450 -0
- package/src/airlock_mcp/jsonio.py +56 -0
- package/src/airlock_mcp/manage.py +247 -0
- package/src/airlock_mcp/models.py +43 -0
- package/src/airlock_mcp/patterns.py +49 -0
- package/src/airlock_mcp/project.py +39 -0
- package/src/airlock_mcp/records.py +43 -0
- package/src/airlock_mcp/specs.py +110 -0
- package/src/airlock_mcp/sql.py +15 -0
- package/src/airlock_mcp/summary.py +115 -0
- package/src/airlock_mcp/updater.py +76 -0
- package/src/airlock_mcp/validation.py +334 -0
- package/src/airlock_mcp/workspace.py +223 -0
- package/src/cli.mjs +89 -0
- package/src/install.mjs +100 -0
- package/src/mcp.mjs +184 -0
- package/src/text.mjs +108 -0
- package/src/workbench.mjs +368 -0
- package/workspaces/_template/brief.md +18 -0
- package/workspaces/_template/decisions.md +40 -0
- package/workspaces/_template/questions.md +9 -0
- package/workspaces/_template/review.md +21 -0
- package/workspaces/_template/sample.records.json +19 -0
- package/workspaces/_template/spec.config.json +72 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: airlock-mcp
|
|
3
|
+
description: Design, draft, review, and iterate Airlock specs in the Airlock MCP spec-building workbench. Use when Codex is helping a person choose a small starting spec, work through row grain and OODA-loop decisions, import reusable patterns such as posts or guest access setups, validate local draft files, or prepare an Airlock spec config before installed Airlock validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Airlock MCP Spec Builder
|
|
7
|
+
|
|
8
|
+
Use this skill to help a human develop Airlock specs over multiple sessions.
|
|
9
|
+
The repo is the workbench; Codex is the conversational interface; the CLI is
|
|
10
|
+
the deterministic checker.
|
|
11
|
+
|
|
12
|
+
## Default Path
|
|
13
|
+
|
|
14
|
+
1. Read the target workspace files if they exist:
|
|
15
|
+
`brief.md`, `decisions.md`, `questions.md`, `spec.config.json`,
|
|
16
|
+
`sample.records.json`, and `review.md`.
|
|
17
|
+
2. If the current repo is not yet an Airlock MCP specs repo, run or suggest:
|
|
18
|
+
`airlock-mcp init-repo`.
|
|
19
|
+
When helping create that repo from scratch, ask for the project or
|
|
20
|
+
organization name and suggest `<slug>-specs`; for example, `Home` becomes
|
|
21
|
+
`home-specs`. Reserve `airlock-specs` for the canonical reusable spec
|
|
22
|
+
library.
|
|
23
|
+
Public users should normally arrive through the single Airlock MCP install,
|
|
24
|
+
then ask Airlock to help build and use specs. Treat spec-building as a
|
|
25
|
+
capability inside that experience, not a second install.
|
|
26
|
+
If the user is in a blank specs project and provides the public Airlock MCP
|
|
27
|
+
GitHub URL, fetch or install Airlock MCP from that URL, run
|
|
28
|
+
`airlock-mcp init-repo` in the current project, then orient before creating
|
|
29
|
+
any workspace.
|
|
30
|
+
If the user opened the public `airlock-mcp` workbench repo as the entry
|
|
31
|
+
point, help them create a separate `<slug>-specs` project repo beside it.
|
|
32
|
+
3. If no workspace exists, welcome the user and offer three starting paths
|
|
33
|
+
before creating files:
|
|
34
|
+
- brainstorm possible specs using the OODA loop
|
|
35
|
+
- start from a known process and create a blank workspace
|
|
36
|
+
- create a `posts` feedback loop where humans and agents can submit
|
|
37
|
+
requests, observations, and responses
|
|
38
|
+
4. Create `posts` only when the user chooses a feedback loop, asks for humans
|
|
39
|
+
and agents to provide feedback, or explicitly requests the posts pattern.
|
|
40
|
+
If the user is unsure, offer OODA brainstorming first.
|
|
41
|
+
5. Use `airlock-mcp import-spec <json-file> <name>` when starting from a
|
|
42
|
+
spec-library file, an exported `SPEC_CONFIG`, or an existing canonical config.
|
|
43
|
+
6. Use `airlock-mcp clone <source-workspace> <name>` when creating a related
|
|
44
|
+
draft from an existing workspace. Treat clone like the old Streamlit UI:
|
|
45
|
+
preserve the shape but deliberately reset spec identity.
|
|
46
|
+
7. Keep the draft small. Prefer one useful governed output over a large
|
|
47
|
+
speculative system.
|
|
48
|
+
8. On later sessions, run `airlock-mcp list-workspaces` when the target draft
|
|
49
|
+
is not obvious.
|
|
50
|
+
9. Run `airlock-mcp summary <workspace>` and
|
|
51
|
+
`airlock-mcp next <workspace>` before editing so
|
|
52
|
+
the current shape, sample count, access model, and local check status are
|
|
53
|
+
visible.
|
|
54
|
+
10. Run `airlock-mcp check <workspace>` after changing draft config or sample
|
|
55
|
+
records.
|
|
56
|
+
11. Keep `sample.records.json` as the agent-friendly authoring shape. Use
|
|
57
|
+
`airlock-mcp export-csv <workspace>` when the same examples need to be
|
|
58
|
+
reviewed or loaded through Airlock's CSV path.
|
|
59
|
+
12. Use `airlock-mcp rename`, `archive`, and `restore` when organizing
|
|
60
|
+
workspaces so spec identity changes remain deliberate.
|
|
61
|
+
13. Use `airlock-mcp render-sql <workspace>` only as a validate-only review
|
|
62
|
+
artifact. Installed Airlock validation remains authoritative.
|
|
63
|
+
|
|
64
|
+
## Spec Design Questions
|
|
65
|
+
|
|
66
|
+
Resolve these in order, and write the answers into `decisions.md`:
|
|
67
|
+
|
|
68
|
+
1. What is one row about?
|
|
69
|
+
2. What systems, users, files, events, or reference data must be observed before
|
|
70
|
+
a decision can be made?
|
|
71
|
+
3. What decision will the spec support?
|
|
72
|
+
4. What action follows that decision?
|
|
73
|
+
5. Must the action be human-done, agent-assisted, or automated?
|
|
74
|
+
6. What durable identifiers survive retries and reloads?
|
|
75
|
+
7. What business event timestamps differ from Airlock load time?
|
|
76
|
+
8. What evidence belongs as Airlock attachments?
|
|
77
|
+
9. Which facts must be typed columns because people will filter, join, audit,
|
|
78
|
+
aggregate, or report on them?
|
|
79
|
+
10. Which optional context can live in a validated `variant` field?
|
|
80
|
+
11. Who submits, reviews, reads, delegates, and owns the process?
|
|
81
|
+
|
|
82
|
+
## OODA Loop
|
|
83
|
+
|
|
84
|
+
Use the observe-orient-decide-act loop as the product frame:
|
|
85
|
+
|
|
86
|
+
- Observe: source systems, human signals, files, screenshots, exports, APIs,
|
|
87
|
+
reference specs, and prior Airlock outputs.
|
|
88
|
+
- Orient: row grain, field types, access model, evidence, workflow, references,
|
|
89
|
+
expectations, and risk.
|
|
90
|
+
- Decide: the smallest governed output worth creating now.
|
|
91
|
+
- Act: validate locally, create in Airlock, collect real records, then extend or
|
|
92
|
+
add the next spec based on feedback.
|
|
93
|
+
|
|
94
|
+
## Pattern Guidance
|
|
95
|
+
|
|
96
|
+
Read only the relevant pattern files:
|
|
97
|
+
|
|
98
|
+
- `patterns/starter-posts/` when the user needs a first feedback loop.
|
|
99
|
+
- `patterns/guest-access/` when isolation or sharing is the hard part.
|
|
100
|
+
- `patterns/spec-types/` when choosing observation, commitment,
|
|
101
|
+
reconciliation, or reference/master-data shape.
|
|
102
|
+
- `docs/workflows.md` when the user asks how create, import, clone, check, or
|
|
103
|
+
render-SQL fit together.
|
|
104
|
+
- `docs/architecture.md` when changing the CLI architecture.
|
|
105
|
+
|
|
106
|
+
When adapting a pattern, report the source pattern, what changed, and which
|
|
107
|
+
human decisions remain.
|
|
108
|
+
|
|
109
|
+
## Airlock Boundaries
|
|
110
|
+
|
|
111
|
+
- Local checks are not Airlock authority.
|
|
112
|
+
- Installed Airlock procedures remain the execution contract.
|
|
113
|
+
- Do not write directly to Airlock-owned tables, stages, generated views, or
|
|
114
|
+
generated tables.
|
|
115
|
+
- Do not put Airlock workflow state, reviewer comments, approval status, or
|
|
116
|
+
pushback notes into submitted payload columns unless they are true upstream
|
|
117
|
+
facts from another system.
|
|
118
|
+
- Use attachments for screenshots, receipts, PDFs, exports, and other evidence
|
|
119
|
+
files. Store only evidence metadata in payload fields.
|
|
120
|
+
- Airlock MCP is the single installed interface for agents. This workbench helps
|
|
121
|
+
build specs; installed Airlock remains the authority for validating, creating,
|
|
122
|
+
loading, reading, and push/pull workflows through specs.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 Reunion Studio
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
12
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
|
15
|
+
owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
|
18
|
+
that control, are controlled by, or are under common control with that entity.
|
|
19
|
+
For the purposes of this definition, "control" means (i) the power, direct or
|
|
20
|
+
indirect, to cause the direction or management of such entity, whether by
|
|
21
|
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
25
|
+
permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications, including
|
|
28
|
+
but not limited to software source code, documentation source, and configuration
|
|
29
|
+
files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
32
|
+
translation of a Source form, including but not limited to compiled object code,
|
|
33
|
+
generated documentation, and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or Object form,
|
|
36
|
+
made available under the License, as indicated by a copyright notice that is
|
|
37
|
+
included in or attached to the work (an example is provided in the Appendix
|
|
38
|
+
below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
|
41
|
+
is based on (or derived from) the Work and for which the editorial revisions,
|
|
42
|
+
annotations, elaborations, or other modifications represent, as a whole, an
|
|
43
|
+
original work of authorship. For the purposes of this License, Derivative Works
|
|
44
|
+
shall not include works that remain separable from, or merely link (or bind by
|
|
45
|
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including the original version
|
|
48
|
+
of the Work and any modifications or additions to that Work or Derivative Works
|
|
49
|
+
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
|
50
|
+
by the copyright owner or by an individual or Legal Entity authorized to submit
|
|
51
|
+
on behalf of the copyright owner. For the purposes of this definition,
|
|
52
|
+
"submitted" means any form of electronic, verbal, or written communication sent
|
|
53
|
+
to the Licensor or its representatives, including but not limited to
|
|
54
|
+
communication on electronic mailing lists, source code control systems, and
|
|
55
|
+
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
|
56
|
+
the purpose of discussing and improving the Work, but excluding communication
|
|
57
|
+
that is conspicuously marked or otherwise designated in writing by the copyright
|
|
58
|
+
owner as "Not a Contribution."
|
|
59
|
+
|
|
60
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
|
61
|
+
of whom a Contribution has been received by Licensor and subsequently
|
|
62
|
+
incorporated within the Work.
|
|
63
|
+
|
|
64
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
65
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
66
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
67
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
68
|
+
sublicense, and distribute the Work and such Derivative Works in Source or
|
|
69
|
+
Object form.
|
|
70
|
+
|
|
71
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License,
|
|
72
|
+
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
73
|
+
no-charge, royalty-free, irrevocable (except as stated in this section) patent
|
|
74
|
+
license to make, have made, use, offer to sell, sell, import, and otherwise
|
|
75
|
+
transfer the Work, where such license applies only to those patent claims
|
|
76
|
+
licensable by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by combination of their Contribution(s) with the Work
|
|
78
|
+
to which such Contribution(s) was submitted. If You institute patent litigation
|
|
79
|
+
against any entity (including a cross-claim or counterclaim in a lawsuit)
|
|
80
|
+
alleging that the Work or a Contribution incorporated within the Work
|
|
81
|
+
constitutes direct or contributory patent infringement, then any patent licenses
|
|
82
|
+
granted to You under this License for that Work shall terminate as of the date
|
|
83
|
+
such litigation is filed.
|
|
84
|
+
|
|
85
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
86
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
87
|
+
Source or Object form, provided that You meet the following conditions:
|
|
88
|
+
|
|
89
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy
|
|
90
|
+
of this License; and
|
|
91
|
+
|
|
92
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
93
|
+
You changed the files; and
|
|
94
|
+
|
|
95
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
96
|
+
distribute, all copyright, patent, trademark, and attribution notices from
|
|
97
|
+
the Source form of the Work, excluding those notices that do not pertain
|
|
98
|
+
to any part of the Derivative Works; and
|
|
99
|
+
|
|
100
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution,
|
|
101
|
+
then any Derivative Works that You distribute must include a readable copy
|
|
102
|
+
of the attribution notices contained within such NOTICE file, excluding
|
|
103
|
+
those notices that do not pertain to any part of the Derivative Works, in
|
|
104
|
+
at least one of the following places: within a NOTICE text file
|
|
105
|
+
distributed as part of the Derivative Works; within the Source form or
|
|
106
|
+
documentation, if provided along with the Derivative Works; or, within a
|
|
107
|
+
display generated by the Derivative Works, if and wherever such
|
|
108
|
+
third-party notices normally appear. The contents of the NOTICE file are
|
|
109
|
+
for informational purposes only and do not modify the License. You may add
|
|
110
|
+
Your own attribution notices within Derivative Works that You distribute,
|
|
111
|
+
alongside or as an addendum to the NOTICE text from the Work, provided
|
|
112
|
+
that such additional attribution notices cannot be construed as modifying
|
|
113
|
+
the License.
|
|
114
|
+
|
|
115
|
+
You may add Your own copyright statement to Your modifications and may
|
|
116
|
+
provide additional or different license terms and conditions for use,
|
|
117
|
+
reproduction, or distribution of Your modifications, or for any such
|
|
118
|
+
Derivative Works as a whole, provided Your use, reproduction, and distribution
|
|
119
|
+
of the Work otherwise complies with the conditions stated in this License.
|
|
120
|
+
|
|
121
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
122
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
123
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
124
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
125
|
+
supersede or modify the terms of any separate license agreement you may have
|
|
126
|
+
executed with Licensor regarding such Contributions.
|
|
127
|
+
|
|
128
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
129
|
+
trademarks, service marks, or product names of the Licensor, except as required
|
|
130
|
+
for reasonable and customary use in describing the origin of the Work and
|
|
131
|
+
reproducing the content of the NOTICE file.
|
|
132
|
+
|
|
133
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
134
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
135
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
136
|
+
KIND, either express or implied, including, without limitation, any warranties or
|
|
137
|
+
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
138
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
139
|
+
appropriateness of using or redistributing the Work and assume any risks
|
|
140
|
+
associated with Your exercise of permissions under this License.
|
|
141
|
+
|
|
142
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
143
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
144
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to in
|
|
145
|
+
writing, shall any Contributor be liable to You for damages, including any
|
|
146
|
+
direct, indirect, special, incidental, or consequential damages of any character
|
|
147
|
+
arising as a result of this License or out of the use or inability to use the
|
|
148
|
+
Work (including but not limited to damages for loss of goodwill, work stoppage,
|
|
149
|
+
computer failure or malfunction, or any and all other commercial damages or
|
|
150
|
+
losses), even if such Contributor has been advised of the possibility of such
|
|
151
|
+
damages.
|
|
152
|
+
|
|
153
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
154
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
155
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
156
|
+
and/or rights consistent with this License. However, in accepting such
|
|
157
|
+
obligations, You may act only on Your own behalf and on Your sole
|
|
158
|
+
responsibility, not on behalf of any other Contributor, and only if You agree to
|
|
159
|
+
indemnify, defend, and hold each Contributor harmless for any liability incurred
|
|
160
|
+
by, or claims asserted against, such Contributor by reason of your accepting any
|
|
161
|
+
such warranty or additional liability.
|
|
162
|
+
|
|
163
|
+
END OF TERMS AND CONDITIONS
|
|
164
|
+
|
|
165
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
166
|
+
|
|
167
|
+
To apply the Apache License to your work, attach the following boilerplate
|
|
168
|
+
notice, with the fields enclosed by brackets "[]" replaced with your own
|
|
169
|
+
identifying information. (Don't include the brackets!) The text should be
|
|
170
|
+
enclosed in the appropriate comment syntax for the file format. We also
|
|
171
|
+
recommend that a file or class name and description of purpose be included on
|
|
172
|
+
the same "printed page" as the copyright notice for easier identification within
|
|
173
|
+
third-party archives.
|
|
174
|
+
|
|
175
|
+
Copyright [yyyy] [name of copyright owner]
|
|
176
|
+
|
|
177
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
178
|
+
you may not use this file except in compliance with the License.
|
|
179
|
+
You may obtain a copy of the License at
|
|
180
|
+
|
|
181
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
182
|
+
|
|
183
|
+
Unless required by applicable law or agreed to in writing, software
|
|
184
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
185
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
186
|
+
See the License for the specific language governing permissions and
|
|
187
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Airlock MCP
|
|
2
|
+
|
|
3
|
+
Airlock MCP is the single installed interface for AI agents working with
|
|
4
|
+
Airlock.
|
|
5
|
+
|
|
6
|
+
It covers the full Airlock loop:
|
|
7
|
+
|
|
8
|
+
- build specs with the bundled spec-building workbench
|
|
9
|
+
- use specs to pull and push governed data with the Airlock Star capability
|
|
10
|
+
- validate, create, and revise specs against installed Airlock
|
|
11
|
+
- capture real use cases and improvements so specs get better over time
|
|
12
|
+
|
|
13
|
+
Spec building is not a second thing users install. It is bundled inside
|
|
14
|
+
Airlock MCP.
|
|
15
|
+
|
|
16
|
+
Airlock Star is not a second thing users install either. It is the capability
|
|
17
|
+
inside Airlock MCP for working through real Airlock use cases,
|
|
18
|
+
pulling and pushing data through specs, reading outputs, and turning experience
|
|
19
|
+
back into better specs.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
Dogfood directly from GitHub:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx -y github:reunionstudio/airlock-mcp install --package github:reunionstudio/airlock-mcp
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
After the npm package is published, use:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npx @reunionstudio/airlock-mcp install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Today this package is a small installer and MCP launcher. For Codex, install
|
|
36
|
+
registers a local stdio server with:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
codex mcp add airlock -- npx -y @reunionstudio/airlock-mcp server
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The GitHub dogfood command registers:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
codex mcp add airlock -- npx -y github:reunionstudio/airlock-mcp server
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The server exposes bootstrap guidance for starting a specs repo and entering
|
|
49
|
+
the bundled spec-building workbench or the Airlock Star use-and-improve
|
|
50
|
+
capability.
|
|
51
|
+
|
|
52
|
+
This install shape uses Node because `npx` runs npm package binaries. MCP itself
|
|
53
|
+
does not require Node. Once Airlock MCP does real operational work, such as
|
|
54
|
+
validating specs, loading records, handling attachments, reading outputs, and
|
|
55
|
+
coordinating push/pull workflows, the production server should likely be Rust
|
|
56
|
+
with `rmcp`: single binary, predictable memory and latency, typed tool
|
|
57
|
+
contracts, and no Node/Python runtime for the long-running process. The npm
|
|
58
|
+
package can remain the friendly installer.
|
|
59
|
+
|
|
60
|
+
For stdio MCP, stdout is protocol-only. Logs and diagnostics must go to stderr.
|
|
61
|
+
|
|
62
|
+
## Test
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npm test
|
|
66
|
+
node -c bin/airlock-mcp.mjs
|
|
67
|
+
python3 -m json.tool package.json
|
|
68
|
+
PYTHONPATH=src python3 -m unittest discover
|
|
69
|
+
PYTHONPATH=src python3 -m airlock_mcp doctor
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The smoke test verifies install dry-run output and the stdio MCP handshake for
|
|
73
|
+
`initialize`, `tools/list`, `prompts/list`, `resources/list`, prompt reads,
|
|
74
|
+
tool calls, resource reads, unknown methods, malformed input, and install
|
|
75
|
+
argument validation. It also exercises the bundled Python workbench through MCP
|
|
76
|
+
tool calls against a temporary specs repo.
|
|
77
|
+
|
|
78
|
+
## MCP Tools
|
|
79
|
+
|
|
80
|
+
The server exposes orientation plus local spec-building tools:
|
|
81
|
+
|
|
82
|
+
- `airlock_start`: return setup guidance for a project.
|
|
83
|
+
- `airlock_doctor`: verify bundled workbench assets.
|
|
84
|
+
- `airlock_init_repo`: bootstrap a blank specs repo.
|
|
85
|
+
- `airlock_list_patterns` and `airlock_show_pattern`: inspect starter patterns.
|
|
86
|
+
- `airlock_init_workspace`: create a workspace from `blank` or `posts`.
|
|
87
|
+
- `airlock_list_workspaces`: inspect active or archived drafts.
|
|
88
|
+
- `airlock_check_workspace`, `airlock_summary`, and `airlock_next`: validate and re-enter a draft.
|
|
89
|
+
- `airlock_export_csv`: render `sample.records.json` as Airlock-ready CSV.
|
|
90
|
+
- `airlock_render_sql`: render validate-only Airlock admin SQL.
|
|
91
|
+
|
|
92
|
+
Workbench tools default to the MCP server working directory and accept an
|
|
93
|
+
optional `cwd` when an agent needs to target a specific specs repo. They launch
|
|
94
|
+
the bundled Python workbench by argv array, not through a shell. Python 3 is
|
|
95
|
+
required for those workbench tools; `airlock_start`, prompts, resources, and
|
|
96
|
+
installer behavior remain pure Node.
|
|
97
|
+
|
|
98
|
+
## Repo Layout
|
|
99
|
+
|
|
100
|
+
- `bin/airlock-mcp.mjs`: executable entry point.
|
|
101
|
+
- `src/cli.mjs`: argument parsing and command dispatch.
|
|
102
|
+
- `src/install.mjs`: Codex MCP registration.
|
|
103
|
+
- `src/mcp.mjs`: JSON-RPC handlers and stdio loop.
|
|
104
|
+
- `src/text.mjs`: prompts and user-facing guidance.
|
|
105
|
+
- `src/airlock_mcp/`: Python spec-building workbench and local checker.
|
|
106
|
+
- `.agents/skills/airlock-mcp/`: repo-scoped Codex skill for spec drafting.
|
|
107
|
+
- `patterns/`: reusable spec and access patterns.
|
|
108
|
+
- `workspaces/`: spec workspace template files.
|
|
109
|
+
- `schemas/`: documented draft shapes.
|
|
110
|
+
- `docs/architecture.md`: architecture and runtime boundaries.
|
|
111
|
+
- `SECURITY.md`: security rules for current and future tools.
|
|
112
|
+
|
|
113
|
+
The intended user flow is:
|
|
114
|
+
|
|
115
|
+
1. Run `npx @reunionstudio/airlock-mcp install` once for the agent environment.
|
|
116
|
+
2. Open Codex.
|
|
117
|
+
3. Create a blank project repo named for the org or project, such as
|
|
118
|
+
`home-specs`.
|
|
119
|
+
4. Ask Codex to use Airlock MCP to help build specs and use specs with
|
|
120
|
+
Airlock Star.
|
|
121
|
+
5. Let Airlock MCP bootstrap the project, welcome the user, and offer the next
|
|
122
|
+
useful path before creating the first workspace.
|
|
123
|
+
|
|
124
|
+
The first workspace should not be created automatically. The spec-building
|
|
125
|
+
workbench should offer OODA brainstorming, a known-process draft, or a shared
|
|
126
|
+
`posts` feedback loop.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
Airlock MCP is an agent-facing connector. Treat every tool as a governed
|
|
4
|
+
operation surface.
|
|
5
|
+
|
|
6
|
+
## Current Bootstrap Server
|
|
7
|
+
|
|
8
|
+
- Uses stdio transport only.
|
|
9
|
+
- Writes only JSON-RPC messages to stdout.
|
|
10
|
+
- Sends diagnostics and install errors to stderr.
|
|
11
|
+
- Uses `spawnSync` without a shell for Codex registration.
|
|
12
|
+
- Validates MCP server names before passing them to `codex mcp add`.
|
|
13
|
+
- Passes npm or GitHub package specs as argv entries, never through a shell.
|
|
14
|
+
- Rejects package specs with whitespace or control characters.
|
|
15
|
+
- Exposes guidance only; it does not read local secrets, call Snowflake, mutate
|
|
16
|
+
files, or contact network services.
|
|
17
|
+
|
|
18
|
+
## Production Rules
|
|
19
|
+
|
|
20
|
+
- Validate all user-supplied paths and identifiers.
|
|
21
|
+
- Restrict local file access to the active specs repo unless the user grants
|
|
22
|
+
broader access.
|
|
23
|
+
- Treat installed Airlock as the authority for validation, mutation, workflow,
|
|
24
|
+
attachments, and governed data movement.
|
|
25
|
+
- Keep Airlock lifecycle state, reviewer state, and approval workflow separate
|
|
26
|
+
from submitted business payloads unless they are true upstream facts.
|
|
27
|
+
- For stdio MCP, never log to stdout.
|
|
28
|
+
- For future Streamable HTTP MCP, bind local servers to localhost, validate
|
|
29
|
+
`Origin`, and require proper authentication.
|
|
30
|
+
|
|
31
|
+
Report security issues privately to the Reunion Studio maintainers.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Airlock MCP is the single installed interface for agents working with Airlock.
|
|
4
|
+
The public command should stay simple:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx @reunionstudio/airlock-mcp install
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Before npm publication, the same shape can run from GitHub:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx -y github:reunionstudio/airlock-mcp install --package github:reunionstudio/airlock-mcp
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The current package is a dependency-light Node installer and bootstrap stdio MCP
|
|
17
|
+
server. It gives agents a standard way to start the Airlock loop while the
|
|
18
|
+
heavier operational tools mature.
|
|
19
|
+
|
|
20
|
+
## Boundaries
|
|
21
|
+
|
|
22
|
+
- `bin/airlock-mcp.mjs`: executable entry point only.
|
|
23
|
+
- `src/cli.mjs`: argument parsing and command dispatch.
|
|
24
|
+
- `src/install.mjs`: Codex MCP registration command construction and execution.
|
|
25
|
+
- `src/mcp.mjs`: JSON-RPC request handling and stdio transport loop.
|
|
26
|
+
- `src/text.mjs`: product language, prompts, repo naming, and guidance text.
|
|
27
|
+
- `test/smoke.mjs`: executable smoke and protocol tests.
|
|
28
|
+
|
|
29
|
+
The spec-building workbench lives in this repo under `src/airlock_mcp`,
|
|
30
|
+
`patterns`, `workspaces`, `schemas`, and `.agents/skills/airlock-mcp`.
|
|
31
|
+
Airlock Star is the use-and-improve capability inside Airlock MCP: real use
|
|
32
|
+
cases, governed pull/push through specs, output review, and improvement capture.
|
|
33
|
+
It is also not a second install.
|
|
34
|
+
|
|
35
|
+
## MCP Surface
|
|
36
|
+
|
|
37
|
+
The bootstrap server exposes:
|
|
38
|
+
|
|
39
|
+
- prompt: `airlock-start`
|
|
40
|
+
- resource: `airlock://getting-started`
|
|
41
|
+
- orientation tool: `airlock_start`
|
|
42
|
+
- workbench tools: `airlock_doctor`, `airlock_init_repo`,
|
|
43
|
+
`airlock_list_patterns`, `airlock_show_pattern`, `airlock_init_workspace`,
|
|
44
|
+
`airlock_list_workspaces`, `airlock_check_workspace`, `airlock_summary`,
|
|
45
|
+
`airlock_next`, `airlock_export_csv`, and `airlock_render_sql`
|
|
46
|
+
|
|
47
|
+
These give the agent enough context to start a blank `<project>-specs` repo,
|
|
48
|
+
enter the spec-building workbench when specs need drafting, enter Star when
|
|
49
|
+
specs need to be used or improved, and avoid creating a first workspace until
|
|
50
|
+
the user chooses a path.
|
|
51
|
+
|
|
52
|
+
Workbench tools call the bundled Python package with argument arrays and a
|
|
53
|
+
controlled `PYTHONPATH`. They do not expose update commands over MCP. Tool
|
|
54
|
+
errors are returned as MCP tool results with `isError` so stdout remains valid
|
|
55
|
+
JSON-RPC.
|
|
56
|
+
|
|
57
|
+
## Stdio Rules
|
|
58
|
+
|
|
59
|
+
MCP stdio messages are newline-delimited JSON-RPC. The server must write only
|
|
60
|
+
valid MCP messages to stdout. Logs and diagnostics belong on stderr.
|
|
61
|
+
|
|
62
|
+
## Install Rules
|
|
63
|
+
|
|
64
|
+
For Codex, install registers:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
codex mcp add airlock -- npx -y @reunionstudio/airlock-mcp server
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The installer uses argument arrays, not shell strings, for execution. Server
|
|
71
|
+
names are allowlisted to letters, numbers, dot, underscore, and hyphen. Package
|
|
72
|
+
specs are passed as argv entries, never through a shell, and are rejected if they
|
|
73
|
+
contain control characters.
|
|
74
|
+
|
|
75
|
+
## Runtime Direction
|
|
76
|
+
|
|
77
|
+
Keep the Node package as the friendly installer and bootstrap launcher.
|
|
78
|
+
|
|
79
|
+
Prefer Rust with `rmcp` for the production Airlock MCP server once tools do
|
|
80
|
+
real operational work: validating specs, loading records, reading outputs,
|
|
81
|
+
handling attachments, coordinating push/pull workflows, or serving multiple
|
|
82
|
+
agents concurrently.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Install Surface
|
|
2
|
+
|
|
3
|
+
Airlock should offer a familiar agent-connector install surface without making
|
|
4
|
+
the implementation more clever than the user journey requires.
|
|
5
|
+
|
|
6
|
+
## Recommendation
|
|
7
|
+
|
|
8
|
+
Use an MCP-style public front door:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @reunionstudio/airlock-mcp install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Airlock MCP is the single installed interface for agents working with Airlock.
|
|
15
|
+
Then the user opens Codex, creates a blank `<project>-specs` repo, and starts
|
|
16
|
+
chatting with Airlock. Airlock MCP should cover building specs, using specs to
|
|
17
|
+
pull and push governed data, and capturing improvements from real use cases.
|
|
18
|
+
|
|
19
|
+
The install command is not the spec workspace. It is the connector/setup entry
|
|
20
|
+
point. The specs repo is still the durable memory.
|
|
21
|
+
|
|
22
|
+
The connector package and MCP server live in `reunionstudio/airlock-mcp`.
|
|
23
|
+
This workbench provides the spec-building implementation inside that one
|
|
24
|
+
installed Airlock MCP experience.
|
|
25
|
+
|
|
26
|
+
For Codex, the install command should register a local stdio MCP server using
|
|
27
|
+
Codex's built-in MCP manager:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
codex mcp add airlock -- npx -y @reunionstudio/airlock-mcp server
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## What `npx` Means
|
|
34
|
+
|
|
35
|
+
`npx` is the npm package runner. It runs a command from a local or remote npm
|
|
36
|
+
package. If the requested package is not already available locally, npm can
|
|
37
|
+
fetch it into its cache and put that package's executable on `PATH` for the
|
|
38
|
+
command.
|
|
39
|
+
|
|
40
|
+
That means `npx @reunionstudio/airlock-mcp install` requires Node/npm on the
|
|
41
|
+
user's machine, but does not require them to clone this workbench, install a
|
|
42
|
+
separate spec-building tool, or install a global binary by hand.
|
|
43
|
+
|
|
44
|
+
It is common in MCP examples because many local MCP servers and installers are
|
|
45
|
+
distributed as npm packages, and developers often already have Node tooling.
|
|
46
|
+
It is not required by MCP.
|
|
47
|
+
|
|
48
|
+
## MCP Is Runtime-Agnostic
|
|
49
|
+
|
|
50
|
+
MCP is a protocol, not a Node framework. The server can be written in Node,
|
|
51
|
+
Python, Rust, Go, Java, C#, or another language as long as it speaks the
|
|
52
|
+
protocol over a supported transport.
|
|
53
|
+
|
|
54
|
+
The standard transports to care about first are:
|
|
55
|
+
|
|
56
|
+
- stdio for local agent-launched servers
|
|
57
|
+
- Streamable HTTP for hosted or longer-running servers
|
|
58
|
+
|
|
59
|
+
## Alternatives
|
|
60
|
+
|
|
61
|
+
Viable install surfaces include:
|
|
62
|
+
|
|
63
|
+
- `npx @reunionstudio/airlock-mcp install`: best familiar first impression for agent users
|
|
64
|
+
- `uvx airlock-mcp` or `pipx install ...`: useful for workbench development
|
|
65
|
+
and dogfooding, not the public primary path
|
|
66
|
+
- Homebrew: good for macOS developer installs
|
|
67
|
+
- a signed Rust binary: best for single-file distribution later
|
|
68
|
+
- Docker: useful for controlled server deployments, but heavy for spec drafting
|
|
69
|
+
- hosted Streamable HTTP MCP: useful when Airlock becomes a remote service
|
|
70
|
+
|
|
71
|
+
## Runtime Choice
|
|
72
|
+
|
|
73
|
+
Use Node for the thin public installer and launcher if we want
|
|
74
|
+
`npx @reunionstudio/airlock-mcp install`, because `npx` is specifically an npm/Node
|
|
75
|
+
distribution path. The Node package should stay small: register the MCP server,
|
|
76
|
+
print the next Codex steps, and provide a bootstrap stdio server while the
|
|
77
|
+
runtime is still light.
|
|
78
|
+
|
|
79
|
+
Keep Airlock MCP's drafting CLI in Python for now. The current work is
|
|
80
|
+
Markdown, JSON, CSV, pattern loading, and local validation. Product fit and
|
|
81
|
+
workflow clarity matter more than raw performance.
|
|
82
|
+
|
|
83
|
+
Prefer Rust with `rmcp` for the production Airlock MCP server once the server
|
|
84
|
+
does real work beyond bootstrap guidance, especially Snowflake/Airlock calls,
|
|
85
|
+
workspace scanning, policy checks, loading records, reading outputs, handling
|
|
86
|
+
attachments, push/pull workflows, or multi-agent traffic. The Rust guidance we
|
|
87
|
+
care about:
|
|
88
|
+
|
|
89
|
+
- a single signed binary
|
|
90
|
+
- stronger local distribution ergonomics
|
|
91
|
+
- predictable memory and latency for concurrent agents
|
|
92
|
+
- typed tool contracts and generated JSON schemas
|
|
93
|
+
- no Node or Python runtime dependency for the long-running server
|
|
94
|
+
- stricter supply-chain or runtime constraints
|
|
95
|
+
|
|
96
|
+
For stdio MCP servers, stdout is the JSON-RPC protocol channel. Logs, tracing,
|
|
97
|
+
and diagnostics must go to stderr or the client can disconnect. Integration
|
|
98
|
+
tests should send raw JSON-RPC `initialize` and `tools/list` messages to the
|
|
99
|
+
server binary and parse the responses.
|
|
100
|
+
|
|
101
|
+
Do not rewrite the spec-building logic in Rust just to look more performant.
|
|
102
|
+
If we want Rust, use it first as a distribution wrapper or future MCP server,
|
|
103
|
+
then port core spec-building logic only when real performance, security, or
|
|
104
|
+
packaging pressure appears.
|
|
105
|
+
|
|
106
|
+
The first release should optimize the user journey:
|
|
107
|
+
|
|
108
|
+
1. install connector
|
|
109
|
+
2. create blank `<project>-specs` Codex project
|
|
110
|
+
3. bootstrap the spec-building capability when specs need drafting
|
|
111
|
+
4. help the user use specs to validate, load, read, push, and pull data
|
|
112
|
+
5. create the first workspace only after the user chooses a path
|