thomas-agentkit 0.8.0 → 0.9.0-alpha.1

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 (29) hide show
  1. package/README.md +101 -9
  2. package/dist/cli.js +145 -32
  3. package/dist/skill-install.js +125 -0
  4. package/package.json +3 -1
  5. package/templates/.cursor/rules/agentkit.md +1 -1
  6. package/templates/.github/copilot-instructions.md +1 -1
  7. package/templates/AGENTS.md +1 -1
  8. package/templates/WORKFLOWS.md +1 -1
  9. package/templates/design-systems/apple.md +74 -209
  10. package/templates/design-systems/cursor.md +95 -0
  11. package/templates/design-systems/framer.md +95 -0
  12. package/templates/design-systems/linear.md +95 -207
  13. package/templates/design-systems/notion.md +94 -0
  14. package/templates/design-systems/warp.md +89 -0
  15. package/templates/skills/agentkit/SKILL.md +101 -0
  16. package/templates/skills/agentkit/agents/openai.yaml +4 -0
  17. package/templates/skills/agentkit/references/design-baselines/apple.md +101 -0
  18. package/templates/skills/agentkit/references/design-baselines/cursor.md +95 -0
  19. package/templates/skills/agentkit/references/design-baselines/framer.md +95 -0
  20. package/templates/skills/agentkit/references/design-baselines/linear.md +117 -0
  21. package/templates/skills/agentkit/references/design-baselines/notion.md +94 -0
  22. package/templates/skills/agentkit/references/design-baselines/warp.md +89 -0
  23. package/templates/skills/agentkit/references/design.md +100 -0
  24. package/templates/skills/agentkit/references/doctor.md +133 -0
  25. package/templates/skills/agentkit/references/file-contract.md +164 -0
  26. package/templates/skills/agentkit/references/init.md +213 -0
  27. package/templates/skills/agentkit/references/learn.md +149 -0
  28. package/templates/skills/agentkit/references/repair.md +119 -0
  29. package/templates/skills/agentkit/references/update.md +202 -0
@@ -0,0 +1,119 @@
1
+ # agentkit repair (skill workflow)
2
+
3
+ Repair AgentKit guidance structure after an explicit user request. This workflow fixes guidance-file safety problems that block `agentkit update`, especially malformed managed blocks, unmanaged-file conversion, broken adapters, stale companion references, and missing managed wrappers.
4
+
5
+ Repair is not a general rewrite workflow. Use `agentkit update` for stale content and `agentkit doctor` for read-only audits.
6
+
7
+ ## Preconditions
8
+
9
+ - Read `references/file-contract.md` before repairing any file.
10
+ - Read `agentkit.config.json` when present.
11
+ - Inspect the affected guidance files before proposing repairs.
12
+ - Briefly tell the user which files need repair and what will change before editing.
13
+
14
+ ## Non-negotiables
15
+
16
+ - Preserve user-written content.
17
+ - Modify only AgentKit guidance files and AI tool adapters.
18
+ - Do not modify application source files, lockfiles, package manifests, or CI config.
19
+ - Do not guess ownership when managed block markers are ambiguous.
20
+ - Do not regenerate whole files unless the user explicitly asks for that exact file.
21
+ - Keep `AGENTS.md` as the source of truth; adapters stay thin pointers.
22
+
23
+ ## Procedure
24
+
25
+ ### 1. Identify Repair Targets
26
+
27
+ Inspect:
28
+
29
+ - `AGENTS.md`
30
+ - `STACK.md`
31
+ - companion guidance files
32
+ - AI tool adapters
33
+ - managed block markers
34
+ - companion references in `AGENTS.md`
35
+
36
+ Classify each target:
37
+
38
+ - Malformed managed block markers
39
+ - Missing managed wrapper around AgentKit-owned content
40
+ - Unmanaged guidance file the user wants converted
41
+ - AI adapter that duplicates full guidance or points to the wrong source
42
+ - `AGENTS.md` references to missing companion files
43
+ - Configured guidance file missing a safe managed block
44
+
45
+ ### 2. Plan The Repair
46
+
47
+ Before editing, report:
48
+
49
+ - Files to repair
50
+ - Repair type for each file
51
+ - Files deferred because ownership is ambiguous
52
+ - Any user confirmation needed
53
+
54
+ If ownership is ambiguous, defer the file and ask the user whether to convert, preserve, or leave it unmanaged.
55
+
56
+ ### 3. Repair Managed Blocks
57
+
58
+ For malformed markers:
59
+
60
+ - Repair obvious one-start/one-end pairing issues only when the intended block boundaries are clear.
61
+ - Preserve all text outside the repaired block.
62
+ - Keep the same stable block id when clear.
63
+ - If there are multiple starts, multiple ends, overlapping blocks, or unclear ownership, defer instead of guessing.
64
+
65
+ For missing wrappers:
66
+
67
+ - Add one top-level AgentKit managed block around clearly AgentKit-owned generated content.
68
+ - Preserve pre-existing user notes outside the managed block when possible.
69
+ - Do not wrap unrelated project documentation.
70
+
71
+ ### 4. Convert Unmanaged Files
72
+
73
+ Only convert an unmanaged file when the user explicitly asks.
74
+
75
+ When converting:
76
+
77
+ - Preserve existing user-written content outside the new managed block when possible.
78
+ - Add one AgentKit managed block for generated AgentKit guidance.
79
+ - Do not delete custom instructions.
80
+ - Do not convert application docs that are not part of AgentKit guidance.
81
+
82
+ ### 5. Repair AI Adapters
83
+
84
+ For `.cursor/rules/agentkit.md`, `CLAUDE.md`, and `.github/copilot-instructions.md`:
85
+
86
+ - Replace thick duplicated guidance with a thin pointer to `AGENTS.md`.
87
+ - Wrap the adapter body in a managed block.
88
+ - Preserve any user-specific adapter notes outside the managed block when present.
89
+
90
+ ### 6. Repair Companion References
91
+
92
+ For `AGENTS.md` companion references:
93
+
94
+ - Remove references to companion files that do not exist and are not being created.
95
+ - Add references to existing configured companions when useful.
96
+ - Reference `STACK.md` only when it exists or will be created.
97
+
98
+ ### 7. Verify
99
+
100
+ Before finishing, check:
101
+
102
+ - Managed block markers are paired and stable.
103
+ - User-written content outside managed blocks was preserved.
104
+ - AI adapters point to `AGENTS.md` and do not duplicate full guidance.
105
+ - `AGENTS.md` references only companion files that exist.
106
+ - No application source files, lockfiles, package manifests, or CI files were modified.
107
+
108
+ Docs-only repair does not require running the project's test/build commands.
109
+
110
+ ### 8. Report
111
+
112
+ Tell the user:
113
+
114
+ - Files repaired
115
+ - Files deferred and why
116
+ - Repairs performed
117
+ - Any follow-up recommendation, such as `/agentkit update` after structural repair
118
+
119
+ Keep the report concise.
@@ -0,0 +1,202 @@
1
+ # agentkit update (skill workflow)
2
+
3
+ Sync existing AgentKit guidance files with the current repository context. This workflow runs **inside the agent** for skill-path projects; it is not the CLI `agentkit update` managed-block template merger.
4
+
5
+ The skill path is context-aware. Re-read the repository, compare guidance against current codebase reality, and update only AgentKit-managed content.
6
+
7
+ ## Preconditions
8
+
9
+ - Read `references/file-contract.md` before editing any AgentKit-managed file.
10
+ - Read `agentkit.config.json` when present.
11
+ - If `installMode: skill`, continue with this workflow.
12
+ - If `installMode: template` or config is missing, continue only when the user explicitly asked for the skill workflow; otherwise direct them to CLI `agentkit update`.
13
+
14
+ ## Non-negotiables
15
+
16
+ - Preserve user content outside AgentKit managed blocks.
17
+ - Never invent commands. Commands must come from `package.json` scripts or explicit user/config personalization.
18
+ - Do not overwrite unmanaged existing files.
19
+ - Stop on malformed managed block markers and recommend `agentkit repair` before updating that file.
20
+ - Do not modify application source files, lockfiles, package manifests, or CI config during update.
21
+ - Keep `AGENTS.md` as the source-of-truth router; adapters stay thin pointers.
22
+
23
+ ## Procedure
24
+
25
+ ### 1. Build Fresh Repo Profile
26
+
27
+ Inspect the repository again before deciding what to update.
28
+
29
+ Collect:
30
+
31
+ - Project name and description from `package.json`, README, or directory name
32
+ - Package manager from lockfiles
33
+ - Current scripts from `package.json`
34
+ - Framework/runtime signals, such as Next.js, SvelteKit, Express, Convex, Vite, React, Node, TypeScript
35
+ - Current source layout, such as `src/`, `app/`, `pages/`, `convex/`, `test/`, `docs/`
36
+ - Current test, lint, build, typecheck, and dev tooling
37
+ - UI/design system signals, such as Tailwind, CSS files, component folders, design docs
38
+ - Backend/data/auth signals, such as API routes, database/schema files, auth packages
39
+ - Existing docs, briefs, PR templates, workflow docs, or agent guidance files
40
+ - Issue tracker/workflow hints from `.github/`, Linear docs, or config personalization
41
+
42
+ Prefer repository facts over config personalization. Use config personalization only as fallback.
43
+
44
+ ### 2. Read Current AgentKit State
45
+
46
+ Inspect:
47
+
48
+ - `agentkit.config.json`
49
+ - `AGENTS.md`
50
+ - `STACK.md`
51
+ - companion guidance files
52
+ - AI tool adapters
53
+ - managed block markers in every AgentKit guidance file
54
+
55
+ Record:
56
+
57
+ - Files present
58
+ - Files missing for the configured `templateSet`, `preset`, and `aiTools`
59
+ - Files with managed blocks
60
+ - Files without managed blocks
61
+ - Files with malformed managed blocks
62
+
63
+ ### 3. Decide Sync Scope
64
+
65
+ Use `references/file-contract.md` as the source of truth for inventory.
66
+
67
+ Update should handle:
68
+
69
+ - Stale commands
70
+ - Stale project name or description
71
+ - Stale stack/framework guidance
72
+ - Changed source layout
73
+ - Changed test/build/lint tooling
74
+ - Changed design system or docs paths
75
+ - Missing companion files implied by `templateSet`
76
+ - Missing `STACK.md` when `preset` is set or stack is confidently inferred
77
+ - Missing AI adapters implied by `aiTools`
78
+ - Adapters that duplicate operating rules instead of pointing to `AGENTS.md`
79
+ - Remaining bracket placeholders
80
+
81
+ Before writing, briefly tell the user which files will be updated, created, skipped, or deferred.
82
+
83
+ ### 4. Update Managed Files
84
+
85
+ For each existing AgentKit guidance file:
86
+
87
+ - If the file has a valid AgentKit managed block, replace only the managed block content.
88
+ - Preserve all text before and after the managed block exactly.
89
+ - If the file exists but has no managed block, skip it unless the user explicitly asks to convert it.
90
+ - If the file has malformed managed blocks, defer it and recommend `agentkit repair`.
91
+ - Use current repo facts from the fresh repo profile.
92
+ - Avoid generic filler.
93
+ - Keep guidance concise and operational.
94
+
95
+ File roles:
96
+
97
+ - `AGENTS.md`
98
+ - Refresh project purpose, project map, real commands, workflow expectations, companion-doc routing, safety rules, and before-finishing checklist
99
+ - Reference only companion files that exist or will be created in this update
100
+ - Reference `STACK.md` only when it exists or will be created
101
+
102
+ - `STACK.md`
103
+ - Refresh stack-specific guidance based on current repo facts and configured/inferred preset
104
+ - Include current framework boundaries, source layout, validation points, and relevant checks
105
+ - Remove or avoid generic framework advice that does not apply to the repo
106
+
107
+ - `CHANGE-EXPLANATION.md`
108
+ - Refresh handoff and change-summary expectations when project workflow signals changed
109
+
110
+ - `CODE-QUALITY.md`
111
+ - Refresh review, refactor, and maintainability guidance
112
+ - Reference real project commands from `AGENTS.md`
113
+ - Avoid duplicating large command tables
114
+
115
+ - `DESIGN.md`
116
+ - Refresh UI design spec only when a UI/design surface exists or the file is configured
117
+ - Use configured `designSystem` baseline; map tokens to project theme
118
+ - Mention current component/style paths when visible
119
+ - Prefer `/agentkit design` when user wants baseline selection or customization
120
+
121
+ - `.github/pull_request_template.md`
122
+ - Keep concise and generally useful
123
+ - Do not over-personalize per-work-item templates
124
+
125
+ - `TESTING.md`
126
+ - Refresh detected test tools, test locations, and real test commands
127
+
128
+ - `SECURITY-CHECKLIST.md`
129
+ - Refresh project-relevant security boundaries such as auth, secrets, API inputs, and data access
130
+ - Avoid irrelevant compliance boilerplate
131
+
132
+ - `WORKFLOWS.md`
133
+ - Refresh repo-specific development workflows, planning docs, release steps, or review flow when visible
134
+
135
+ - `PRD-TEMPLATE.md` and `IMPLEMENTATION-BRIEF-TEMPLATE.md`
136
+ - Keep as reusable work-item templates
137
+ - Avoid filling them with current project facts beyond light path references
138
+
139
+ - AI adapters
140
+ - Keep thin
141
+ - Point to `AGENTS.md`
142
+ - Do not duplicate operating rules
143
+
144
+ ### 5. Create Missing Configured Files
145
+
146
+ Create missing files implied by `templateSet`, `preset`, or `aiTools`.
147
+
148
+ For each created file:
149
+
150
+ - Create parent directories if needed.
151
+ - Wrap AgentKit-owned content in managed block markers from `references/file-contract.md`.
152
+ - Use current repo facts from the fresh repo profile.
153
+ - Report the file as created.
154
+
155
+ Do not create unrelated guidance files outside the configured inventory unless the user asks.
156
+
157
+ ### 6. Handle Unmanaged Or Malformed Files
158
+
159
+ Default behavior:
160
+
161
+ - Skip unmanaged existing files.
162
+ - Defer malformed files.
163
+ - Report why each file was skipped or deferred.
164
+
165
+ If the user explicitly asks to convert an unmanaged file:
166
+
167
+ - Preserve the original content outside the new managed block when possible.
168
+ - Add one AgentKit managed block for generated content.
169
+ - Do not delete user-written guidance.
170
+
171
+ If the user explicitly asks to repair malformed blocks, use the repair workflow when available. If no repair workflow is available, ask before making structural marker changes.
172
+
173
+ ### 7. Verify
174
+
175
+ Before finishing, check:
176
+
177
+ - Managed block markers are paired and use stable ids.
178
+ - No `[Project Name]`-style placeholders remain in AgentKit-managed content.
179
+ - Commands in guidance match `package.json` scripts or explicit config/user personalization.
180
+ - `AGENTS.md` references only companion files that exist.
181
+ - `AGENTS.md` references `STACK.md` only when `STACK.md` exists.
182
+ - AI adapters point to `AGENTS.md` and do not duplicate full guidance.
183
+ - Missing configured files were created or explicitly deferred with a reason.
184
+ - No application source files, lockfiles, package manifests, or CI files were modified.
185
+
186
+ Docs-only update does not require running the project's test/build commands.
187
+
188
+ ### 8. Report
189
+
190
+ Tell the user:
191
+
192
+ - Files updated
193
+ - Files created
194
+ - Files skipped because they were unmanaged
195
+ - Files deferred because managed blocks were malformed
196
+ - Stale facts fixed
197
+ - Stack and package manager inferred
198
+ - Commands inferred
199
+ - Config values used
200
+ - Assumptions made
201
+
202
+ Keep the report concise.