refactor(kyberforge): address #154 review and drop commit steps from author skills
- instructions-author: keep two Gotchas, move the rest to the Step 2 contract and verify.md; add references/content.md on what belongs in an instructions file and tighten the template bullets to match - instructions-author, skill-author, agent-author: remove the commit verification step; committing is out of scope for author skills - skill-author 1.0.6, agent-author 1.0.4 (ADR-0022 patch bumps) Refs #148 Co-Authored-By: Claude Code <[email protected]> Claude-Session: https://claude.ai/code/session_01KkT7RSDwDbmrM9T34b6sTi
This commit is contained in:
1 parent
6328816584
commit
d576695bb9
10 files changed
+67
-22
No files matched your search
@@ -0,0 +1,41 @@
|
||||
---
|
||||
source_keys:
|
||||
- claude-code-memory-docs
|
||||
---
|
||||
|
||||
# What belongs in an instructions file
|
||||
|
||||
Reached from `SKILL.md` Step 2. Claude reads instructions as context, not as enforced configuration, so a rule only helps if it is specific, short and not contradicted elsewhere.
|
||||
|
||||
## Write rules an agent can check
|
||||
|
||||
| Weak | Checkable |
|
||||
|---|---|
|
||||
| Format code properly | Use 2-space indentation |
|
||||
| Test your changes | Run `npm test` before committing |
|
||||
| Keep files organized | API handlers live in `src/api/handlers/` |
|
||||
|
||||
Group related bullets under a short heading. Give the reason when a rule looks arbitrary; a rule with a stated reason survives the edge case.
|
||||
|
||||
## Keep
|
||||
|
||||
- Conventions that differ from the tool's default.
|
||||
- Pitfalls the agent would walk into, with the reason.
|
||||
- Build, test and lint commands; where things live when a path cannot be guessed.
|
||||
|
||||
## Cut
|
||||
|
||||
- What the agent can read from the code: directory listings, dependency lists, architecture overviews.
|
||||
- Anything stated in another file that loads alongside this one. Two copies drift, and contradictory rules are followed arbitrarily.
|
||||
- Generalities ("write clean code").
|
||||
|
||||
## Right artifact?
|
||||
|
||||
| The content is | Put it in |
|
||||
|---|---|
|
||||
| A rule for part of the codebase | This file, with a quoted `applyTo` |
|
||||
| A rule for every session | This file without `applyTo`, or `AGENTS.md` (`agentsmd-author`) |
|
||||
| A multi-step procedure or one task's guidance | A skill (`skill-author`) |
|
||||
| Something that must run at a fixed point or be blocked | A hook, or a `permissions.deny` setting; an instruction is not enforcement |
|
||||
|
||||
If the answer is not this file, say so to the user and stop; do not bend the content into a rule.
|
||||
@@ -34,6 +34,6 @@ Replace every `FILL IN:` and delete the template's comments.
|
||||
|
||||
- `applyTo`: quoted. Omit it only for a rule that must load in every session, and say so to the user; it costs context at every launch.
|
||||
- `description`: one line. Write the body as if it were absent, because Claude Code never sees it.
|
||||
- Body: bullets, one topic, paths in backticks, nothing that assumes another file is loaded.
|
||||
- Body: concrete bullets, one topic, paths in backticks, nothing that assumes another file is loaded. Read `references/content.md` if unsure the content belongs in an instructions file.
|
||||
|
||||
For glob syntax or a field question, read `references/schema.md`.
|
||||
@@ -38,8 +38,8 @@ source_keys:
|
||||
|
||||
- **URL:** https://code.claude.com/docs/en/memory
|
||||
- **Research doc:** plugins/kyberforge/docs/research/docs/microsoft-apm/sources.md (digest: plugins/kyberforge/docs/research/docs/microsoft-apm/instructions-target-mapping.md)
|
||||
- **Description:** Claude Code memory documentation: `.claude/rules/` loading, the `paths` field as the only field read, invalid YAML ignored, size guidance.
|
||||
- **Contributing files:** SKILL.md, references/schema.md, references/target-mapping.md
|
||||
- **Description:** Claude Code memory documentation: `.claude/rules/` loading, the `paths` field as the only field read, invalid YAML ignored, size and specificity guidance, instructions versus skills and hooks.
|
||||
- **Contributing files:** SKILL.md, references/schema.md, references/target-mapping.md, references/content.md
|
||||
- **Status:** `extracted`
|
||||
|
||||
## github-copilot-custom-instructions-docs
|
||||
|
||||
@@ -7,7 +7,7 @@ source_keys:
|
||||
|
||||
Reached from `SKILL.md` Step 3. Run step 2 outside the repo: `apm install` writes `apm_modules/`, `apm.lock.yaml` and a rules directory, and install overwrites hand-authored rule files without warning.
|
||||
|
||||
1. From the package root, a real compile, never `--validate`:
|
||||
1. From the package root, a real compile. `--validate` always exits 0 and hides the missing-`description`, missing-`applyTo` and empty-body warnings, so it verifies nothing:
|
||||
|
||||
```bash
|
||||
apm compile --dry-run --target claude
|
||||
@@ -27,6 +27,6 @@ Reached from `SKILL.md` Step 3. Run step 2 outside the repo: `apm install` write
|
||||
|
||||
3. The deployed file must open with `paths:` listing the intended globs. No frontmatter block at all means `applyTo` was missing or did not parse: the rule would load in every session.
|
||||
|
||||
4. To check the compiled root file instead, compile in that same clean directory *before* installing, or pass `--force-instructions`; after an install, `--target claude` writes nothing.
|
||||
4. Once rules sit in `.claude/rules/`, `apm compile --target claude` writes no `CLAUDE.md` and still exits 0, so an exit-code check proves nothing. To check the compiled root file instead, compile in that same clean directory *before* installing, or pass `--force-instructions`; after an install, `--target claude` writes nothing.
|
||||
|
||||
Delete the directory afterwards. Report only what was observed; Cursor's list-form `globs` and the Windsurf, Kiro and Antigravity runtimes stay unverified.
|
||||
Reference in new issue
Block a user