thomas-agentkit 0.7.0 → 0.9.0-alpha.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.
@@ -0,0 +1,201 @@
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-SYSTEM.md`
116
+ - Refresh UI guidance only when a UI/design surface exists or the file is configured
117
+ - Use configured `designSystem` as a style lens
118
+ - Mention current component/style paths when visible
119
+
120
+ - `.github/pull_request_template.md`
121
+ - Keep concise and generally useful
122
+ - Do not over-personalize per-work-item templates
123
+
124
+ - `TESTING.md`
125
+ - Refresh detected test tools, test locations, and real test commands
126
+
127
+ - `SECURITY-CHECKLIST.md`
128
+ - Refresh project-relevant security boundaries such as auth, secrets, API inputs, and data access
129
+ - Avoid irrelevant compliance boilerplate
130
+
131
+ - `WORKFLOWS.md`
132
+ - Refresh repo-specific development workflows, planning docs, release steps, or review flow when visible
133
+
134
+ - `PRD-TEMPLATE.md` and `IMPLEMENTATION-BRIEF-TEMPLATE.md`
135
+ - Keep as reusable work-item templates
136
+ - Avoid filling them with current project facts beyond light path references
137
+
138
+ - AI adapters
139
+ - Keep thin
140
+ - Point to `AGENTS.md`
141
+ - Do not duplicate operating rules
142
+
143
+ ### 5. Create Missing Configured Files
144
+
145
+ Create missing files implied by `templateSet`, `preset`, or `aiTools`.
146
+
147
+ For each created file:
148
+
149
+ - Create parent directories if needed.
150
+ - Wrap AgentKit-owned content in managed block markers from `references/file-contract.md`.
151
+ - Use current repo facts from the fresh repo profile.
152
+ - Report the file as created.
153
+
154
+ Do not create unrelated guidance files outside the configured inventory unless the user asks.
155
+
156
+ ### 6. Handle Unmanaged Or Malformed Files
157
+
158
+ Default behavior:
159
+
160
+ - Skip unmanaged existing files.
161
+ - Defer malformed files.
162
+ - Report why each file was skipped or deferred.
163
+
164
+ If the user explicitly asks to convert an unmanaged file:
165
+
166
+ - Preserve the original content outside the new managed block when possible.
167
+ - Add one AgentKit managed block for generated content.
168
+ - Do not delete user-written guidance.
169
+
170
+ 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.
171
+
172
+ ### 7. Verify
173
+
174
+ Before finishing, check:
175
+
176
+ - Managed block markers are paired and use stable ids.
177
+ - No `[Project Name]`-style placeholders remain in AgentKit-managed content.
178
+ - Commands in guidance match `package.json` scripts or explicit config/user personalization.
179
+ - `AGENTS.md` references only companion files that exist.
180
+ - `AGENTS.md` references `STACK.md` only when `STACK.md` exists.
181
+ - AI adapters point to `AGENTS.md` and do not duplicate full guidance.
182
+ - Missing configured files were created or explicitly deferred with a reason.
183
+ - No application source files, lockfiles, package manifests, or CI files were modified.
184
+
185
+ Docs-only update does not require running the project's test/build commands.
186
+
187
+ ### 8. Report
188
+
189
+ Tell the user:
190
+
191
+ - Files updated
192
+ - Files created
193
+ - Files skipped because they were unmanaged
194
+ - Files deferred because managed blocks were malformed
195
+ - Stale facts fixed
196
+ - Stack and package manager inferred
197
+ - Commands inferred
198
+ - Config values used
199
+ - Assumptions made
200
+
201
+ Keep the report concise.