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.
@@ -10,24 +10,44 @@ This is the primary instruction file for AI coding agents working in this reposi
10
10
 
11
11
  Follow this file first. It defines the repository-wide operating rules for agents.
12
12
 
13
- Use companion guides only when relevant to the task. Do not load or restate every guide by default.
13
+ Use companion guides only when a trigger below applies. Do not load or restate every guide by default.
14
14
 
15
- ## Reference Map
15
+ For routine bugfixes and small features, do not open `WORKFLOWS.md`, planning templates, or optional guides unless a trigger applies or the user asks.
16
16
 
17
- Read these files when the task calls for them:
17
+ ## When To Use Other Guides
18
18
 
19
- | Task type | Read first |
19
+ | Trigger | Action |
20
20
  | --- | --- |
21
- | Any implementation | `AGENTS.md` |
22
- | Code quality, refactors, review, dependencies | `CODE-QUALITY.md` |
23
- | Planning, branching, implementation, review, release | `WORKFLOWS.md` |
24
- | Final handoff or PR explanation | `CHANGE-EXPLANATION.md` |
25
- | UI, styling, layout, navigation, components | `[design system path, e.g. docs/design-system.md]` |
26
- | Tests, fixtures, mocks, QA strategy | `TESTING.md` |
27
- | Auth, permissions, secrets, PII, data handling | `SECURITY-CHECKLIST.md` |
28
- | Complex engineering execution | `IMPLEMENTATION-BRIEF-TEMPLATE.md` |
29
- | Product or user-facing feature definition | `PRD-TEMPLATE.md` |
30
- | Stack-specific work | `STACK.md` when present |
21
+ | Any file edits (final message) | Use the change-explanation format in **After Coding (Required)**; see `CHANGE-EXPLANATION.md` for detail |
22
+ | UI, components, styling, layout | Read `[design system path, e.g. docs/design-system.md]` or `DESIGN-SYSTEM.md` |
23
+ | Review, refactor, dependencies | Read `CODE-QUALITY.md` |
24
+ | Tests, fixtures, QA strategy | Read `TESTING.md` if present |
25
+ | Auth, permissions, secrets, PII | Read `SECURITY-CHECKLIST.md` if present |
26
+ | Stack-specific code | Read `STACK.md` if present |
27
+ | User or issue requests a PRD | Create from `PRD-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
28
+ | User or issue requests an implementation brief | Create from `IMPLEMENTATION-BRIEF-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
29
+ | Release or branching process (optional) | Read `WORKFLOWS.md` if present |
30
+
31
+ ### Optional Guides (Full Template Set)
32
+
33
+ These files are not installed with the standard template set. Do not assume they exist unless present in the repository:
34
+
35
+ - `TESTING.md`
36
+ - `SECURITY-CHECKLIST.md`
37
+ - `PRD-TEMPLATE.md`
38
+ - `IMPLEMENTATION-BRIEF-TEMPLATE.md`
39
+ - `WORKFLOWS.md`
40
+
41
+ ## Planning Artifacts
42
+
43
+ Use this decision tree before creating planning documents:
44
+
45
+ - **Tiny obvious fix** — implement directly; no PRD or brief required.
46
+ - **Product uncertainty** — create a PRD from `PRD-TEMPLATE.md` only when the user, issue, or task explicitly requests planning documentation. Save it under `[briefs path, e.g. docs/briefs]`.
47
+ - **Multi-file engineering with meaningful risk** — create an implementation brief from `IMPLEMENTATION-BRIEF-TEMPLATE.md` only when the user, issue, or task explicitly requests it. Save it under `[briefs path, e.g. docs/briefs]`.
48
+ - **Security-sensitive change** — follow `SECURITY-CHECKLIST.md` if present.
49
+
50
+ Do not read planning templates on every task. Copy and fill them only when planning documentation is requested.
31
51
 
32
52
  ## Local Guidance
33
53
 
@@ -45,23 +65,23 @@ If a subdirectory contains its own `AGENTS.md` or equivalent local guidance, fol
45
65
  - Validate external input at system boundaries.
46
66
  - Keep public APIs and persisted data shapes stable unless the task requires a change.
47
67
  - Ask before destructive commands, broad refactors, schema changes, dependency additions, or security-sensitive changes.
48
- - Run the narrowest useful checks before handoff.
49
- - Explain completed work clearly using `CHANGE-EXPLANATION.md` when present.
68
+ - Run the narrowest useful checks before finishing (use **Project Commands** below).
69
+ - After any coding work that changes files, end with a change explanation per **After Coding (Required)**. Do not skip this for small fixes.
70
+ - Watch for common AI mistakes: invented APIs or commands, placeholder logic that looks production-ready, client-only authorization, and tests that do not exercise changed behavior.
71
+ - When reviewing or flagging issues, use severity: **Blocker** (must fix), **Concern** (should fix soon), **Suggestion** (optional).
72
+ - For review, refactor, or dependency work, read `CODE-QUALITY.md` for the full checklist.
50
73
 
51
74
  ## Before Coding
52
75
 
53
76
  Before making meaningful code changes:
54
77
 
55
78
  1. Confirm the task, scope, and acceptance criteria.
56
- 2. Check whether the task is linked to an issue in [issue tracker, e.g. Linear or GitHub Issues].
57
- 3. For non-trivial work without an issue, ask whether one should be created before implementation.
58
- 4. Create or switch to an appropriate branch when the workflow expects branches.
59
- 5. Inspect nearby code, tests, and existing patterns.
60
- 6. Read relevant companion guidance from the Reference Map.
61
- 7. Identify the smallest complete approach.
62
- 8. Ask for clarification if requirements, risk, or approval boundaries are unclear.
79
+ 2. Inspect nearby code, tests, and existing patterns.
80
+ 3. Read at most one triggered companion from **When To Use Other Guides** if it applies.
81
+ 4. For non-trivial work: link to or create an issue in [issue tracker, e.g. Linear or GitHub Issues] and use an appropriate branch when the project expects branches.
82
+ 5. Ask for clarification if requirements, risk, or approval boundaries are unclear.
63
83
 
64
- Tiny fixes can skip branch-and-brief ceremony when the change is obvious and low risk.
84
+ Tiny fixes can skip issue-and-branch ceremony when the change is obvious and low risk.
65
85
 
66
86
  ## During Coding
67
87
 
@@ -74,7 +94,7 @@ While implementing:
74
94
  - Add or update tests when behavior changes.
75
95
  - For UI work, follow `[design system path, e.g. docs/design-system.md]` and preserve existing interaction patterns.
76
96
  - For stack-specific work, read `STACK.md` when present.
77
- - Document meaningful decisions in the implementation brief, PR, or final handoff.
97
+ - Document meaningful decisions in the change explanation when they matter.
78
98
 
79
99
  ## Approval Boundaries
80
100
 
@@ -87,20 +107,33 @@ Ask before:
87
107
  - Performing broad refactors or large formatting-only rewrites.
88
108
  - Editing generated, vendored, or external-source files unless the task explicitly requires it.
89
109
 
110
+ ## After Coding (Required)
111
+
112
+ If you modified any files in the repository, your **final message** must include a change explanation.
113
+
114
+ This is how developers catch up on agent work. It is required for bugfixes, refactors, and small edits—not only large features or PRs. Scale section depth to the change; do not omit the explanation because the diff is small.
115
+
116
+ Do not write a separate change-explanation file unless the project asks for one. Use this structure in your reply:
117
+
118
+ - **Summary** — outcome in plain language (behavior delivered, not only files touched).
119
+ - **What changed** — main files or areas; what, why, and how each fits existing patterns.
120
+ - **Key decisions** — approach, alternatives, trade-offs (skip when straightforward).
121
+ - **Verification** — checks run and results; note any skipped checks and why.
122
+ - **Risks or limitations** — merge blockers, untested paths, follow-up (use "None identified" for trivial low-risk fixes when appropriate).
123
+ - **Suggested review focus** — where the developer should look first.
124
+
125
+ See `CHANGE-EXPLANATION.md` for examples and style rules.
126
+
90
127
  ## Before Finishing
91
128
 
92
129
  Before marking work complete:
93
130
 
94
131
  1. Re-read the original request and acceptance criteria.
95
132
  2. Confirm the implementation satisfies the requested scope.
96
- 3. Run the narrowest relevant checks:
97
- - `[test command, e.g. npm test]`
98
- - `[lint command, e.g. npm run lint]`
99
- - `[build/check command, e.g. npm run build]` for larger changes
133
+ 3. Run the narrowest relevant checks from **Project Commands**.
100
134
  4. Review the diff for unrelated changes.
101
135
  5. Confirm no unnecessary dependencies, schema changes, theme changes, or broad refactors were introduced.
102
- 6. Summarize what changed, why it changed, checks run, risks, and follow-up work.
103
- 7. If `CHANGE-EXPLANATION.md` exists, follow it for the final handoff.
136
+ 6. Include the change explanation from **After Coding (Required)** in your final message.
104
137
 
105
138
  ## Project Commands
106
139
 
@@ -125,7 +158,9 @@ Never commit API keys, tokens, private keys, or local `.env` values. Keep secret
125
158
 
126
159
  ## Stack
127
160
 
128
- Document the real stack for this project:
161
+ When `STACK.md` is present (for example after a preset install), read it before changing stack-specific code.
162
+
163
+ Otherwise document the real stack for this project:
129
164
 
130
165
  - [Primary framework]
131
166
  - [Language/runtime]
@@ -2,13 +2,25 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- Use this guide when explaining completed work to the developer.
5
+ Use this guide **after every task that modifies repository files**.
6
6
 
7
- The goal is to help the developer understand what changed, why it changed, how the implementation works, what was verified, and what deserves review attention.
7
+ The goal is to help the developer get up to speed quickly: what changed, why it changed, how it works, what was verified, and what deserves review attention.
8
8
 
9
- This is a reusable handoff guide. Do not create a new change-explanation file for every task unless the project explicitly asks for one.
9
+ This is a **response format** for agent messages. Do **not** create a new markdown file per task unless the project explicitly asks for one.
10
10
 
11
- ## Handoff Format
11
+ Research-only tasks that do not edit files do not require this format.
12
+
13
+ ## When Required
14
+
15
+ | Situation | Change explanation |
16
+ | --- | --- |
17
+ | Any bugfix, feature, refactor, config, or doc edit in the repo | **Required** — follow this guide in your final message |
18
+ | Research, options, or questions with no file edits | Not required |
19
+ | User asks only to explain existing code (no edits) | Not required |
20
+
21
+ Scale depth to the size of the change. A one-line fix still needs a short explanation; a large feature needs full sections.
22
+
23
+ ## Change Explanation Format
12
24
 
13
25
  ### Summary
14
26
 
@@ -35,6 +47,8 @@ Include when relevant:
35
47
  - trade-offs or constraints
36
48
  - assumptions made because requirements were unclear
37
49
 
50
+ Skip this section when the change is straightforward and has no meaningful trade-offs.
51
+
38
52
  ### Verification
39
53
 
40
54
  List checks run, such as:
@@ -58,6 +72,8 @@ Call out anything the developer should know before merging or shipping:
58
72
  - performance concerns
59
73
  - follow-up cleanup
60
74
 
75
+ Use "None identified" when appropriate for very small, low-risk changes.
76
+
61
77
  ### Suggested Review Focus
62
78
 
63
79
  Tell the developer where to focus review attention.
@@ -2,18 +2,8 @@
2
2
 
3
3
  Claude Code guidance for this repository.
4
4
 
5
- Follow `AGENTS.md` first. Treat it as the primary source of truth for project rules, workflows, quality standards, and handoff expectations.
5
+ Follow `AGENTS.md` first. It is the source of truth for operating rules, triggers for companion guides, planning artifacts, and required change explanations.
6
6
 
7
- When relevant, also read:
8
-
9
- - `CODE-QUALITY.md`
10
- - `WORKFLOWS.md`
11
- - `CHANGE-EXPLANATION.md`
12
- - `DESIGN-SYSTEM.md`
13
- - `TESTING.md`
14
- - `SECURITY-CHECKLIST.md`
15
- - `STACK.md`
16
-
17
- Keep context focused. Do not load companion files unless they are relevant to the task.
7
+ Do not load companion files for routine coding. Read or create from other guides only when `AGENTS.md` **When To Use Other Guides** applies or the user asks.
18
8
 
19
9
  Do not duplicate repository rules here. Update `AGENTS.md` or the relevant companion guide instead.
@@ -43,17 +43,7 @@ Use clear severity when reviewing or explaining issues:
43
43
 
44
44
  Run the narrowest useful checks first, then broaden verification for larger changes.
45
45
 
46
- Document project commands here:
47
-
48
- ```bash
49
- npm test
50
- npm run lint
51
- npm run build
52
- ```
53
-
54
- Remove commands that do not apply.
55
-
56
- For deeper testing guidance, use `TESTING.md` when present.
46
+ Use the commands documented in `AGENTS.md` **Project Commands**. For deeper testing strategy, read `TESTING.md` when present.
57
47
 
58
48
  ## Dependency Policy
59
49
 
@@ -78,14 +68,14 @@ Watch for common AI-generated issues:
78
68
  - client-only validation or authorization for sensitive actions
79
69
  - excessive comments explaining obvious code instead of clarifying intent
80
70
 
81
- ## Handoff Standard
71
+ ## Change Explanation Standard
82
72
 
83
- Every completed change should include:
73
+ Every completed change that edits files must end with a developer-facing explanation that follows `CHANGE-EXPLANATION.md` in the agent's final message.
74
+
75
+ At minimum, cover:
84
76
 
85
77
  - What changed.
86
78
  - Why it changed.
87
79
  - What checks were run.
88
80
  - Known risks or limitations.
89
81
  - Follow-up work, if any.
90
-
91
- Use `CHANGE-EXPLANATION.md` when present for the final developer-facing handoff.
@@ -1,5 +1,7 @@
1
1
  # Implementation Brief
2
2
 
3
+ Copy this file into `[briefs path, e.g. docs/briefs]` when the user, issue, or task explicitly requests an implementation brief. Agents should not read this template on every task.
4
+
3
5
  ## Title
4
6
 
5
7
  [Feature or fix name]
@@ -1,5 +1,7 @@
1
1
  # PRD Template
2
2
 
3
+ Copy this file into `[briefs path, e.g. docs/briefs]` when the user, issue, or task explicitly requests a PRD. Agents should not read this template on every task.
4
+
3
5
  ## Title
4
6
 
5
7
  [Project or feature name]
@@ -76,9 +76,9 @@ Avoid these common AI-generated security problems:
76
76
  - adding permissive CORS or CSP rules to fix local issues
77
77
  - assuming user IDs, workspace IDs, or tenant IDs from untrusted input
78
78
 
79
- ## Handoff Requirements
79
+ ## Change Explanation Requirements
80
80
 
81
- For security-sensitive work, explicitly report:
81
+ For security-sensitive work, include in the change explanation after coding:
82
82
 
83
83
  - security-sensitive files or behavior changed
84
84
  - tests or checks run
@@ -79,7 +79,7 @@ Avoid these common AI-generated testing problems:
79
79
 
80
80
  ## Reporting Verification
81
81
 
82
- In the final handoff, include:
82
+ In the change explanation after coding work, include:
83
83
 
84
84
  - checks run
85
85
  - whether they passed
@@ -2,95 +2,22 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- This document defines lightweight workflows for research, planning, implementation, review, and release.
5
+ Optional process reference for repositories that installed the **full** AgentKit template set.
6
6
 
7
- Keep this file practical. Delete sections that do not apply to the project.
7
+ `AGENTS.md` is the canonical source of truth for daily agent work. Use this file only when you need a quick map of which companion guide fits a situation.
8
8
 
9
9
  ## Choose The Right Document
10
10
 
11
11
  | Situation | Use |
12
12
  | --- | --- |
13
- | Tiny obvious fix | No formal planning doc required |
14
- | User-facing feature or product uncertainty | `PRD-TEMPLATE.md` |
15
- | Known engineering work with multiple files or risks | `IMPLEMENTATION-BRIEF-TEMPLATE.md` |
16
- | UI, styling, layout, navigation, components | `DESIGN-SYSTEM.md` |
17
- | Security-sensitive change | `SECURITY-CHECKLIST.md` |
18
- | Test strategy or test implementation | `TESTING.md` |
19
- | Final handoff or PR explanation | `CHANGE-EXPLANATION.md` |
20
-
21
- ## Research-Only Workflow
22
-
23
- Use this when the task asks for investigation, options, or recommendations without coding.
24
-
25
- 1. Confirm the research question and scope.
26
- 2. Inspect relevant code, docs, tests, and history.
27
- 3. Use external sources only when current ecosystem knowledge is needed.
28
- 4. Separate facts from recommendations.
29
- 5. Summarize trade-offs, risks, and a recommended path.
30
- 6. Do not edit files unless the task changes from research to implementation.
31
-
32
- ## Planning Workflow
33
-
34
- Use a PRD for product or user-facing work that needs intent, requirements, and acceptance criteria.
35
-
36
- Use an implementation brief for engineering work that is already understood but needs a clear execution plan.
37
-
38
- Tiny fixes can skip formal planning when the change is obvious and low risk.
39
-
40
- ## Branch Workflow
41
-
42
- - Prefer an issue-linked branch when available.
43
- - Use short, descriptive branch names:
44
- - `feature/[short-name]`
45
- - `fix/[short-name]`
46
- - `chore/[short-name]`
47
- - Keep each branch focused on one coherent change.
48
-
49
- ## Implementation Workflow
50
-
51
- 1. Read the issue, PRD, or implementation brief.
52
- 2. Inspect existing patterns and nearby tests.
53
- 3. Read relevant companion guidance from `AGENTS.md`.
54
- 4. Make the smallest complete change.
55
- 5. Add or update tests where behavior changes.
56
- 6. Run relevant checks.
57
- 7. Review the diff before handoff.
58
- 8. Explain the change using `CHANGE-EXPLANATION.md` when present.
59
-
60
- ## Pause And Ask Triggers
61
-
62
- Pause and ask before:
63
-
64
- - expanding scope beyond the request
65
- - adding dependencies
66
- - changing schemas or migrations
67
- - changing auth, permissions, privacy, billing, or data retention behavior
68
- - running destructive commands
69
- - changing design tokens, themes, or foundational layout rules
70
- - performing broad refactors or formatting-only rewrites
71
- - removing tests or weakening validation
72
-
73
- ## Review Workflow
74
-
75
- Review for correctness first, then maintainability, tests, UX, security, and style.
76
-
77
- Call out:
78
-
79
- - bugs or regressions
80
- - missing validation or error handling
81
- - missing authorization checks
82
- - overly broad abstractions
83
- - missing tests for changed behavior
84
- - UI states that are missing or inaccessible
85
- - unclear handoff, risks, or rollout notes
86
-
87
- ## Release Workflow
88
-
89
- Before release:
90
-
91
- - Confirm tests and build pass.
92
- - Confirm docs match behavior.
93
- - Confirm environment variables and migrations are documented.
94
- - Confirm no secrets or local-only files are included.
95
- - Confirm changelog or release notes are updated when the project expects them.
96
- - Confirm rollback or mitigation steps for risky changes.
13
+ | Daily implementation, approval boundaries, change explanations | `AGENTS.md` |
14
+ | Tiny obvious fix | Implement directly; no formal planning doc |
15
+ | User-facing feature or product uncertainty (planning requested) | Create from `PRD-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
16
+ | Multi-file engineering with risk (planning requested) | Create from `IMPLEMENTATION-BRIEF-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
17
+ | UI, styling, layout, navigation, components | `DESIGN-SYSTEM.md` or project design-system path |
18
+ | Security-sensitive change | `SECURITY-CHECKLIST.md` if present |
19
+ | Test strategy or test implementation | `TESTING.md` if present |
20
+ | Review, refactor, dependencies | `CODE-QUALITY.md` |
21
+ | Any task that edits repository files | Change-explanation format in `AGENTS.md` and `CHANGE-EXPLANATION.md` |
22
+
23
+ For branching, implementation steps, review expectations, and release checks, follow `AGENTS.md`.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: agentkit
3
+ description: Use when creating, syncing, auditing, repairing, or learning AgentKit-managed repository guidance and codebase changes in an agent session, especially after `agentkit skill install`, when `/agentkit init`, `/agentkit update`, `/agentkit doctor`, `/agentkit repair`, or `/agentkit learn` is requested, or when AGENTS.md, STACK.md, companion guides, managed blocks, commands, placeholders, AI tool adapters, recent diffs, or completed changes need context-aware maintenance or explanation.
4
+ compatibility: Requires agentkit CLI and agentkit.config.json with installMode skill, or existing AgentKit-managed files with block markers.
5
+ metadata:
6
+ author: thomas-agentkit
7
+ version: "1.0"
8
+ ---
9
+
10
+ # AgentKit Skill
11
+
12
+ Create, sync, audit, repair, and teach AgentKit-managed repository guidance and codebase changes using live repository context.
13
+
14
+ ## When to use
15
+
16
+ - User ran `agentkit skill install`
17
+ - User asks `/agentkit init`, `/agentkit update`, `/agentkit doctor`, `/agentkit repair`, or `/agentkit learn`
18
+ - `AGENTS.md`, `STACK.md`, companion guides, or AI adapters are missing
19
+ - Guidance has stale commands, stack details, project paths, placeholders, or broken references
20
+ - Managed blocks need context-aware update, audit, or repair
21
+ - User wants to understand recent codebase changes, a completed implementation, a diff, a bug fix, or the session
22
+
23
+ ## When not to use
24
+
25
+ - User wants terminal template install -> direct them to CLI `agentkit init`
26
+ - User wants terminal template update -> direct them to CLI `agentkit update` unless config says `installMode: skill`
27
+ - Generic documentation requests unrelated to AgentKit guidance
28
+ - Code review findings, debugging, or feature implementation requests
29
+ - Short summaries that do not require a guided teaching workflow
30
+
31
+ ## Route
32
+
33
+ Always read `references/file-contract.md` before editing or auditing AgentKit-managed files. Do not act from `SKILL.md` alone.
34
+
35
+ 1. User asks to **initialize** missing guidance files from repo context
36
+ → `references/init.md`
37
+
38
+ 2. User asks to **update** or **sync** existing guidance with current repo context
39
+ → `references/update.md`
40
+
41
+ 3. User asks to **doctor**, **audit**, **review**, **diagnose**, or **health check** guidance quality
42
+ → `references/doctor.md`
43
+
44
+ 4. User asks to **repair**, **fix malformed blocks**, **convert unmanaged guidance**, or **fix adapters**
45
+ → `references/repair.md`
46
+
47
+ 5. User asks to **learn**, **understand recent changes**, **explain the session**, **teach me what changed**, **ELI5**, **ELI14**, **explain like an intern**, or **check my understanding**
48
+ → `references/learn.md`
49
+
50
+ 6. Unsure which workflow applies
51
+ → If no guidance files exist: `references/init.md`
52
+ → If guidance exists but commands, stack, files, placeholders, adapters, or references are stale: `references/update.md`
53
+ → If user wants audit, doctor, health check, diagnosis, or review: `references/doctor.md`
54
+ → If managed blocks are malformed or unmanaged files need conversion: `references/repair.md`
55
+ → If user wants to understand completed changes or a session: `references/learn.md`
56
+
57
+ ## Non-negotiables
58
+
59
+ - `AGENTS.md` is the source of truth; AI tool adapters stay thin pointers
60
+ - Read the route reference and `references/file-contract.md` before file edits
61
+ - Preserve user content **outside** AgentKit managed blocks
62
+ - Skip unmanaged existing files unless conversion is explicitly requested
63
+ - Defer malformed managed blocks to `references/repair.md`
64
+ - Commands in guidance must come from `package.json` scripts or `agentkit.config.json` personalization — never invent scripts
65
+ - Prefer repo facts over config personalization
66
+ - Do not modify app source, lockfiles, package manifests, or CI config during AgentKit workflows
67
+ - `/agentkit learn` is read-only by default and keeps learning checklists in the conversation unless the user explicitly asks for notes
68
+ - CLI `agentkit init` installs **templates**; this skill's `agentkit init` **creates guidance files** — never confuse them
69
+
70
+ ## Gotchas
71
+
72
+ | Gotcha | Reality |
73
+ | --- | --- |
74
+ | `installMode: skill` but no `.md` files yet | Expected after `agentkit skill install`; run `/agentkit init` |
75
+ | `templateSet: minimal` | `AGENTS.md` only, plus selected adapters if explicitly configured |
76
+ | `templateSet: standard` | Core companions only; not testing/security/workflow docs |
77
+ | `templateSet: full` | Full guidance docs; adapters still follow `aiTools` |
78
+ | AI tool adapters | Thin pointers to `AGENTS.md`; never duplicate full guidance |
79
+ | `STACK.md` | Create/update when preset is configured, user asks, or stack is confidently inferred |
80
+ | Existing unmanaged files | Skip unless user asks to convert |
81
+ | Malformed managed blocks | Use `/agentkit repair` before update/refresh |
82
+ | Learning workflow | `/agentkit learn` teaches from diffs and code; it does not create notes or files by default |
83
+ | Docs-only guidance workflow | Does not require running project tests/builds |
84
+
85
+ ## Quick reference
86
+
87
+ | User says | Load |
88
+ | --- | --- |
89
+ | "/agentkit init" / "set up AGENTS.md" | `references/init.md` |
90
+ | "/agentkit update" / "sync guidance" | `references/update.md` |
91
+ | "/agentkit doctor" / "audit AgentKit guidance" | `references/doctor.md` |
92
+ | "/agentkit repair" / "fix managed blocks" | `references/repair.md` |
93
+ | "/agentkit learn" / "teach me what changed" | `references/learn.md` |
94
+ | Before any file edit | `references/file-contract.md` |
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "AgentKit"
3
+ short_description: "Create, maintain, and learn repo guidance"
4
+ default_prompt: "Use $agentkit to initialize, sync, audit, repair, or learn repository guidance and changes."
@@ -0,0 +1,133 @@
1
+ # agentkit doctor (skill workflow)
2
+
3
+ Audit AgentKit guidance quality against the current repository context and `references/file-contract.md`. This workflow is read-only by default.
4
+
5
+ Use doctor when the user asks to audit, review, check, validate, diagnose, or inspect AgentKit guidance.
6
+
7
+ ## Preconditions
8
+
9
+ - Read `references/file-contract.md` before auditing.
10
+ - Read `agentkit.config.json` when present.
11
+ - Inspect repository facts before judging guidance quality.
12
+ - Do not edit files unless the user explicitly asks for fixes after the audit.
13
+
14
+ ## Non-negotiables
15
+
16
+ - Report findings before suggesting fixes.
17
+ - Do not modify guidance files by default.
18
+ - Do not modify application source files, lockfiles, package manifests, or CI config.
19
+ - Never invent missing scripts or assume commands exist.
20
+ - Treat malformed managed blocks as blocking issues for update/refresh on that file.
21
+
22
+ ## Procedure
23
+
24
+ ### 1. Build Repo Profile
25
+
26
+ Collect:
27
+
28
+ - Project name and description from `package.json`, README, or directory name
29
+ - Package manager from lockfiles
30
+ - Scripts from `package.json`
31
+ - Framework/runtime signals, such as Next.js, SvelteKit, Express, Convex, Vite, React, Node, TypeScript
32
+ - Source layout, such as `src/`, `app/`, `pages/`, `convex/`, `test/`, `docs/`
33
+ - Test, lint, build, typecheck, and dev tooling
34
+ - UI/design system signals
35
+ - Backend/data/auth signals
36
+ - Existing docs, workflow files, PR templates, and agent guidance files
37
+
38
+ Prefer repository facts over config personalization.
39
+
40
+ ### 2. Read AgentKit State
41
+
42
+ Inspect:
43
+
44
+ - `agentkit.config.json`
45
+ - `AGENTS.md`
46
+ - `STACK.md`
47
+ - companion guidance files
48
+ - AI tool adapters
49
+ - managed block markers in every AgentKit guidance file
50
+
51
+ Record:
52
+
53
+ - Files present
54
+ - Files missing for configured `templateSet`, `preset`, and `aiTools`
55
+ - Files with valid managed blocks
56
+ - Files without managed blocks
57
+ - Files with malformed managed blocks
58
+ - Companion references in `AGENTS.md`
59
+
60
+ ### 3. Audit Checks
61
+
62
+ Check for:
63
+
64
+ - Missing `AGENTS.md`
65
+ - Missing files required by configured `templateSet`
66
+ - Missing `STACK.md` when `preset` is configured or stack is confidently inferred
67
+ - Missing AI adapters required by `aiTools`
68
+ - Invalid or unknown config values
69
+ - `installMode: template` when the user expects a skill-path workflow
70
+ - Malformed managed block markers
71
+ - Unmanaged existing guidance files that cannot be safely updated
72
+ - Bracket placeholders left in AgentKit-managed content
73
+ - Commands that do not match `package.json` scripts or explicit config/user personalization
74
+ - Stale project name, description, source layout, stack, design, testing, security, or workflow guidance
75
+ - `AGENTS.md` references to missing companion files
76
+ - AI adapters that duplicate operating rules instead of pointing to `AGENTS.md`
77
+ - Generic guidance that ignores obvious repository facts
78
+
79
+ ### 4. Severity
80
+
81
+ Classify findings:
82
+
83
+ - `Critical`: Update/refresh is unsafe or blocked, such as malformed managed blocks, missing `AGENTS.md`, or destructive-risk instructions.
84
+ - `High`: Guidance is likely wrong in daily use, such as invalid commands, broken routing, missing required configured files, or adapter duplication.
85
+ - `Medium`: Guidance is incomplete or stale, such as outdated stack/design/test/workflow details or missing optional companions.
86
+ - `Low`: Polish issues, unclear assumptions, minor generic language, or non-blocking placeholders.
87
+
88
+ If there are no findings, report that AgentKit guidance looks healthy and mention any residual uncertainty.
89
+
90
+ ### 5. Recommended Next Action
91
+
92
+ Recommend one primary next action:
93
+
94
+ - `/agentkit init` when configured guidance files are missing.
95
+ - `/agentkit update` when managed guidance exists but facts are stale.
96
+ - `/agentkit repair` when malformed managed blocks block safe updates.
97
+ - Manual config edit when `agentkit.config.json` values are wrong.
98
+ - No action when guidance is healthy.
99
+
100
+ Do not perform the recommended action unless the user asks.
101
+
102
+ ### 6. Report Format
103
+
104
+ Use this concise format:
105
+
106
+ ```md
107
+ ## AgentKit Doctor
108
+
109
+ Status: Healthy | Needs attention | Blocked
110
+
111
+ Critical
112
+ - ...
113
+
114
+ High
115
+ - ...
116
+
117
+ Medium
118
+ - ...
119
+
120
+ Low
121
+ - ...
122
+
123
+ Recommended next action:
124
+ - ...
125
+
126
+ Checked:
127
+ - Config values used
128
+ - Stack and package manager inferred
129
+ - Commands inferred
130
+ - Files inspected
131
+ ```
132
+
133
+ Omit empty severity sections.