From 33153594f14f96e2ec5564e2f8566849be31bed2 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Tue, 26 May 2026 18:49:49 +0000 Subject: [PATCH] feat: wire factory principles into content index and write-skill governance check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AGENTS.md: add factory principles and factory-integration-decisions to on-demand content index so they are discoverable for skill design work - write-skill: insert conflict-check step (step 3) — sub-agent reads constitution and factory principles after grill, before any writing; hard gate with explicit self-check item; renumber steps 3–8 → 4–9 - META.md: bump to v1.4 Closes the gap identified in PRD chunk-3-skills-library §sub-agent-usage: conflict checking against constitution and factory principles was specified but never wired into the write-skill process. Co-Authored-By: Claude Sonnet 4.6 --- .agents/skills/write-skill/META.md | 2 +- .agents/skills/write-skill/SKILL.md | 15 +++++++++------ AGENTS.md | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.agents/skills/write-skill/META.md b/.agents/skills/write-skill/META.md index 30c055e..9bec5e2 100644 --- a/.agents/skills/write-skill/META.md +++ b/.agents/skills/write-skill/META.md @@ -1,5 +1,5 @@ ```yaml -version: "1.3" +version: "1.4" updated: 2026-05-26 # when: describes when this skill is loaded — the full trigger context. diff --git a/.agents/skills/write-skill/SKILL.md b/.agents/skills/write-skill/SKILL.md index 4943841..b068559 100644 --- a/.agents/skills/write-skill/SKILL.md +++ b/.agents/skills/write-skill/SKILL.md @@ -38,17 +38,19 @@ Negative trigger cases are NOT a required input. The agent proposes them based o 2. **Grill.** Run a focused grill with the /grill-me skill to reach shared understanding of: skill name, category, purpose, and use cases. One question at a time, with a recommendation for each. -3. **Write and test the trigger description.** Using the agreed name, category, purpose, and use cases from the grill, draft `description:`. Propose negative trigger cases based on the skill's purpose and adjacent skills — get explicit user confirmation before running tests. Test all three cases and show per-case PASS/FAIL. A failed case means revise and retest — do not proceed. +3. **Conflict check.** Spawn a sub-agent: read `docs/ai-constitution.md` and `docs/research/ai-coding-factory/ai-coding-factory-principles.md`, then check the agreed skill purpose and design against both documents. Return a numbered list of tensions or conflicts, or confirm none found. An empty list is a valid result — it confirms the design is clean before writing begins. Hard gate: resolve any findings before proceeding. -4. **Walk through each section.** For each section in `SKILL-TEMPLATE.md`: propose content, state where it comes from, present alternatives if they exist. Wait for explicit human confirmation before moving to the next section. +4. **Write and test the trigger description.** Using the agreed name, category, purpose, and use cases from the grill, draft `description:`. Propose negative trigger cases based on the skill's purpose and adjacent skills — get explicit user confirmation before running tests. Test all three cases and show per-case PASS/FAIL. A failed case means revise and retest — do not proceed. -5. **Copy both templates.** Copy `SKILL-TEMPLATE.md` to `.agents/skills//SKILL.md`. Copy `META-TEMPLATE.md` to `.agents/skills//META.md`. Do not modify content yet — copy first, fill second. +5. **Walk through each section.** For each section in `SKILL-TEMPLATE.md`: propose content, state where it comes from, present alternatives if they exist. Wait for explicit human confirmation before moving to the next section. -6. **Fill both files.** Fill in the copied `SKILL.md` with confirmed section content. Fill in the copied `META.md` with version, updated date, when, source (if applicable), and references (if applicable). +6. **Copy both templates.** Copy `SKILL-TEMPLATE.md` to `.agents/skills//SKILL.md`. Copy `META-TEMPLATE.md` to `.agents/skills//META.md`. Do not modify content yet — copy first, fill second. -7. **Invoke `write-eval`.** Do not mark the skill complete without an eval file. +7. **Fill both files.** Fill in the copied `SKILL.md` with confirmed section content. Fill in the copied `META.md` with version, updated date, when, source (if applicable), and references (if applicable). -8. **Prompt for HITL.** Ask the user to open a fresh session, trigger the skill, and confirm output before committing. +8. **Invoke `write-eval`.** Do not mark the skill complete without an eval file. + +9. **Prompt for HITL.** Ask the user to open a fresh session, trigger the skill, and confirm output before committing. ## Output format @@ -73,6 +75,7 @@ For placeholder conversions, `SKILL.md` replaces the existing file entirely — ## Self-check - [ ] Overlap check completed before any content was written +- [ ] Conflict check sub-agent ran against constitution and factory principles — findings resolved before any writing began - [ ] Trigger description tested against all three cases — all passed before body content was written - [ ] Negative trigger cases confirmed by user before testing - [ ] Each section confirmed explicitly by user before SKILL.md was written diff --git a/AGENTS.md b/AGENTS.md index 4aaf90c..8193a4d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,6 +23,8 @@ Read these on demand: - `docs/ROADMAP.md` — chunk status table and open questions; read this to orient on where work stands - `docs/adr/` — architectural decisions; read before answering design questions or proposing structural changes - `docs/ai-constitution.md` — full governance evidence base; read when a governance decision needs justification +- `docs/research/ai-coding-factory/ai-coding-factory-principles.md` — factory design rationale; read when implementing, auditing, or reviewing skills or factory structure +- `docs/notes/factory-integration-decisions.md` — decisions from the factory integration grill; read when making skill authoring or factory design decisions - `docs/HUMANS.md` — human practitioner checklist; applies when working with AI tools in this repo - Governance rules are always in effect — `core/instructions/governance.md` (agent rules); `docs/research/governance_principles/CONTROLS.md` (Phase 2 enforcement spec, Chunk 6)