specfuse-authoring 0.3.1__tar.gz
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.
- specfuse_authoring-0.3.1/.gitignore +23 -0
- specfuse_authoring-0.3.1/LICENSE +201 -0
- specfuse_authoring-0.3.1/NOTICE +6 -0
- specfuse_authoring-0.3.1/PKG-INFO +103 -0
- specfuse_authoring-0.3.1/README.md +85 -0
- specfuse_authoring-0.3.1/examples/hello-orders/README.md +55 -0
- specfuse_authoring-0.3.1/examples/hello-orders/api/specs/v1/common/schemas/PaginationLinks.yaml +8 -0
- specfuse_authoring-0.3.1/generator.lock +12 -0
- specfuse_authoring-0.3.1/handbooks/.gitkeep +0 -0
- specfuse_authoring-0.3.1/handbooks/AI_Access_Policy_Framework.md +325 -0
- specfuse_authoring-0.3.1/handbooks/API_Handbook.md +2830 -0
- specfuse_authoring-0.3.1/handbooks/Arazzo_Handbook.md +1214 -0
- specfuse_authoring-0.3.1/handbooks/AsyncAPI_Handbook.md +1366 -0
- specfuse_authoring-0.3.1/handbooks/Project_File.md +1058 -0
- specfuse_authoring-0.3.1/handbooks/Vendor_Extensions.md +2427 -0
- specfuse_authoring-0.3.1/pyproject.toml +56 -0
- specfuse_authoring-0.3.1/samples/.gitkeep +0 -0
- specfuse_authoring-0.3.1/samples/endpoint-samples.yaml +370 -0
- specfuse_authoring-0.3.1/samples/message-samples.yaml +494 -0
- specfuse_authoring-0.3.1/samples/recipe-samples.yaml +909 -0
- specfuse_authoring-0.3.1/samples/scenario-samples.yaml +1133 -0
- specfuse_authoring-0.3.1/schemas/README.md +90 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/specfuse-arazzo-combined.schema.json +213 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-actors.schema.json +43 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-as.schema.json +8 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-async.schema.json +120 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-doc.schema.json +47 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-mcp.schema.json +45 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-recipe.schema.json +40 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-sample.schema.json +39 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-setup.schema.json +19 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-ui.schema.json +83 -0
- specfuse_authoring-0.3.1/schemas/arazzo-extensions/x-version.schema.json +46 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/arazzoAsActorExists.js +40 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/arazzoFileHomogeneity.js +43 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/arazzoRecipeScenarioExclusion.js +85 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/arazzoSetupForbiddenInRecipes.js +62 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/arazzoUiSelectorBinding.js +41 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncAuditableEventEnvelopeShape.js +113 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncChannelMessageCompleteness.js +70 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncChannelMessageOrphan.js +54 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncContextCoherence.js +63 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncEventNameActionClass.js +81 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncFirstAppearanceCreated.js +58 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncInboxDedupCoherence.js +83 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncSubscriptionFilterEntityCap.js +32 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncSubscriptionScopingMode.js +84 -0
- specfuse_authoring-0.3.1/schemas/spectral/functions/asyncTriggerWhenCoherence.js +84 -0
- specfuse_authoring-0.3.1/schemas/spectral/specfuse-arazzo.yaml +339 -0
- specfuse_authoring-0.3.1/schemas/spectral/specfuse-asyncapi.yaml +955 -0
- specfuse_authoring-0.3.1/schemas/spectral/specfuse-openapi.yaml +1042 -0
- specfuse_authoring-0.3.1/specfuse/authoring/__init__.py +26 -0
- specfuse_authoring-0.3.1/specfuse/authoring/bootstrap.py +208 -0
- specfuse_authoring-0.3.1/specfuse/authoring/cli.py +62 -0
- specfuse_authoring-0.3.1/specfuse/authoring/generator.py +145 -0
- specfuse_authoring-0.3.1/templates/ai-access-policy-template.md +212 -0
- specfuse_authoring-0.3.1/templates/project-init/.gitignore.template +14 -0
- specfuse_authoring-0.3.1/templates/project-init/CLAUDE.md.template +135 -0
- specfuse_authoring-0.3.1/templates/project-init/api/docs/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/async-common/channels/application-events.yaml.template +26 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/async-common/message-traits/common.yaml.template +63 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/async-common/operation-traits/common.yaml.template +20 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/asyncapi.yaml.template +39 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/enums.yaml.template +35 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/headers/common.yaml.template +24 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/parameters/pagination.yaml.template +48 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/parameters/path.yaml.template +36 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/responses/errors.yaml.template +112 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/common/securitySchemes/auth.yaml.template +15 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/async-operations/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/channels/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/events/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/messages/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/models/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/operations/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/domains/{initial-domain}/scenarios/.gitkeep +0 -0
- specfuse_authoring-0.3.1/templates/project-init/api/specs/v1/openapi.yaml.template +63 -0
- specfuse_authoring-0.3.1/templates/project-init/{project-name}-project.json.template +32 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
*.swp
|
|
3
|
+
*.swo
|
|
4
|
+
.idea/
|
|
5
|
+
.vscode/
|
|
6
|
+
node_modules/
|
|
7
|
+
.env
|
|
8
|
+
.env.local
|
|
9
|
+
output/
|
|
10
|
+
*.log
|
|
11
|
+
*.iml
|
|
12
|
+
|
|
13
|
+
# Python packaging
|
|
14
|
+
__pycache__/
|
|
15
|
+
*.py[cod]
|
|
16
|
+
build/
|
|
17
|
+
dist/
|
|
18
|
+
*.egg-info/
|
|
19
|
+
.venv/
|
|
20
|
+
venv/
|
|
21
|
+
# Spectral bundle artifacts
|
|
22
|
+
*.bundle.yaml
|
|
23
|
+
.bundle.yaml
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: specfuse-authoring
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Specfuse authoring kit: handbooks, samples, Claude assets, project bootstrap, and the generator launcher.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Specfuse/authoring
|
|
6
|
+
Project-URL: Source, https://github.com/Specfuse/authoring
|
|
7
|
+
Author: Christian Labonté
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
License-File: NOTICE
|
|
11
|
+
Keywords: arazzo,asyncapi,codegen,openapi,spec-driven,specfuse
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
16
|
+
Requires-Python: >=3.10
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Specfuse Spec-Authoring Kit
|
|
20
|
+
|
|
21
|
+
The upstream contract for [Specfuse](https://github.com/Specfuse) projects. Defines the conventions, vendor extensions, and authoring workflows that the Specfuse code generator consumes to produce backend, frontend, and worker artifacts from OpenAPI 3.0.3 + AsyncAPI 3.0.0 + Arazzo 1.0.1 specifications.
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
Bootstrap a new Specfuse project with the kit's CLI:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pipx install specfuse-authoring # CLI; recommended
|
|
29
|
+
# (or, inside a venv you control: python3 -m pip install specfuse-authoring)
|
|
30
|
+
specfuse-authoring init ~/projects/my-new-project
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
You'll be prompted for the project name, the project token (channel-address prefix), and the initial domain. The CLI substitutes placeholders, scaffolds the authoring contract (handbooks + samples) into `.specfuse/authoring/`, wires the `specfuse-authoring` Claude Code plugin into `.claude/settings.json`, and prints next steps. Pass `--name`/`--token`/`--domain` to run non-interactively.
|
|
34
|
+
|
|
35
|
+
The Claude Code authoring assets (skills + agents) ship as the `specfuse-authoring` plugin in the shared `specfuse` marketplace. `init` auto-wires the plugin, but you install it once in Claude Code with:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
/plugin marketplace add specfuse/specfuse
|
|
39
|
+
/plugin install specfuse-authoring@specfuse
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
To re-sync `.specfuse/authoring/` and re-assert the plugin config in an existing project after a kit update:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
specfuse-authoring refresh ~/projects/existing-project
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Pull newer skills with `/plugin update specfuse-authoring@specfuse`.
|
|
49
|
+
|
|
50
|
+
See [`examples/hello-orders/`](examples/hello-orders/) for a complete worked example.
|
|
51
|
+
|
|
52
|
+
## What's in the kit
|
|
53
|
+
|
|
54
|
+
| Asset | Contents |
|
|
55
|
+
|---|---|
|
|
56
|
+
| **Handbooks** ([`handbooks/`](handbooks/)) | 6 authoritative documents: REST API, AsyncAPI, Arazzo, vendor extensions, AI access policy framework, and the generator's project file. Together these define the full spec-authoring contract. |
|
|
57
|
+
| **Samples** ([`samples/`](samples/)) | 4 canonical YAML templates — endpoints, async messages, scenarios, recipes — that every authored file should pattern-match against. |
|
|
58
|
+
| **Schemas** ([`schemas/`](schemas/)) | Working Spectral rulesets and custom functions for validation under `schemas/spectral/`. CI lints the bundled example against them. |
|
|
59
|
+
| **Templates** ([`templates/`](templates/)) | The `project-init/` skeleton, plus the AI Access Policy template. |
|
|
60
|
+
| **Claude assets** | 5 Claude Code sub-agents and 20 authoring skills (`/specfuse-authoring:design-scenario`, `/specfuse-authoring:design-async`, `/specfuse-authoring:design-recipe`, etc.) that automate spec design. Distributed as the `specfuse-authoring` plugin in the `specfuse/specfuse` marketplace; `init` wires the plugin and scaffolds the contract the skills read into `.specfuse/authoring/`. |
|
|
61
|
+
| **Bundled example** ([`examples/hello-orders/`](examples/hello-orders/)) | A 61-file complete Specfuse project — 2 domains, 3 entities, 1 state-transition event, 1 cross-domain scenario, 2 setup recipes, filled AI access policy, CI workflow. Serves as the kit's regression net. |
|
|
62
|
+
|
|
63
|
+
## Where to start
|
|
64
|
+
|
|
65
|
+
| You want to… | Read first | Then run |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| Bootstrap a new project | [`docs/getting-started.md`](docs/getting-started.md) | `specfuse-authoring init <target-dir>` |
|
|
68
|
+
| Design your first scenario | [`handbooks/Arazzo_Handbook.md`](handbooks/Arazzo_Handbook.md) | `/specfuse-authoring:design-scenario` |
|
|
69
|
+
| Author a new entity or endpoint | [`handbooks/API_Handbook.md`](handbooks/API_Handbook.md) + [`samples/endpoint-samples.yaml`](samples/endpoint-samples.yaml) | (no kit command yet — author by hand) |
|
|
70
|
+
| Design an async event or scheduled job | [`handbooks/AsyncAPI_Handbook.md`](handbooks/AsyncAPI_Handbook.md) + [`samples/message-samples.yaml`](samples/message-samples.yaml) | `/specfuse-authoring:design-async` |
|
|
71
|
+
| Add a setup recipe | [`handbooks/Arazzo_Handbook.md`](handbooks/Arazzo_Handbook.md) §7 + [`samples/recipe-samples.yaml`](samples/recipe-samples.yaml) | `/specfuse-authoring:design-recipe` |
|
|
72
|
+
| Configure AI agent access | [`handbooks/AI_Access_Policy_Framework.md`](handbooks/AI_Access_Policy_Framework.md) + [`templates/ai-access-policy-template.md`](templates/ai-access-policy-template.md) | (copy template into project) |
|
|
73
|
+
| Look up a `x-*` extension | [`handbooks/Vendor_Extensions.md`](handbooks/Vendor_Extensions.md) | — |
|
|
74
|
+
| Configure the generator project file | [`handbooks/Project_File.md`](handbooks/Project_File.md) | — |
|
|
75
|
+
| See a complete worked example | [`examples/hello-orders/README.md`](examples/hello-orders/README.md) | — |
|
|
76
|
+
|
|
77
|
+
## Relationship to other Specfuse repos
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
spec-authoring-kit ◄── this repo (rules, samples, templates)
|
|
81
|
+
▲
|
|
82
|
+
│ consumes
|
|
83
|
+
│
|
|
84
|
+
┌───┴────────────────┐
|
|
85
|
+
│ │
|
|
86
|
+
generator orchestrator
|
|
87
|
+
(Java/Kotlin — (filesystem-based
|
|
88
|
+
produces code multi-agent workflow
|
|
89
|
+
from specs) coordination)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The kit is upstream of both: it defines *what* a Specfuse spec must look like. The generator consumes those specs to emit code. The orchestrator coordinates the multi-agent authoring workflow that produces those specs.
|
|
93
|
+
|
|
94
|
+
## Status
|
|
95
|
+
|
|
96
|
+
**Incubating** (`v0.3.1`), Apache-2.0. Handbooks, samples, schemas, the `project-init` template, the bundled `hello-orders` example, the `specfuse-authoring` plugin (in the `specfuse/specfuse` marketplace), and the `specfuse-authoring` CLI are all in place. Generator-side alignment items are tracked in [`compatibility.md`](compatibility.md#outstanding-generator-side-follow-ups).
|
|
97
|
+
|
|
98
|
+
The kit is distributed on PyPI as `specfuse-authoring` and hosted under [`Specfuse/authoring`](https://github.com/Specfuse/authoring). The code generator it drives is distributed separately as a pinned, checksum-verified release asset (see [`generator.lock`](generator.lock)); `specfuse-authoring generate` resolves, verifies, and runs it on demand.
|
|
99
|
+
|
|
100
|
+
## Additional references
|
|
101
|
+
|
|
102
|
+
- [`compatibility.md`](compatibility.md) — kit ↔ generator version matrix and outstanding generator-side follow-ups.
|
|
103
|
+
- [`provenance.md`](provenance.md) — bug-and-PR history that motivated each vendor extension. Kit-maintainer audit trail; external consumers do not need the referenced PRs to resolve.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Specfuse Spec-Authoring Kit
|
|
2
|
+
|
|
3
|
+
The upstream contract for [Specfuse](https://github.com/Specfuse) projects. Defines the conventions, vendor extensions, and authoring workflows that the Specfuse code generator consumes to produce backend, frontend, and worker artifacts from OpenAPI 3.0.3 + AsyncAPI 3.0.0 + Arazzo 1.0.1 specifications.
|
|
4
|
+
|
|
5
|
+
## Quick start
|
|
6
|
+
|
|
7
|
+
Bootstrap a new Specfuse project with the kit's CLI:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pipx install specfuse-authoring # CLI; recommended
|
|
11
|
+
# (or, inside a venv you control: python3 -m pip install specfuse-authoring)
|
|
12
|
+
specfuse-authoring init ~/projects/my-new-project
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
You'll be prompted for the project name, the project token (channel-address prefix), and the initial domain. The CLI substitutes placeholders, scaffolds the authoring contract (handbooks + samples) into `.specfuse/authoring/`, wires the `specfuse-authoring` Claude Code plugin into `.claude/settings.json`, and prints next steps. Pass `--name`/`--token`/`--domain` to run non-interactively.
|
|
16
|
+
|
|
17
|
+
The Claude Code authoring assets (skills + agents) ship as the `specfuse-authoring` plugin in the shared `specfuse` marketplace. `init` auto-wires the plugin, but you install it once in Claude Code with:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
/plugin marketplace add specfuse/specfuse
|
|
21
|
+
/plugin install specfuse-authoring@specfuse
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
To re-sync `.specfuse/authoring/` and re-assert the plugin config in an existing project after a kit update:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
specfuse-authoring refresh ~/projects/existing-project
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Pull newer skills with `/plugin update specfuse-authoring@specfuse`.
|
|
31
|
+
|
|
32
|
+
See [`examples/hello-orders/`](examples/hello-orders/) for a complete worked example.
|
|
33
|
+
|
|
34
|
+
## What's in the kit
|
|
35
|
+
|
|
36
|
+
| Asset | Contents |
|
|
37
|
+
|---|---|
|
|
38
|
+
| **Handbooks** ([`handbooks/`](handbooks/)) | 6 authoritative documents: REST API, AsyncAPI, Arazzo, vendor extensions, AI access policy framework, and the generator's project file. Together these define the full spec-authoring contract. |
|
|
39
|
+
| **Samples** ([`samples/`](samples/)) | 4 canonical YAML templates — endpoints, async messages, scenarios, recipes — that every authored file should pattern-match against. |
|
|
40
|
+
| **Schemas** ([`schemas/`](schemas/)) | Working Spectral rulesets and custom functions for validation under `schemas/spectral/`. CI lints the bundled example against them. |
|
|
41
|
+
| **Templates** ([`templates/`](templates/)) | The `project-init/` skeleton, plus the AI Access Policy template. |
|
|
42
|
+
| **Claude assets** | 5 Claude Code sub-agents and 20 authoring skills (`/specfuse-authoring:design-scenario`, `/specfuse-authoring:design-async`, `/specfuse-authoring:design-recipe`, etc.) that automate spec design. Distributed as the `specfuse-authoring` plugin in the `specfuse/specfuse` marketplace; `init` wires the plugin and scaffolds the contract the skills read into `.specfuse/authoring/`. |
|
|
43
|
+
| **Bundled example** ([`examples/hello-orders/`](examples/hello-orders/)) | A 61-file complete Specfuse project — 2 domains, 3 entities, 1 state-transition event, 1 cross-domain scenario, 2 setup recipes, filled AI access policy, CI workflow. Serves as the kit's regression net. |
|
|
44
|
+
|
|
45
|
+
## Where to start
|
|
46
|
+
|
|
47
|
+
| You want to… | Read first | Then run |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| Bootstrap a new project | [`docs/getting-started.md`](docs/getting-started.md) | `specfuse-authoring init <target-dir>` |
|
|
50
|
+
| Design your first scenario | [`handbooks/Arazzo_Handbook.md`](handbooks/Arazzo_Handbook.md) | `/specfuse-authoring:design-scenario` |
|
|
51
|
+
| Author a new entity or endpoint | [`handbooks/API_Handbook.md`](handbooks/API_Handbook.md) + [`samples/endpoint-samples.yaml`](samples/endpoint-samples.yaml) | (no kit command yet — author by hand) |
|
|
52
|
+
| Design an async event or scheduled job | [`handbooks/AsyncAPI_Handbook.md`](handbooks/AsyncAPI_Handbook.md) + [`samples/message-samples.yaml`](samples/message-samples.yaml) | `/specfuse-authoring:design-async` |
|
|
53
|
+
| Add a setup recipe | [`handbooks/Arazzo_Handbook.md`](handbooks/Arazzo_Handbook.md) §7 + [`samples/recipe-samples.yaml`](samples/recipe-samples.yaml) | `/specfuse-authoring:design-recipe` |
|
|
54
|
+
| Configure AI agent access | [`handbooks/AI_Access_Policy_Framework.md`](handbooks/AI_Access_Policy_Framework.md) + [`templates/ai-access-policy-template.md`](templates/ai-access-policy-template.md) | (copy template into project) |
|
|
55
|
+
| Look up a `x-*` extension | [`handbooks/Vendor_Extensions.md`](handbooks/Vendor_Extensions.md) | — |
|
|
56
|
+
| Configure the generator project file | [`handbooks/Project_File.md`](handbooks/Project_File.md) | — |
|
|
57
|
+
| See a complete worked example | [`examples/hello-orders/README.md`](examples/hello-orders/README.md) | — |
|
|
58
|
+
|
|
59
|
+
## Relationship to other Specfuse repos
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
spec-authoring-kit ◄── this repo (rules, samples, templates)
|
|
63
|
+
▲
|
|
64
|
+
│ consumes
|
|
65
|
+
│
|
|
66
|
+
┌───┴────────────────┐
|
|
67
|
+
│ │
|
|
68
|
+
generator orchestrator
|
|
69
|
+
(Java/Kotlin — (filesystem-based
|
|
70
|
+
produces code multi-agent workflow
|
|
71
|
+
from specs) coordination)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The kit is upstream of both: it defines *what* a Specfuse spec must look like. The generator consumes those specs to emit code. The orchestrator coordinates the multi-agent authoring workflow that produces those specs.
|
|
75
|
+
|
|
76
|
+
## Status
|
|
77
|
+
|
|
78
|
+
**Incubating** (`v0.3.1`), Apache-2.0. Handbooks, samples, schemas, the `project-init` template, the bundled `hello-orders` example, the `specfuse-authoring` plugin (in the `specfuse/specfuse` marketplace), and the `specfuse-authoring` CLI are all in place. Generator-side alignment items are tracked in [`compatibility.md`](compatibility.md#outstanding-generator-side-follow-ups).
|
|
79
|
+
|
|
80
|
+
The kit is distributed on PyPI as `specfuse-authoring` and hosted under [`Specfuse/authoring`](https://github.com/Specfuse/authoring). The code generator it drives is distributed separately as a pinned, checksum-verified release asset (see [`generator.lock`](generator.lock)); `specfuse-authoring generate` resolves, verifies, and runs it on demand.
|
|
81
|
+
|
|
82
|
+
## Additional references
|
|
83
|
+
|
|
84
|
+
- [`compatibility.md`](compatibility.md) — kit ↔ generator version matrix and outstanding generator-side follow-ups.
|
|
85
|
+
- [`provenance.md`](provenance.md) — bug-and-PR history that motivated each vendor extension. Kit-maintainer audit trail; external consumers do not need the referenced PRs to resolve.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# hello-orders
|
|
2
|
+
|
|
3
|
+
A tiny, complete Specfuse example project bundled inside the [spec-authoring-kit](https://github.com/Specfuse/authoring). Its job is two-fold:
|
|
4
|
+
|
|
5
|
+
1. **Pedagogical** — show, in one place, what a minimum-but-real Specfuse project looks like across OpenAPI, AsyncAPI, and Arazzo.
|
|
6
|
+
2. **Regression net** — the kit's CI workflow re-validates this example on every PR; if a handbook change breaks the example, the PR fails.
|
|
7
|
+
|
|
8
|
+
## What this demonstrates
|
|
9
|
+
|
|
10
|
+
| Surface | What's here |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Domains | `customer`, `order` |
|
|
13
|
+
| Entities | `Customer` (aggregate), `Order` (aggregate), `OrderLine` (entity under Order) |
|
|
14
|
+
| REST operations | List/Get/Create/Update on Customer & Order, lifecycle `placeOrder`, plus List/Add on OrderLine — 11 operations total |
|
|
15
|
+
| Events | `Customer.Created`, `Customer.Updated`, `Order.Created`, `Order.Updated`, `Order.Placed` (state transition), `OrderLine.Created` |
|
|
16
|
+
| Snapshots | `CustomerSnapshot`, `OrderSnapshot`, `OrderLineSnapshot` |
|
|
17
|
+
| Scenarios | One cross-domain scenario — `place-order` (customer adds a line item to a draft order and places it) |
|
|
18
|
+
| Recipes | `minimal-customer` (root) + `customer-with-draft-order` (extends) |
|
|
19
|
+
| AI access policy | One entity per tier (1, 2) plus an empty tier 0/3 — covers the matrix shape |
|
|
20
|
+
| Flow docs | One Mermaid sequence diagram for the place-order flow |
|
|
21
|
+
|
|
22
|
+
## How to read it
|
|
23
|
+
|
|
24
|
+
Start at the spec roots and follow the `$ref` graph:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
api/specs/v1/openapi.yaml ← REST root; references domains/{customer,order}/operations/*.yaml
|
|
28
|
+
api/specs/v1/asyncapi.yaml ← AsyncAPI root; references async-common/channels + per-domain async-operations
|
|
29
|
+
api/specs/v1/scenarios/cross-domain/place-order.arazzo.yaml
|
|
30
|
+
← the one scenario, references the two recipes below
|
|
31
|
+
api/specs/v1/scenarios/setup-recipes/foundational/
|
|
32
|
+
minimal-customer.recipe.yaml
|
|
33
|
+
customer-with-draft-order.recipe.yaml
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The handbooks at `<kit>/handbooks/` are the authoritative rules; this example is a worked-out application of them.
|
|
37
|
+
|
|
38
|
+
## What's deliberately NOT here
|
|
39
|
+
|
|
40
|
+
The example is intentionally tiny. Out of scope:
|
|
41
|
+
|
|
42
|
+
- **No `Tenant` entity.** `tenantId` is the ambient scope — it appears as a path parameter and on snapshots but no Tenant entity is defined or has its own operations.
|
|
43
|
+
- **No replace/delete operations.** PATCH only — no PUT, no DELETE.
|
|
44
|
+
- **No payment, shipping, fulfillment, or refund flows.** Order has `draft` and `placed` states; everything past `placed` is out of scope.
|
|
45
|
+
- **No scheduled jobs.** Async-operations folder contains `on-*` / `emit-*` only, no `run-*`.
|
|
46
|
+
- **No tier 0 or tier 3 entities** with detailed blocks — the policy matrix shows them as empty rows for completeness.
|
|
47
|
+
- **No `createUser`, `createTenant`, or auth flows.** The recipe takes a fixed `tenantId` input.
|
|
48
|
+
|
|
49
|
+
When the kit grows new authoring patterns (search endpoints, scheduled jobs, AI workers, etc.), this example will grow alongside.
|
|
50
|
+
|
|
51
|
+
## Role as the kit's CI regression net
|
|
52
|
+
|
|
53
|
+
`.github/workflows/example-regen.yml` validates this example on every PR to the kit. The validation today is YAML-only (every `.yaml` file under `api/` must parse). When the kit ships Spectral rulesets and generator integration, that workflow will grow to run Spectral + a full generator regeneration.
|
|
54
|
+
|
|
55
|
+
When a handbook or sample change forces a structural change here, regenerate the example in the same PR. The diff against the previous version is the proof that the change is non-breaking (or, intentionally, the visible cost of a breaking change).
|
specfuse_authoring-0.3.1/examples/hello-orders/api/specs/v1/common/schemas/PaginationLinks.yaml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type: object
|
|
2
|
+
description: HATEOAS pagination links for a paged collection response.
|
|
3
|
+
properties:
|
|
4
|
+
self: { type: string, format: uri }
|
|
5
|
+
first: { type: string, format: uri }
|
|
6
|
+
prev: { type: string, format: uri }
|
|
7
|
+
next: { type: string, format: uri }
|
|
8
|
+
last: { type: string, format: uri }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kit_version": "0.3.1",
|
|
3
|
+
"min_java": 17,
|
|
4
|
+
"generator": {
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"asset": "specfuse-generator-0.1.0.jar",
|
|
7
|
+
"sha256": "35dad9afc7c52b6d46b731e1918725de27c451edd2a0407d2c5025c555959838",
|
|
8
|
+
"release_repo": "Specfuse/generator-dist",
|
|
9
|
+
"release_tag": "v0.1.0"
|
|
10
|
+
},
|
|
11
|
+
"_note": "Pin the kit<->generator contract here. On each generator release: set version/asset/sha256/release_tag, then publish a matching kit patch. sha256=PENDING means no generator is bundled yet; `specfuse-authoring generate` will refuse with a clear message until a real jar is pinned."
|
|
12
|
+
}
|
|
File without changes
|