@agentkitforge/core 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.
Files changed (107) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/CLI.md +177 -0
  3. package/LICENSE +69 -0
  4. package/README.md +326 -0
  5. package/SECURITY.md +33 -0
  6. package/SPEC.md +159 -0
  7. package/VERSIONING.md +45 -0
  8. package/dist/adapters/claudeCode.d.ts +11 -0
  9. package/dist/adapters/claudeCode.js +120 -0
  10. package/dist/adapters/claudeCode.js.map +1 -0
  11. package/dist/adapters/codex.d.ts +12 -0
  12. package/dist/adapters/codex.js +141 -0
  13. package/dist/adapters/codex.js.map +1 -0
  14. package/dist/app/exampleInputDocuments.d.ts +21 -0
  15. package/dist/app/exampleInputDocuments.js +24 -0
  16. package/dist/app/exampleInputDocuments.js.map +1 -0
  17. package/dist/app/inspect.d.ts +15 -0
  18. package/dist/app/inspect.js +96 -0
  19. package/dist/app/inspect.js.map +1 -0
  20. package/dist/app/loadAsDraft.d.ts +7 -0
  21. package/dist/app/loadAsDraft.js +148 -0
  22. package/dist/app/loadAsDraft.js.map +1 -0
  23. package/dist/app/summary.d.ts +17 -0
  24. package/dist/app/summary.js +89 -0
  25. package/dist/app/summary.js.map +1 -0
  26. package/dist/artifacts/naming.d.ts +8 -0
  27. package/dist/artifacts/naming.js +26 -0
  28. package/dist/artifacts/naming.js.map +1 -0
  29. package/dist/builder/draftRequest.d.ts +24 -0
  30. package/dist/builder/draftRequest.js +87 -0
  31. package/dist/builder/draftRequest.js.map +1 -0
  32. package/dist/builder/instructions.d.ts +1 -0
  33. package/dist/builder/instructions.js +30 -0
  34. package/dist/builder/instructions.js.map +1 -0
  35. package/dist/builder/revisionRequest.d.ts +24 -0
  36. package/dist/builder/revisionRequest.js +94 -0
  37. package/dist/builder/revisionRequest.js.map +1 -0
  38. package/dist/cli/index.d.ts +2 -0
  39. package/dist/cli/index.js +5 -0
  40. package/dist/cli/index.js.map +1 -0
  41. package/dist/cli/program.d.ts +2 -0
  42. package/dist/cli/program.js +273 -0
  43. package/dist/cli/program.js.map +1 -0
  44. package/dist/context/builder.d.ts +2 -0
  45. package/dist/context/builder.js +159 -0
  46. package/dist/context/builder.js.map +1 -0
  47. package/dist/context/types.d.ts +23 -0
  48. package/dist/context/types.js +2 -0
  49. package/dist/context/types.js.map +1 -0
  50. package/dist/domains/catalog.d.ts +7 -0
  51. package/dist/domains/catalog.js +45 -0
  52. package/dist/domains/catalog.js.map +1 -0
  53. package/dist/draft/render.d.ts +13 -0
  54. package/dist/draft/render.js +207 -0
  55. package/dist/draft/render.js.map +1 -0
  56. package/dist/draft/schema.d.ts +107 -0
  57. package/dist/draft/schema.js +78 -0
  58. package/dist/draft/schema.js.map +1 -0
  59. package/dist/draft/session.d.ts +56 -0
  60. package/dist/draft/session.js +115 -0
  61. package/dist/draft/session.js.map +1 -0
  62. package/dist/export/onefile.d.ts +1 -0
  63. package/dist/export/onefile.js +109 -0
  64. package/dist/export/onefile.js.map +1 -0
  65. package/dist/fs/safety.d.ts +26 -0
  66. package/dist/fs/safety.js +187 -0
  67. package/dist/fs/safety.js.map +1 -0
  68. package/dist/index.d.ts +45 -0
  69. package/dist/index.js +26 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/init/create.d.ts +14 -0
  72. package/dist/init/create.js +48 -0
  73. package/dist/init/create.js.map +1 -0
  74. package/dist/init/templates.d.ts +12 -0
  75. package/dist/init/templates.js +202 -0
  76. package/dist/init/templates.js.map +1 -0
  77. package/dist/package/packager.d.ts +5 -0
  78. package/dist/package/packager.js +30 -0
  79. package/dist/package/packager.js.map +1 -0
  80. package/dist/package/reader.d.ts +3 -0
  81. package/dist/package/reader.js +21 -0
  82. package/dist/package/reader.js.map +1 -0
  83. package/dist/prompts/prompts.d.ts +35 -0
  84. package/dist/prompts/prompts.js +206 -0
  85. package/dist/prompts/prompts.js.map +1 -0
  86. package/dist/prompts/schema.d.ts +71 -0
  87. package/dist/prompts/schema.js +46 -0
  88. package/dist/prompts/schema.js.map +1 -0
  89. package/dist/providers/catalog.d.ts +15 -0
  90. package/dist/providers/catalog.js +211 -0
  91. package/dist/providers/catalog.js.map +1 -0
  92. package/dist/providers/types.d.ts +30 -0
  93. package/dist/providers/types.js +2 -0
  94. package/dist/providers/types.js.map +1 -0
  95. package/dist/schema/agentkit.d.ts +54 -0
  96. package/dist/schema/agentkit.js +63 -0
  97. package/dist/schema/agentkit.js.map +1 -0
  98. package/dist/types.d.ts +69 -0
  99. package/dist/types.js +2 -0
  100. package/dist/types.js.map +1 -0
  101. package/dist/validation/skill.d.ts +3 -0
  102. package/dist/validation/skill.js +83 -0
  103. package/dist/validation/skill.js.map +1 -0
  104. package/dist/validation/validator.d.ts +2 -0
  105. package/dist/validation/validator.js +247 -0
  106. package/dist/validation/validator.js.map +1 -0
  107. package/package.json +57 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ All notable changes to AgentKitForge Core will be documented in this file.
4
+
5
+ This project follows Semantic Versioning. Before `0.0.0`, minor versions may include breaking changes.
6
+
7
+ ## Unreleased
8
+
9
+ - Added open-source governance, security, contribution, versioning, release, spec, and CLI documentation.
10
+
11
+ ## 1.0.0 (2026-05-29)
12
+
13
+
14
+ ### Features
15
+
16
+ * prepare initial public preview ([61e8d7d](https://github.com/AgentKitProject/agentkitforge-core/commit/61e8d7d9c9a1efac31c6dc62b4ed9c42d97bf729))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * set initial release baseline ([29fc113](https://github.com/AgentKitProject/agentkitforge-core/commit/29fc11376ce64175dfb9564b5fa625dc24eb63d2))
22
+
23
+ ## v0.1.0 Public Preview
24
+
25
+ - Initial public preview target.
26
+ - Core Agent Kit manifest validation.
27
+ - Validation profiles: `local-valid`, `publishable`, `trusted`, and `verified`.
28
+ - Agent Kit scaffolding templates.
29
+ - Draft rendering and draft request helpers.
30
+ - Prepared Prompt schema, validation, and rendering.
31
+ - Context Builder.
32
+ - One-file Markdown export.
33
+ - `.agentkit.zip` packaging.
34
+ - Codex and Claude Code target exports.
35
+ - CLI workflows for validation, packaging, export, prompt rendering, context building, and inspection.
package/CLI.md ADDED
@@ -0,0 +1,177 @@
1
+ # AgentKitForge CLI
2
+
3
+ Build first:
4
+
5
+ ```bash
6
+ npm run build
7
+ ```
8
+
9
+ Then run commands through:
10
+
11
+ ```bash
12
+ node dist/cli/index.js <command>
13
+ ```
14
+
15
+ After global install or linking, use `agentkitforge <command>`.
16
+
17
+ ## validate
18
+
19
+ Validate an Agent Kit.
20
+
21
+ ```bash
22
+ agentkitforge validate ./my-kit --profile local-valid
23
+ agentkitforge validate ./my-kit --profile publishable
24
+ agentkitforge validate ./my-kit --profile trusted
25
+ agentkitforge validate ./my-kit --profile verified
26
+ ```
27
+
28
+ ## inspect
29
+
30
+ Inspect whether a folder looks like an Agent Kit candidate.
31
+
32
+ ```bash
33
+ agentkitforge inspect ./repo-or-folder
34
+ ```
35
+
36
+ ## summarize
37
+
38
+ Return a display-friendly Agent Kit summary without full raw file contents.
39
+
40
+ ```bash
41
+ agentkitforge summarize ./my-kit
42
+ ```
43
+
44
+ ## init
45
+
46
+ Create a new kit from a built-in template.
47
+
48
+ ```bash
49
+ agentkitforge init ./my-kit \
50
+ --template blank \
51
+ --id my-kit \
52
+ --name "My Kit" \
53
+ --description "A starter Agent Kit."
54
+ ```
55
+
56
+ Financial review starter:
57
+
58
+ ```bash
59
+ agentkitforge init ./financial-review \
60
+ --template financial-review \
61
+ --id financial-review \
62
+ --name "Financial Review" \
63
+ --description "Review financial workbooks."
64
+ ```
65
+
66
+ Use `--force` to clean and recreate the target directory safely.
67
+
68
+ ## package
69
+
70
+ Create a `.agentkit.zip` package.
71
+
72
+ ```bash
73
+ agentkitforge package ./my-kit --out ./my-kit.agentkit.zip
74
+ ```
75
+
76
+ ## export-onefile
77
+
78
+ Create a one-file Markdown bundle.
79
+
80
+ ```bash
81
+ agentkitforge export-onefile ./my-kit --out ./my-kit.onefile.md
82
+ ```
83
+
84
+ ## Prepared Prompts
85
+
86
+ List prepared prompts:
87
+
88
+ ```bash
89
+ agentkitforge list-prompts ./my-kit
90
+ ```
91
+
92
+ Render a prepared prompt:
93
+
94
+ ```bash
95
+ agentkitforge render-prompt ./my-kit financial-review --inputs inputs.json --out rendered-prompt.md
96
+ ```
97
+
98
+ Validate prepared prompt inputs:
99
+
100
+ ```bash
101
+ agentkitforge validate-prompt-inputs ./my-kit financial-review --inputs inputs.json
102
+ ```
103
+
104
+ ## build-context
105
+
106
+ Build AI-ready context without calling an AI provider.
107
+
108
+ ```bash
109
+ agentkitforge build-context ./my-kit \
110
+ --task "Audit formulas in this workbook." \
111
+ --mode triggered \
112
+ --target generic \
113
+ --out context.json
114
+ ```
115
+
116
+ Modes:
117
+
118
+ - `all`: include all skills.
119
+ - `triggered`: include matching skills by deterministic trigger/description matching, with fallback to all skills.
120
+
121
+ Targets:
122
+
123
+ - `openai`
124
+ - `chatgpt`
125
+ - `claude`
126
+ - `generic`
127
+
128
+ ## Draft Workflows
129
+
130
+ Create a provider-neutral draft request:
131
+
132
+ ```bash
133
+ agentkitforge draft-request \
134
+ --request "Build a financial review kit." \
135
+ --level trusted \
136
+ --out draft-request.json
137
+ ```
138
+
139
+ Render a draft:
140
+
141
+ ```bash
142
+ agentkitforge render-draft draft.json ./my-kit --force
143
+ ```
144
+
145
+ Create a revision request:
146
+
147
+ ```bash
148
+ agentkitforge draft-revision-request draft.json \
149
+ --change "Add a prepared prompt for monthly review." \
150
+ --out draft-revision-request.json
151
+ ```
152
+
153
+ Load an existing kit as a draft:
154
+
155
+ ```bash
156
+ agentkitforge load-as-draft ./my-kit --out draft.json
157
+ ```
158
+
159
+ ## export-codex
160
+
161
+ Export manifest skills into a Codex-compatible skills directory.
162
+
163
+ ```bash
164
+ agentkitforge export-codex ./financial-review --dest ~/.codex/skills --force
165
+ ```
166
+
167
+ This creates namespaced skill folders and a generated index skill. It does not call Codex.
168
+
169
+ ## export-claude-code
170
+
171
+ Export an Agent Kit into an initial Claude Code plugin-style folder.
172
+
173
+ ```bash
174
+ agentkitforge export-claude-code ./financial-review --dest ./claude-code-plugins --force
175
+ ```
176
+
177
+ This creates `<kit-id>-claude-code-plugin/` with `.claude-plugin/plugin.json`, skills, and supporting kit files. Verify loading behavior with your Claude Code version.
package/LICENSE ADDED
@@ -0,0 +1,69 @@
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, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or ownership of fifty percent (50%) or more of the outstanding shares, or beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on or derived from the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link or bind by name to the interfaces of, the Work.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable, except as stated in this section, patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to patent claims licensable by such Contributor that are necessarily infringed by their Contribution alone or by combination of their Contribution with the Work to which such Contribution was submitted.
32
+
33
+ If You institute patent litigation against any entity, including a cross-claim or counterclaim in a lawsuit, alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
+
35
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
+
37
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
+
39
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
40
+
41
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
+
43
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear.
44
+
45
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
46
+
47
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in AgentKitForge by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.
48
+
49
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
50
+
51
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work and each Contributor provides its Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
52
+
53
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort, including negligence, contract, or otherwise, unless required by applicable law, such as deliberate and grossly negligent acts, or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work, even if such Contributor has been advised of the possibility of such damages.
54
+
55
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works, You may choose to offer support, warranty, indemnity, or other liability obligations. In accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
56
+
57
+ END OF TERMS AND CONDITIONS
58
+
59
+ APPENDIX: How to apply the Apache License to your work.
60
+
61
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets replaced with your own identifying information. The text should be enclosed in the appropriate comment syntax for the file format.
62
+
63
+ Copyright 2026 AgentKitForge contributors
64
+
65
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,326 @@
1
+ # AgentKitForge Core
2
+
3
+ AgentKitForge Core is the initial TypeScript engine for validating, exporting, and packaging portable Agent Kits. This package intentionally contains only core package/spec/validation/export logic. It does not include a desktop app, AWS infrastructure, or Agent Kit Market integration.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @agentkitforge/core
9
+ ```
10
+
11
+ ## Npm Package
12
+
13
+ AgentKitForge Core is published as the public scoped npm package `@agentkitforge/core`. Apps should depend on it using SemVer:
14
+
15
+ ```json
16
+ "@agentkitforge/core": "^0.1.0"
17
+ ```
18
+
19
+ The published package includes built `dist/` output. The repository does not commit generated `dist/`; `npm pack` and `npm publish` run the build first. Package entrypoints point at:
20
+
21
+ - `main`: `dist/index.js`
22
+ - `types`: `dist/index.d.ts`
23
+ - `bin`: `dist/cli/index.js`
24
+
25
+ ## Build
26
+
27
+ ```bash
28
+ npm run build
29
+ ```
30
+
31
+ ## Test
32
+
33
+ ```bash
34
+ npm test
35
+ ```
36
+
37
+ ## Smoke Test
38
+
39
+ ```bash
40
+ npm run build
41
+ npm run smoke
42
+ ```
43
+
44
+ The smoke test exercises the built CLI across init, validation, packaging, one-file export, prepared prompts, context building, target exports, inspection, summary, and load-as-draft workflows.
45
+
46
+ ## Security Checks
47
+
48
+ GitHub Actions runs security scanning on pushes, pull requests, and manual dispatch. Blocking checks currently include `npm audit --audit-level=critical`. A non-blocking high vulnerability audit is reported in logs.
49
+
50
+ See [SECURITY_CI_POLICY.md](SECURITY_CI_POLICY.md) for the v0.1 failure policy.
51
+
52
+ ## Project Documents
53
+
54
+ - [SPEC.md](SPEC.md): Agent Kit public preview package specification.
55
+ - [CLI.md](CLI.md): CLI command reference.
56
+ - [CONTRIBUTING.md](CONTRIBUTING.md): Local setup, contribution scope, and PR expectations.
57
+ - [SECURITY.md](SECURITY.md): Vulnerability reporting and supported versions.
58
+ - [VERSIONING.md](VERSIONING.md): SemVer and schema compatibility policy.
59
+ - [RELEASE_PROCESS.md](RELEASE_PROCESS.md): Release checklist and tagging flow.
60
+ - [CHANGELOG.md](CHANGELOG.md): Release notes.
61
+ - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md): Contributor conduct expectations.
62
+
63
+ ## Agent Kit Input Safety
64
+
65
+ Agent Kit folders are treated as untrusted input. Manifest-controlled paths must be safe relative paths that stay inside the kit root, and IDs used for package/export folder names must be path-safe kebab-case identifiers. Core reports validation errors for unsafe manifest paths or IDs instead of reading, copying, packaging, or exporting them.
66
+
67
+ Core never executes files from `scripts/`; it only validates whether script files are declared. Packaging, context building, and target exports reject symbolic links, skip generated or dependency-heavy folders such as `exports/`, `.git`, `node_modules`, `dist`, and `build`, and apply conservative file-count and byte limits to avoid unexpectedly large or malicious kits.
68
+
69
+ ## CLI
70
+
71
+ Create a blank Agent Kit:
72
+
73
+ ```bash
74
+ npm run build
75
+ node dist/cli/index.js init ./my-agentkit \
76
+ --template blank \
77
+ --id my-agentkit \
78
+ --name "My Agent Kit" \
79
+ --description "A starter Agent Kit."
80
+ ```
81
+
82
+ Create a trusted financial review starter kit:
83
+
84
+ ```bash
85
+ node dist/cli/index.js init ./financial-review-kit \
86
+ --template financial-review \
87
+ --id financial-review-kit \
88
+ --name "Financial Review Kit" \
89
+ --description "Review financial workbooks for structure, formulas, and follow-up risks."
90
+ ```
91
+
92
+ Use `--force` to initialize into a non-empty directory and overwrite generated template files.
93
+
94
+ Render an Agent Kit draft JSON file:
95
+
96
+ ```bash
97
+ node dist/cli/index.js render-draft ./draft.json ./rendered-agentkit --force
98
+ ```
99
+
100
+ Draft rendering validates the JSON structure before writing files. Rendered kits include the standard manifest, entrypoint Markdown files, README, LICENSE, CHANGELOG, skills, and any draft policies, examples, or templates.
101
+
102
+ List prepared prompts in a kit:
103
+
104
+ ```bash
105
+ node dist/cli/index.js list-prompts ./path/to/agentkit
106
+ ```
107
+
108
+ Render a prepared prompt with input values:
109
+
110
+ ```bash
111
+ node dist/cli/index.js render-prompt ./path/to/agentkit financial-review --inputs inputs.json --out rendered-prompt.md
112
+ ```
113
+
114
+ Validate prepared prompt inputs:
115
+
116
+ ```bash
117
+ node dist/cli/index.js validate-prompt-inputs ./path/to/agentkit financial-review --inputs inputs.json
118
+ ```
119
+
120
+ Inspect, summarize, or load an existing kit as a draft:
121
+
122
+ ```bash
123
+ node dist/cli/index.js inspect ./path/to/repo-or-kit
124
+ node dist/cli/index.js summarize ./path/to/agentkit
125
+ node dist/cli/index.js load-as-draft ./path/to/agentkit --out draft.json
126
+ ```
127
+
128
+ Prepare a provider-neutral AI draft request:
129
+
130
+ ```bash
131
+ node dist/cli/index.js draft-request \
132
+ --request "Build a financial review kit for monthly workbook review." \
133
+ --level trusted \
134
+ --domain Finance \
135
+ --target-user analyst \
136
+ --out draft-request.json
137
+ ```
138
+
139
+ The command writes deterministic instructions, prompt text, and the expected `AgentKitDraft` JSON schema. It does not call OpenAI or any other provider. A future app can send `draft-request.json` to an AI provider, validate the returned `AgentKitDraft` JSON, then render it:
140
+
141
+ ```bash
142
+ node dist/cli/index.js render-draft draft.json ./my-kit --force
143
+ ```
144
+
145
+ Prepare a revision request for an existing draft:
146
+
147
+ ```bash
148
+ node dist/cli/index.js draft-revision-request ./draft.json \
149
+ --change "Add a reusable prepared prompt for monthly workbook review." \
150
+ --level trusted \
151
+ --out draft-revision-request.json
152
+ ```
153
+
154
+ Build with AI is designed as an iterative flow:
155
+
156
+ 1. Create a draft request from the user's initial request.
157
+ 2. A future app sends that request to an AI provider.
158
+ 3. Validate the returned `AgentKitDraft`.
159
+ 4. Create an AI Draft Session and store revision v1.
160
+ 5. For user changes, create a draft revision request from the current draft.
161
+ 6. Validate the returned full updated draft and add a new revision.
162
+ 7. Render the current revision into an Agent Kit folder.
163
+
164
+ Core only builds request/session data. The app performs provider calls.
165
+
166
+ Validate an Agent Kit:
167
+
168
+ ```bash
169
+ node dist/cli/index.js validate ./path/to/agentkit --profile local-valid
170
+ ```
171
+
172
+ Supported validation profiles:
173
+
174
+ - `local-valid`
175
+ - `publishable`
176
+ - `trusted`
177
+ - `verified`
178
+
179
+ Export a one-file Markdown bundle:
180
+
181
+ ```bash
182
+ node dist/cli/index.js export-onefile ./path/to/agentkit --out ./bundle.md
183
+ ```
184
+
185
+ Create a `.agentkit.zip` package:
186
+
187
+ ```bash
188
+ node dist/cli/index.js package ./path/to/agentkit --out ./agentkit.agentkit.zip
189
+ ```
190
+
191
+ Build AI-ready context from an Agent Kit:
192
+
193
+ ```bash
194
+ node dist/cli/index.js build-context ./path/to/agentkit \
195
+ --task "Audit formulas in this workbook." \
196
+ --mode triggered \
197
+ --target generic \
198
+ --out context.json
199
+ ```
200
+
201
+ The context builder does not call OpenAI or any other provider. It creates a JSON payload with:
202
+
203
+ - `systemContext`: Agent Kit instructions, selected skills, and requested supporting files.
204
+ - `userContext`: the user task, ready to pair with the system context.
205
+ - `includedFiles`: normalized package paths included in the context.
206
+ - `includedSkills`: skill ids included in the context.
207
+ - `warnings`: deterministic fallback or selection warnings.
208
+
209
+ Use `--mode all` to include every manifest skill. Use `--mode triggered` to match the user task against skill triggers and descriptions. If no skill matches, the builder includes all skills and records a warning.
210
+
211
+ Policies, templates, and workflows are included by default in the CLI. Use `--no-policies`, `--no-templates`, or `--no-workflows` to exclude them. References are excluded by default; pass `--include-references` when the target workflow needs them.
212
+
213
+ Export Agent Kit skills to a Codex-compatible skills directory:
214
+
215
+ ```bash
216
+ node dist/cli/index.js export-codex ./financial-review --dest ~/.codex/skills --force
217
+ ```
218
+
219
+ This is the first target adapter. It copies each manifest skill into a namespaced Codex skill folder like `<kit-id>-<skill-id>`, creates an index skill for the kit, and writes AgentKitForge markers so `--force` only replaces folders generated by this adapter. It does not call Codex and does not assume your actual Codex skills path.
220
+
221
+ Export an Agent Kit to an initial Claude Code plugin-style folder:
222
+
223
+ ```bash
224
+ node dist/cli/index.js export-claude-code ./financial-review --dest ./claude-code-plugins --force
225
+ ```
226
+
227
+ This adapter creates `<kit-id>-claude-code-plugin/`, writes `.claude-plugin/plugin.json`, copies manifest skills into `skills/<skill-id>/`, and includes root Agent Kit instructions plus supporting `policies/`, `templates/`, `workflows/`, and `references/` when present. The plugin manifest is intentionally conservative because Claude Code plugin loading behavior may evolve; verify loading with your Claude Code version.
228
+
229
+ After this package is installed globally or linked, the same commands are available through `agentkitforge`.
230
+
231
+ ## AI Provider Metadata
232
+
233
+ AgentKitForge Core defines shared provider and model metadata only. It does not call OpenAI, Anthropic, Gemini, Ollama, OpenAI-compatible servers, or any other provider. It does not store API keys.
234
+
235
+ The exported provider helpers cover:
236
+
237
+ - provider types: `openai`, `anthropic`, `gemini`, `ollama`, `openai-compatible`
238
+ - starter known-model suggestions
239
+ - default model suggestions
240
+ - API key and base URL requirements
241
+ - structured JSON capability hints for AgentKitDraft generation
242
+
243
+ Known models are suggestions, not constraints. Apps and CLIs that consume this package must always allow custom model IDs, especially for Ollama and OpenAI-compatible providers.
244
+
245
+ ## Prepared Prompts
246
+
247
+ Prepared Prompts are reusable prompt templates stored under `prompts/<prompt-id>.yaml`. They let a kit define exact prompts that can be rendered later in Use mode after an app collects required inputs.
248
+
249
+ Canonical variable syntax is `{{variable_name}}`. A simpler `{variable_name}` form is tolerated for compatibility. Whitespace is allowed inside braces, such as `{{ company_name }}`. Inputs are defined by the prepared prompt, and AgentKitForge validates/rendered prompts so unresolved variables are blocked before an app sends the prompt to an AI provider.
250
+
251
+ Prompt input types:
252
+
253
+ - `short-text`
254
+ - `long-text`
255
+ - `choice`
256
+ - `multi-choice`
257
+ - `date`
258
+ - `number`
259
+ - `boolean`
260
+
261
+ Prepared prompt paths can be referenced from `agentkit.yaml`:
262
+
263
+ ```yaml
264
+ prompts:
265
+ - id: financial-review
266
+ path: prompts/financial-review.yaml
267
+ description: Review a financial workbook and produce a summary.
268
+ ```
269
+
270
+ One-file export renders prepared prompts in a readable Markdown section instead of dumping raw YAML.
271
+
272
+ Default artifact naming helpers return predictable names such as:
273
+
274
+ - `<kit-id>-<version>.onefile.md`
275
+ - `<kit-id>-<version>.agentkit.zip`
276
+ - `<kit-id>-output-<timestamp>.md`
277
+
278
+ ## Domains
279
+
280
+ Core includes a known domain catalog for guided builders and filtering. Domains are suggestions, not constraints. Consumers should always allow custom domains.
281
+
282
+ ## App-Support Helpers
283
+
284
+ Core includes reusable helpers for app workflows:
285
+
286
+ - `inspectAgentKitCandidate(path)` for import-friendly diagnostics.
287
+ - `getAgentKitSummary(path)` for details, export, and install target screens.
288
+ - `loadAgentKitAsDraft(path)` for Edit with AI and guided editing.
289
+ - `requestedSections` and `excludedSections` on draft request builders for AI section control.
290
+ - Example input document metadata helpers for `.txt`, `.md`, `.csv`, `.xlsx`, and `.xls`.
291
+ - Artifact naming helpers for one-file exports, packages, and generated outputs.
292
+
293
+ Example input documents are app-provided metadata. Core does not upload files, call AI providers, or perform heavy spreadsheet parsing. Apps can use them to help AI infer formatting, terminology, expected outputs, required inputs, skill procedures, and prepared prompt variables.
294
+
295
+ ## Agent Kit Structure
296
+
297
+ ```text
298
+ agentkit.yaml
299
+ AGENTKIT.md
300
+ START_HERE.md
301
+ README.md
302
+ LICENSE
303
+ CHANGELOG.md
304
+ skills/<skill-id>/SKILL.md
305
+ prompts/<prompt-id>.yaml
306
+ workflows/
307
+ policies/
308
+ references/
309
+ templates/
310
+ examples/
311
+ evals/
312
+ adapters/
313
+ scripts/
314
+ assets/
315
+ exports/
316
+ ```
317
+
318
+ ## Validation Profiles
319
+
320
+ `local-valid` requires `agentkit.yaml`, `AGENTKIT.md`, `START_HERE.md`, `skills/`, and at least one `skills/<skill-id>/SKILL.md`.
321
+
322
+ `publishable` adds `README.md` and `LICENSE`.
323
+
324
+ `trusted` adds `CHANGELOG.md`, `policies/`, and `examples/`.
325
+
326
+ `verified` adds `evals/`.
package/SECURITY.md ADDED
@@ -0,0 +1,33 @@
1
+ # Security Policy
2
+
3
+ AgentKitForge Core treats Agent Kit folders, manifests, packages, prepared prompts, and target exports as untrusted input.
4
+
5
+ ## Reporting Vulnerabilities
6
+
7
+ Please do not report security vulnerabilities in public GitHub issues.
8
+
9
+ Use GitHub private vulnerability reporting if it is enabled for this repository. If private reporting is not available, contact:
10
+
11
+ `security@agentkitforge.com`
12
+
13
+ TODO: Confirm this address is active before public release.
14
+
15
+ ## Supported Versions
16
+
17
+ | Version | Supported |
18
+ | --- | --- |
19
+ | v0.1.x Public Preview | Supported after release |
20
+
21
+ ## Security Scope
22
+
23
+ Security-sensitive areas include:
24
+
25
+ - Path traversal and unsafe file reads/writes
26
+ - Package import, export, and cleanup behavior
27
+ - ZIP packaging behavior
28
+ - Target exports for Codex and Claude Code
29
+ - Prepared Prompt rendering and unresolved variables
30
+ - Handling of `scripts/`
31
+ - Handling of symlinks and large/untrusted package trees
32
+
33
+ Core does not execute Agent Kit scripts and does not store provider API keys.