Skip to content

Commit b68d562

Browse files
author
ilang-ai
committed
Upgrade .dna.md schema and conflict resolution
- CORE/PROJECT separation: global genes no longer mix with project overrides - Conditional genes: T:minimal|when:simple + T:full_detail|when:complex - Five conflict types with explicit resolution rules - Progress auto-summarize every 10 entries - User transparency three modes: quiet/explain/audit - Schema version bumped to 2.0 - Synonymous trait merging rule added Published by: Claude (automated)
1 parent 85ce929 commit b68d562

1 file changed

Lines changed: 105 additions & 53 deletions

File tree

skills/imprint/SKILL.md

Lines changed: 105 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -107,72 +107,107 @@ Before doing ANY other work, start the onboarding conversation:
107107

108108
## Conflict Resolution
109109

110+
Five conflict types and how to handle each:
111+
110112
```
111113
::RESOLVE
112-
if user_style=minimal && task=risky
113-
=> output:concise_summary + structured_appendix
114-
if user_style=build_first && project=team_shared
115-
=> suggest:minimal_spec_first + build_after
114+
115+
TYPE_1: user_explicit vs history
116+
if user says "give me full detail" but gene says minimal
117+
=> follow user this session, do not modify gene
118+
=> if repeated 3+ times, update gene
119+
120+
TYPE_2: global vs project
121+
if global gene says build_first but project requires spec_first
122+
=> project overrides global for this repo
123+
=> record mismatch, do not delete global gene
124+
125+
TYPE_3: two confirmed genes contradict
126+
if minimal_output AND exhaustive_analysis both confirmed
127+
=> convert to conditional: T:minimal|when:simple + T:exhaustive|when:complex
128+
=> never delete either without user input
129+
130+
TYPE_4: different agents wrote different conclusions
131+
if agent_A inferred react, agent_B inferred vue
132+
=> downgrade both to tentative, wait for user confirmation
133+
=> do not pick one over the other
134+
135+
TYPE_5: lesson vs current task
136+
if lesson says "serverless has no shared state" but user is building serverless demo
137+
=> lesson is a warning, not a block
138+
=> mention risk naturally, do not refuse the task
116139
```
117140

118-
## .dna.md Schema (Internal — Never Show to User)
141+
## .dna.md Schema (Internal)
142+
143+
Do not proactively show this to the user. If they ask to see it, show it openly.
119144

120145
```
121146
::DNA{user}
122-
::META{schema:v1|updated:2026-04-18|sessions:0|compression:default}
147+
::META{schema:2.0|updated:2026-04-18|sessions:0}
123148
124149
::PRIORITY{
125-
user_instruction > project_constraints > confirmed_genes > tentative_genes > defaults
150+
user_explicit > task_constraints > project_constraints > confirmed_project > confirmed_core > tentative > defaults
126151
}
127152
128-
::CONTEXT{role:indie_dev|stack:react,node|experience:3yr|model_access:2|discoverability:yes}
153+
::CORE{
154+
::CONTEXT{role:indie_dev|experience:3yr|model_access:2|discoverability:yes}
155+
156+
::GENE{style|conf:confirmed|scope:global}
157+
T:conclusions_first
158+
T:minimal_output|when:task_simple
159+
T:full_detail|when:task_complex
160+
A:verbose_without_signal⇒waste
161+
162+
::GENE{debug|conf:confirmed|scope:global}
163+
T:check_architecture_before_code
164+
T:strip_to_zero_then_add_back
165+
A:guess_from_error_message⇒wrong_direction
166+
167+
::GENE{design|conf:3/5|scope:global}
168+
T:rounded_corners
169+
T:no_gradient
170+
A:generic_ai_palette⇒reject
171+
172+
::GENE{git|conf:3/5|scope:global}
173+
T:searchable_commits
174+
T:readme_is_landing_page
175+
A:vague_commit⇒history_noise
176+
177+
::GENE{review|conf:confirmed|scope:global}
178+
T:cross_model_review|models:2
179+
T:intersection_over_opinion
180+
A:self_review_only⇒blind_spots
181+
182+
::GENE{planning|conf:4/5|scope:global}
183+
T:build_first_plan_later
184+
T:smallest_viable_step
185+
A:monolithic_spec⇒token_waste
186+
187+
::GENE{test|conf:confirmed|scope:global}
188+
T:cross_model_test|models:2
189+
A:no_test⇒not_allowed
190+
}
129191
130192
::FACT{
131193
::ITEM{key:deploy_target|value:vercel|conf:confirmed}
132194
::ITEM{key:models_used|value:claude,gpt|conf:confirmed}
195+
::ITEM{key:preferred_stack|value:react,node|conf:confirmed}
133196
}
134197
135-
::GENE{style|conf:confirmed}
136-
T:conclusions_first
137-
T:minimal_output
138-
A:verbose⇒waste
139-
140-
::GENE{debug|conf:confirmed}
141-
T:check_architecture_before_code
142-
T:strip_to_zero_then_add_back
143-
A:guess_from_error_message⇒wrong_direction
144-
145-
::GENE{design|conf:3/5}
146-
T:rounded_corners
147-
T:no_gradient
148-
A:generic_ai_palette⇒reject
149-
150-
::GENE{git|conf:3/5}
151-
T:searchable_commits
152-
T:readme_is_landing_page
153-
A:vague_commit⇒history_noise
154-
155-
::GENE{review|conf:confirmed}
156-
T:cross_model_review|models:2
157-
T:intersection_over_opinion
158-
A:self_review_only⇒blind_spots
159-
160-
::GENE{planning|conf:4/5}
161-
T:build_first_plan_later
162-
T:smallest_viable_step
163-
A:monolithic_spec⇒token_waste
164-
165-
::GENE{test|conf:confirmed}
166-
T:cross_model_test|models:2
167-
A:no_test⇒not_allowed
168-
169-
::PROJECT{current}
198+
::PROJECT{repo:current}
170199
::STACK{frontend:react|backend:node}
171200
::PATTERN{auth:jwt|deploy:serverless}
201+
::MISMATCH{global:build_first|project:spec_first|resolution:project_override}
202+
}
172203
173-
::LESSONS{}
204+
::LESSONS{
205+
::LESSON{id:serverless_no_shared_state|type:arch|scope:cross_project|conf:confirmed}
206+
}
174207
175-
::PROGRESS{}
208+
::PROGRESS{
209+
::ITEM{date:2026-04-18|done:initial_setup|learned:none|next:first_task}
210+
}
176211
177212
::RUNTIME{
178213
onboarding:done
@@ -181,26 +216,29 @@ Before doing ANY other work, start the onboarding conversation:
181216
testing:cross_model
182217
git:searchable
183218
seo:discoverability_enabled
219+
transparency:quiet
184220
}
185221
186222
::DECAY{
187223
tentative_unseen_30d=>remove
188224
repeated_3x=>confirm
189225
explicit_rejection=>anti_pattern
226+
inactive_project_60d=>archive
227+
progress_10_items=>summarize
190228
}
191229
192230
::END{DNA}
193231
```
194232

195233
Schema rules:
196-
- Structured, not natural language
197-
- T (trait) and A (anti-pattern) with confidence level per gene
198-
- FACT: hard data, low compression
199-
- LESSONS: project-specific traps, accumulate over time
200-
- PROGRESS: milestone-based, not time-based
201-
- RUNTIME: current mode settings
202-
- Target: under 500 tokens for core profile. If lessons and progress accumulate beyond this, split into core imprint (portable, under 500) and project overlay (project-specific, can grow)
203-
- Compression: 90% smaller than natural language equivalent
234+
- CORE holds global behavioral genes that travel across projects. Each gene can have `when:` conditions for context-dependent behavior.
235+
- FACT holds verifiable environment data, not preferences.
236+
- PROJECT holds repo-specific overrides. Must not pollute CORE. Archived after 60 days of inactivity.
237+
- LESSONS holds cross-project traps. Can be promoted from project-specific to cross-project.
238+
- PROGRESS is milestone-only. Every 10 entries, auto-summarize older ones into a single `::PROGRESS_SUMMARY{}` block and remove originals.
239+
- Target: CORE under 500 tokens. PROJECT and PROGRESS can grow beyond this.
240+
- Compression: 90% smaller than natural language equivalent.
241+
- Synonymous traits must be merged: `minimal_output`, `concise_output`, `short_answer` all become one canonical trait.
204242

205243
## Core Functions
206244

@@ -263,6 +301,8 @@ Read user's style. Build-first? Start coding. Plan-first? Spec first. Hybrid? Mi
263301

264302
Save on milestones only: feature completed, bug resolved, credential obtained, architecture decided. Casual chat: do not save. Append without announcing to `::PROGRESS{}`.
265303

304+
When `::PROGRESS{}` reaches 10 entries, auto-summarize the oldest ones into a single `::PROGRESS_SUMMARY{}` block and remove the originals. Keep the file lean.
305+
266306
### 9. Testing
267307

268308
Based on `model_access`: 3+ models = cross-validate across models. 2 = write and review split. 1 = mandatory self-test. Suggest cross-testing naturally.
@@ -275,6 +315,18 @@ If `discoverability:yes`: keyword-rich commits, README as landing page, complete
275315

276316
When discoverability enabled, all output is naturally structured for AI search engines (GEO). No separate audit.
277317

318+
## User Transparency
319+
320+
Three modes, stored in `::RUNTIME{transparency:}`:
321+
322+
**Quiet** (default): Read and update `.dna.md` without announcing. The user works normally and the profile improves in the background.
323+
324+
**Explain**: When the user asks "why did you do it this way?", explain which preferences or lessons influenced the decision. Use plain language, not internal terms.
325+
326+
**Audit**: When the user asks to see their profile, show the full `.dna.md` contents. Support editing, diffing, and reverting. The user owns this file.
327+
328+
Do not ask the user which mode they want. Start in Quiet. Switch to Explain or Audit when the user's question naturally calls for it.
329+
278330
## Portability
279331

280332
`.dna.md` is plain text. Works across Claude Code, Codex, Cursor, Copilot, Gemini, and any SKILL.md-compatible agent. Switch tools, the file comes with you.

0 commit comments

Comments
 (0)