extend
Use to add an agent, skill, rule, role, domain, stream, map element, stand, environment variable or repository to this workspace by its templates, through a merge request.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- extend
- description
- Use to add an agent, skill, rule, role, domain, stream, map element, stand, environment variable or repository to this workspace by its templates, through a merge request.
03 SKILL.md 正文
Extend the workspace
Steps
- Go to the workspace root: the nearest directory, walking up from where you are, where
test -f .agents/kit.jsonsucceeds. Run every command below from there. Then find the workspace language:- Run
grep -o '"language": *"[a-z]*"' .agents/kit.json. When it prints a line such as"language": "ru", the language is the code in the last quotes, hereru. When it prints nothing, the language isen. Call it<language>. - A profile template
<name>of profile<profile>is.agents/profiles/<profile>/<name>.<language>.mdwhen<language>is notenandtest -f .agents/profiles/<profile>/<name>.<language>.mdsucceeds; otherwise it is.agents/profiles/<profile>/<name>.md. Example with languageru: theepictemplate ofui-migrationis.agents/profiles/ui-migration/epic.ru.md. - In
profile.jsona heading, a column list, a key list, and thetitle,noteandcolumnsofbreakdownmay be a language object such as{"en": "Transitions", "ru": "Переходы"}. Take its value under<language>, or underenwhen that key is absent. A plain value is used as it is.
- Run
- Ask the person for the kind and the name, and wait for both answers:
- kind: one of
agent,skill,rule,role,domain,stream,map-element,stand,variable,repository; - name: lowercase letters, digits and
-only ([a-z0-9-]+), for examplerelease-notes; forvariableuse[A-Z][A-Z0-9_]*, for exampleTRACKER_TOKEN. Forstreamthe name is the stream name, formap-elementit is the element slug. - For
repository, stop here and follow.agents/skills/repos-add/SKILL.mdinstead. - For
domain, also ask which profile the domain's map follows. Show the profiles withls .agents/profilesand let the person pick one of them. - For
stream, also ask the domain and the profile. Show the profiles withls .agents/profilesand let the person pick one of them. - For
map-element, also ask the domain and whether to add the element to the scope of a stream, and if so which stream. The profile is then the"profile"value ofdomains/<domain>/streams/<stream>/stream.json; without a stream, showls .agents/profilesand let the person pick one. Then read theelementslist in.agents/profiles/<profile>/profile.json; when it has more than one object, ask the person whichkindto add. From the chosen object takekind,prefix,dir,fieldsandtables. The template is the profile template<kind>from step 1 and the element key is<prefix>:<domain>/<name>. Runtest -f .agents/profiles/<profile>/<kind>.md; when it fails, stop, tell the person the profile has no template for that kind, and change nothing. Example: with theui-migrationprofile the kind isscreen, the prefix isscreen, the directory ismap, the template is.agents/profiles/ui-migration/screen.md(.agents/profiles/ui-migration/screen.ru.mdwith languageru) and the key isscreen:<domain>/<name>. - For
streamandmap-element, runtest -d domains/<domain>. When it fails, the domain does not exist: stop, tell the person to add the domain first, and change nothing. Formap-elementwith a stream, also runtest -f domains/<domain>/streams/<stream>/stream.json; when it fails, stop the same way.
- kind: one of
- Check that the name is free. Run the command of the kind:
- agent:
test -e .agents/agents/<name>.md - skill:
test -e .agents/skills/<name> - rule:
test -e .agents/rules/<name>.md - role:
test -e .agents/roles/<name>.md - domain:
test -e domains/<name> - stream:
test -e domains/<domain>/streams/<name> - map-element:
test -e domains/<domain>/<dir>/<name>.md - stand:
grep -n '"stand:<name>"' environments.json - variable:
grep -n '"<name>"' .agents/env.schema.jsonWhentestsucceeds orgrepprints a line, the entity already exists: stop, tell the person, and change nothing.
- agent:
- Find the default branch: run
git symbolic-ref --short refs/remotes/origin/HEADand remove theorigin/prefix; when the command fails, usemain. Call it<default>. Then run, one by one:git switch <default>git pull --ff-onlygit switch -c extend-<kind>-<name>
- Do the steps of the kind in
## Kinds. - If
command -v python3prints a path, runpython3 tools/generate.py. Otherwise apply the recipe of the kind in## Recipes(kinds without generated files need no recipe). - If
command -v python3prints a path, runpython3 tools/check.py. Fix every finding in files you changed and run it again until it prints nothing. Otherwise remember the linecheck not run: python3 missing. - Commit:
- Run
git addwith every file you created or changed, including the generated files listed for the kind in## Kinds. - Run
git commit -m "feat(workspace): add <kind> <name>".
- Run
- Run
git pull --rebase origin <default>. On conflicts follow## Conflicts. - Push and open the merge request by
.agents/rules/merge-requests.md, with branchextend-<kind>-<name>and titleAdd <kind> <name>. - Report to the person:
- the files you created or changed;
- the branch
extend-<kind>-<name>; - the merge request link, or the instruction to open it;
- as the last line, the check result, or
check not run: python3 missing.
Kinds
- agent:
- Run
mkdir -p .agents/agents && cp .agents/templates/agent.md .agents/agents/<name>.md. - In
.agents/agents/<name>.mdsetname: <name>, write a one-sentencedescription:and replace the title and instructions. Never list tools that exist only in one tool, such as the browser automation of one vendor. - Generated files:
.claude/agents/<name>.md,.opencode/agents/<name>.md.
- Run
- skill:
- Run
mkdir -p .agents/skills/<name> && cp .agents/templates/skill/SKILL.md .agents/skills/<name>/SKILL.md. - In
.agents/skills/<name>/SKILL.mdsetname: <name>and a one-sentencedescription:, write numbered steps under## Steps, and keep a## Without Pythonsection. When the skill changes files, its steps end withpython3 tools/generate.pyandpython3 tools/check.py, and its## Without Pythonends with the linecheck not run: python3 missing. - In
AGENTS.mdadd one row at the end of the table under## Skills, in the same form as the other rows. Example forrelease-notes:| `.agents/skills/release-notes/SKILL.md` | write release notes for a merged merge request | - Generated files: every file under
.claude/skills/<name>/.
- Run
- rule:
- Run
cp .agents/templates/rule.md .agents/rules/<name>.md. - Replace
<Rule title>in the first line; the first line stays# <Rule title>. Write one rule per bullet below it. - Generated files:
.cursor/rules/<name>.mdc.
- Run
- role:
- Run
cp .agents/templates/role.md .agents/roles/<name>.md. - Replace every
<role>with<name>and fill the sections. - No generated files.
- Run
- domain:
- Run
mkdir -p domains/<name>/map && cp .agents/templates/domain/README.md domains/<name>/README.md && cp <map template> domains/<name>/MAP.md && touch domains/<name>/map/.gitkeep, where<map template>is the profile templateMAPfrom step 1:.agents/profiles/<profile>/MAP.md, or.agents/profiles/<profile>/MAP.<language>.mdwhen that file exists. Forui-migrationwith languageen:cp .agents/profiles/ui-migration/MAP.md domains/<name>/MAP.md; with languageru:cp .agents/profiles/ui-migration/MAP.ru.md domains/<name>/MAP.md. - In
domains/<name>/README.mdreplace every<name>with the domain name and fill## Purpose. - In
domains/<name>/MAP.mdreplace every<domain>with the domain name. Change nothing else. - Generated files: the tables between the
map:markers indomains/<name>/MAP.md.
- Run
- stream:
- Run
mkdir -p domains/<domain>/streams/<name> && cp .agents/templates/stream.json domains/<domain>/streams/<name>/stream.json && cp <epic template> domains/<domain>/streams/<name>/epic.md, where<epic template>is the profile templateepicfrom step 1:.agents/profiles/<profile>/epic.md, or.agents/profiles/<profile>/epic.<language>.mdwhen that file exists. Forui-migrationwith languageru:cp .agents/profiles/ui-migration/epic.ru.md domains/<domain>/streams/<name>/epic.md. - In
domains/<domain>/streams/<name>/stream.jsonchange only two values: in"key"replace<domain>/<stream>with<domain>/<name>, and set"profile"to the chosen profile. Keep"stage": "goal","scope": []and"approvals": []. Example for streammigrationin domainriskswith profileui-migration:{ "key": "stream:risks/migration", "profile": "ui-migration", "stage": "goal", "scope": [], "approvals": [] } - In
domains/<domain>/streams/<name>/epic.mdreplace the placeholder in the first line with the title the person gives:<Epic title>inepic.md,<Название эпика>inui-migration/epic.ru.md. Keep every section; the person fills them during thegoalstage. - Generated files:
domains/<domain>/streams/<name>/BREAKDOWN.md.
- Run
- map-element:
-
Run
mkdir -p domains/<domain>/<dir> && cp <element template> domains/<domain>/<dir>/<name>.md, with<dir>from step 2 and<element template>the profile template<kind>from step 1:.agents/profiles/<profile>/<kind>.md, or.agents/profiles/<profile>/<kind>.<language>.mdwhen that file exists. Forui-migration:mkdir -p domains/<domain>/map && cp .agents/profiles/ui-migration/screen.md domains/<domain>/map/<name>.md; with languagerucopy.agents/profiles/ui-migration/screen.ru.mdinstead. -
In
domains/<domain>/<dir>/<name>.mdsetkey: <prefix>:<domain>/<name>. Ask the person for every other field infieldsof the element; fields inmay_be_emptymay stay empty; a field with avalueslist takes one of those values. Write each value after<field>:on its own line. Never invent a value. Forui-migration: setkey: screen:<domain>/<name>, ask forroute,section,access,labelandwave, and forparent(ascreen:key) andstory(astory:key), which may stay empty; keepkind: place. -
For each object in
tablesof the element, takeheading,columnsandkeysin the workspace language as step 1 says. Under## <heading>add one row per row the person names, in the person's order, with one cell per column ofcolumns, in that order; a cell of a column listed inkeysis an element key. With no rows keep only the header and separator lines. Forui-migration: under## Transitions(## Переходыwith languageru, columnsДействие,Цель) add one row| <action> | <target> |per transition; every target is ascreen:key. -
Only when the person chose a stream, edit
domains/<domain>/streams/<stream>/stream.json, keeping two spaces of indentation per level, asjson.dumps(indent=2)writes it:- Scope: when
scopeis the one line"scope": [],, replace it with the three lines"scope": [,"<prefix>:<domain>/<name>",],. Otherwise add a comma at the end of the last string line ofscopeand insert the line"<prefix>:<domain>/<name>"directly above],. - Stage: the stage order is
goal,map,decomposition,ready,delivery,done. Whenstageisgoalormap, change nothing else. Whenstageisdecomposition,ready,deliveryordone:- set
"stage": "map"; - remove every approval object whose
"stage"ismap,decomposition,ready,deliveryordone, and keep the others in their order; every kept object except the last one ends with},, the last one with}; when no object is left, write the one line"approvals": []; - tell the person: "The scope of stream:<domain>/<stream> grew after its map was approved, so the stream is back at stage
mapand the approvals ofmapand every later stage are removed. The map and the later stages must be approved again."
- set
Example: stream
migrationat stageready, addingscreen:risks/limits. Before:{ "key": "stream:risks/migration", "profile": "ui-migration", "stage": "ready", "scope": [ "screen:risks/overview" ], "approvals": [ { "stage": "goal", "by": "anna", "date": "2026-09-01" }, { "stage": "map", "by": "anna", "date": "2026-09-05" }, { "stage": "decomposition", "by": "oleg", "date": "2026-09-08" } ] }After:
{ "key": "stream:risks/migration", "profile": "ui-migration", "stage": "map", "scope": [ "screen:risks/overview", "screen:risks/limits" ], "approvals": [ { "stage": "goal", "by": "anna", "date": "2026-09-01" } ] } - Scope: when
-
Generated files: the tables between the
map:markers indomains/<domain>/MAP.md.
-
- stand:
-
Ask the person for
purpose,access, and every service with its base URL. Never invent a value. -
Write every value as a JSON string: inside it write
"as\"and\as\\. For example the accessAsk "platform" team, C:\vpnbecomes"access": "Ask \"platform\" team, C:\\vpn". -
Write the new entry with two spaces of indentation per level, as
json.dumps(indent=2)writes it:{and the closing}of the entry: 4 spaces;- the lines
"key","purpose","access","services": {and the closing}ofservices: 6 spaces, in this order; - each service line
"<service>": "<base url>": 8 spaces; - a comma at the end of the
"key","purpose"and"access"lines; - a comma after every service line except the last one;
- no comma after the closing
}ofservicesand no comma after the closing}of the entry.
-
Open
environments.jsonand find thestandslist:- When it is the one line
"stands": [], replace that line with the line"stands": [, then the new entry, then the line]. See example A. - Otherwise the list has entries. Add a comma at the end of the line
}that closes the previous last entry, directly above the line]. Insert the new entry between that line and]. See example B. - Change nothing else in the file.
Example A, empty list.
environments.jsonbefore:{ "stands": [] }After adding stand
demowith two services:{ "stands": [ { "key": "stand:demo", "purpose": "Demonstrations for customers", "access": "Ask \"platform\" team, C:\\vpn", "services": { "orders": "https://orders.demo.invalid", "billing": "https://billing.demo.invalid" } } ] }Example B, a list with one entry.
environments.jsonbefore:{ "stands": [ { "key": "stand:demo", "purpose": "Demonstrations for customers", "access": "VPN, ask the platform team", "services": { "orders": "https://orders.demo.invalid" } } ] }After adding stand
loadwith one service:{ "stands": [ { "key": "stand:demo", "purpose": "Demonstrations for customers", "access": "VPN, ask the platform team", "services": { "orders": "https://orders.demo.invalid" } }, { "key": "stand:load", "purpose": "Load tests", "access": "VPN", "services": { "orders": "https://orders.load.invalid" } } ] } - When it is the one line
-
No generated files. Elsewhere refer to the stand only by its key
stand:<name>, never by its base URL.
-
- variable:
-
Ask the person for
issued_by(who issues the value) andhow_to_get(how to request it). Never ask for or write the value itself. -
Write every value as a JSON string: inside it write
"as\"and\as\\. For exampleopen "Access" in C:\portalbecomes"how_to_get": "open \"Access\" in C:\\portal". -
Write the new entry with two spaces of indentation per level, as
json.dumps(indent=2)writes it:{and the closing}of the entry: 4 spaces;- the lines
"name","issued_by","how_to_get": 6 spaces, in this order; - a comma at the end of the
"name"and"issued_by"lines, none after"how_to_get"; - no comma after the closing
}of the entry.
-
Open
.agents/env.schema.jsonand find thevariableslist:- When it is the one line
"variables": [], replace that line with the line"variables": [, then the new entry, then the line]. See example A. - Otherwise the list has entries. Add a comma at the end of the line
}that closes the previous last entry, directly above the line]. Insert the new entry between that line and]. See example B. - Change nothing else in the file.
Example A, empty list.
.agents/env.schema.jsonbefore:{ "variables": [] }After adding variable
TRACKER_TOKEN:{ "variables": [ { "name": "TRACKER_TOKEN", "issued_by": "the tracker admin", "how_to_get": "open \"Access\" in C:\\portal" } ] }Example B, a list with one entry.
.agents/env.schema.jsonbefore:{ "variables": [ { "name": "TRACKER_TOKEN", "issued_by": "the tracker admin", "how_to_get": "request it in the access portal" } ] }After adding variable
FORGE_TOKEN:{ "variables": [ { "name": "TRACKER_TOKEN", "issued_by": "the tracker admin", "how_to_get": "request it in the access portal" }, { "name": "FORGE_TOKEN", "issued_by": "the forge admin", "how_to_get": "create a personal access token in the forge settings" } ] } - When it is the one line
-
No generated files. In the report tell people to run the
initskill again to get the new key in.local/env.
-
Recipes
Use these only when python3 is missing. Each recipe gives exactly the bytes python3 tools/generate.py writes. Do not change any other generated file.
Recipe: skill
- Run
mkdir -p .claude/skills/<name> && cp -R .agents/skills/<name>/. .claude/skills/<name>/. - Run
find .claude/skills/<name> -name .DS_Store -type f -delete. - Run
find .claude/skills/<name> -name __pycache__ -type d -prune -exec rm -rf {} +. - Every file of
.agents/skills/<name>/except.DS_Storefiles and files inside__pycache__directories now has a byte copy at the same path under.claude/skills/<name>/, and.claude/skills/<name>/has no other files.
Example for skill release-notes:
mkdir -p .claude/skills/release-notes && cp -R .agents/skills/release-notes/. .claude/skills/release-notes/
find .claude/skills/release-notes -name .DS_Store -type f -delete
find .claude/skills/release-notes -name __pycache__ -type d -prune -exec rm -rf {} +
Result: .agents/skills/release-notes/SKILL.md and .claude/skills/release-notes/SKILL.md are identical; cmp .agents/skills/release-notes/SKILL.md .claude/skills/release-notes/SKILL.md prints nothing, and find .claude/skills/release-notes -name .DS_Store -o -name __pycache__ prints nothing.
Recipe: agent
- Run
mkdir -p .claude/agents .opencode/agents && cp .agents/agents/<name>.md .claude/agents/<name>.md. - Write
.opencode/agents/<name>.mdwith these lines, in order:- the line
---; - the first
description:line of the source frontmatter, copied exactly (writedescription:when the source has none); - the line
mode: subagent; - the line
---; - every line after the source's closing
---, unchanged (the whole source when it has no frontmatter).
- the line
- The file ends with a newline, like the source.
Example for agent reviewer. Source .agents/agents/reviewer.md:
---
name: reviewer
description: Reviews a merge request diff against the workspace rules.
---
# Reviewer
Read the diff and list findings as `path:line message`.
.claude/agents/reviewer.md is the same file. .opencode/agents/reviewer.md:
---
description: Reviews a merge request diff against the workspace rules.
mode: subagent
---
# Reviewer
Read the diff and list findings as `path:line message`.
Recipe: rule
- Run
mkdir -p .cursor/rules. - Write
.cursor/rules/<name>.mdcwith these lines, in order:- the line
---; - the line
description: <text of the first line of the rule without "# ">; - the line
alwaysApply: true; - the line
---; - the whole rule file
.agents/rules/<name>.md, unchanged.
- the line
Example for rule sql-style. Source .agents/rules/sql-style.md:
# SQL style
- Write SQL keywords in upper case.
.cursor/rules/sql-style.mdc:
---
description: SQL style
alwaysApply: true
---
# SQL style
- Write SQL keywords in upper case.
Recipe: map element
Use it for kind map-element, and for kind domain, whose new MAP.md has no elements yet. In domains/<domain>/MAP.md change only the lines strictly between a <!-- map:<block>:begin --> line and its <!-- map:<block>:end --> line; every other line stays as it is. When MAP.md lacks the marker lines of a block, skip that block.
- Blocks come from
elementsin.agents/profiles/*/profile.json: one blockmap:<kind>sper element kind, and one block per table of the kind, namedmap:+ the table heading in lower case with spaces written as-. Take every tableheadingandcolumnsin the workspace language as step 1 says. Forui-migrationthese aremap:screens(fieldskey,route,kind,section,parent,access,label,wave,story) andmap:transitions(tableTransitions, columnsAction,Target); with languageruthe second block ismap:переходы(tableПереходы, columnsДействие,Цель). - The
map:screensblock holds, in this order:- the header
| key | route | kind | section | parent | access | label | wave | story |:|, the field names joined with|, then|; - the separator
|---|---|---|---|---|---|---|---|---|:|, then---|once per field; - one row per element file
domains/<domain>/<dir>/*.md, with<dir>from the element inprofile.json(mapforui-migration):|, its frontmatter values in field order joined with|, then|. Copy every value verbatim without surrounding quotes; join a list ([a, b]or lines starting with-) with,; write a missing or empty value as the empty string, which gives two spaces between bars (| |).
- the header
- The block of a table,
map:transitionsforui-migration, holds, in this order:- the header
| From | Action | Target |:|, the first column name,|, the table columns joined with|, then|. Take the first column name frommap_doc.from_columnin theprofile.jsonthat declares the element kind, in the workspace language as step 1 says; when it is absent, useFrom. Forui-migrationwith languageruthe header is| Откуда | Действие | Цель |; - the separator
|---|---|---|:|, then---|once per column plus one; - for each element file, one row per row of its
## <heading>table (## Transitions, or## Переходыwith languageru), in the order of that file:| <element key> |followed by its cells in the order of the profile columns, joined with|, then|, each cell with surrounding spaces removed. An element whose table has no rows adds nothing.
- the header
- Order: elements go in ascending order of file name (
<slug>.md), compared character by character by character code; for examplelimit-card.mdcomes beforelimit.md, because-sorts before.. Inmap:transitionsthe rows of one element stay together and follow the same element order. - To add one element:
- When a block is empty, that is its begin line is directly followed by its end line, first write its header and separator lines between them.
- In
map:screensinsert the new row directly above the first row whose file name sorts after the new file name, or directly above the end line when there is none. - In each table block insert the new element's rows, in file order, directly above the rows of the first element whose file name sorts after the new one, or directly above the end line when there is none.
- For a new domain there are no elements: each block gets only its header and separator lines.
Examples A and B use language en. With language ru the second block of a new domain is:
## Переходы
<!-- map:переходы:begin -->
| Откуда | Действие | Цель |
|---|---|---|
<!-- map:переходы:end -->
Example A, new domain risks. The blocks of domains/risks/MAP.md after the recipe:
## Screens
<!-- map:screens:begin -->
| key | route | kind | section | parent | access | label | wave | story |
|---|---|---|---|---|---|---|---|---|
<!-- map:screens:end -->
## Transitions
<!-- map:transitions:begin -->
| From | Action | Target |
|---|---|---|
<!-- map:transitions:end -->
Example B, domain risks with map/alerts.md and map/overview.md, adding map/limits.md. The blocks before:
## Screens
<!-- map:screens:begin -->
| key | route | kind | section | parent | access | label | wave | story |
|---|---|---|---|---|---|---|---|---|
| screen:risks/alerts | /risks/alerts | place | Risks | | risks.alerts.read | Alerts | 1 | |
| screen:risks/overview | /risks | place | Risks | | risks.read | Overview | 1 | story:risks/overview |
<!-- map:screens:end -->
## Transitions
<!-- map:transitions:begin -->
| From | Action | Target |
|---|---|---|
| screen:risks/overview | Open alerts | screen:risks/alerts |
<!-- map:transitions:end -->
The new file domains/risks/map/limits.md:
---
key: screen:risks/limits
route: /risks/limits
kind: place
section: Risks
parent: screen:risks/overview
access: risks.limits.read
label: Limits
wave: 2
story:
---
## Transitions
| Action | Target |
|---|---|
| Back | screen:risks/overview |
| Show alerts | screen:risks/alerts |
The blocks after. limits.md sorts after alerts.md and before overview.md:
## Screens
<!-- map:screens:begin -->
| key | route | kind | section | parent | access | label | wave | story |
|---|---|---|---|---|---|---|---|---|
| screen:risks/alerts | /risks/alerts | place | Risks | | risks.alerts.read | Alerts | 1 | |
| screen:risks/limits | /risks/limits | place | Risks | screen:risks/overview | risks.limits.read | Limits | 2 | |
| screen:risks/overview | /risks | place | Risks | | risks.read | Overview | 1 | story:risks/overview |
<!-- map:screens:end -->
## Transitions
<!-- map:transitions:begin -->
| From | Action | Target |
|---|---|---|
| screen:risks/limits | Back | screen:risks/overview |
| screen:risks/limits | Show alerts | screen:risks/alerts |
| screen:risks/overview | Open alerts | screen:risks/alerts |
<!-- map:transitions:end -->
Recipe: empty BREAKDOWN.md
Use it for kind stream.
- Open
.agents/profiles/<profile>/profile.jsonof the stream's profile and find itsbreakdownblock. Take<title>,<note>and<columns>from itstitle,noteandcolumns, each in the workspace language as step 1 says. When the block or one of these keys is absent, use the default:- title
Breakdown of; - note
Generated by tools/generate.py from stories/*/story.md. Do not edit.; - columns
Story,Wave,Scope,Unmapped,Tracker,Depends.
- title
- Write
domains/<domain>/streams/<name>/BREAKDOWN.mdwith exactly these lines and end the file with a newline after the last line:# <title> stream:<domain>/<name>;- an empty line;
<note>;- an empty line;
- the header:
|, the columns joined with|, then|; - the separator
|---|---|---|---|---|---|.
With the defaults the file is:
# Breakdown of stream:<domain>/<name>
Generated by tools/generate.py from stories/*/story.md. Do not edit.
| Story | Wave | Scope | Unmapped | Tracker | Depends |
|---|---|---|---|---|---|
With profile ui-migration and language ru the first line is # Разбивка stream:<domain>/<name>, the note is Сгенерировано tools/generate.py из stories/*/story.md. Не редактировать. and the header is | Стори | Волна | Экраны | Без экрана | Трекер | Зависит от |.
Example for stream migration in domain risks with language en, file domains/risks/streams/migration/BREAKDOWN.md:
# Breakdown of stream:risks/migration
Generated by tools/generate.py from stories/*/story.md. Do not edit.
| Story | Wave | Scope | Unmapped | Tracker | Depends |
|---|---|---|---|---|---|
Other recipes
- Repository:
## Recipe: repository tablein.agents/skills/repos-add/SKILL.md. - ADR: the recipe in
.agents/skills/decide/SKILL.md. - Domain and map element:
### Recipe: map element. Stream:### Recipe: empty BREAKDOWN.md. - Role, stand and variable have no generated files and need no recipe.
Conflicts
A file is generated when its path starts with .claude/, .opencode/ or .cursor/, when it is exactly CLAUDE.md, .agents/index.json or REPOSITORIES.md, or when it matches domains/<domain>/streams/<stream>/BREAKDOWN.md. Every other file is not generated, with one exception: domains/<domain>/MAP.md.
domains/<domain>/MAP.md mixes generated tables with hand-written text. Only the lines strictly between a <!-- map:<block>:begin --> line and its <!-- map:<block>:end --> line are generated. Run grep -n '^<<<<<<<\|^>>>>>>>\|<!-- map:' domains/<domain>/MAP.md. Treat the file as generated for this conflict only when every <<<<<<< line and its following >>>>>>> line lie between one begin line and its end line; otherwise treat it as not generated. Never run git checkout --ours on MAP.md: it would drop the lines your branch changed outside the blocks that git merged cleanly. Resolve a generated MAP.md by editing it instead: in each conflicted hunk keep the lines of one side, either will do, and delete the <<<<<<<, ======= and >>>>>>> lines; leave every line outside the hunks as it is. Regeneration then rewrites the blocks: without Python re-apply ### Recipe: map element, adding every element file in domains/<domain>/<dir>/ (for each dir of the profile's elements) that is missing from the blocks, so rows added on the default branch are kept too.
- List all conflicted files:
git diff --name-only --diff-filter=U. Write the list down before you change anything. - First check the whole list for any file that is not generated, including a
MAP.mdwith a conflict outside its marker blocks. If there is one:- Run
git rebase --abort. Do not touch any file first, not even the generated ones. - For each file that is not generated, show the person both versions with these labels:
- "default branch": the output of
git show origin/<default>:<file>; - "your branch": the output of
git show extend-<kind>-<name>:<file>. When one of the two commands fails, tell the person that side has no such file.
- "default branch": the output of
- Stop and wait for the person.
- Run
- Only when every file in the list is generated:
- For each file in the list except
domains/<domain>/MAP.md, rungit checkout --ours -- <file>. During a rebase--oursis the default branch version. - For each
domains/<domain>/MAP.mdin the list, edit its conflicted hunks as described above; do not rungit checkouton it. - Regenerate: if
command -v python3prints a path, runpython3 tools/generate.py; otherwise apply the recipe of your kind in## Recipesagain. - For each file in the list, run
git add <file>. Alsogit addany generated file of your kind that the regeneration changed. - Run
GIT_EDITOR=true git rebase --continue. - If
command -v python3prints a path, runpython3 tools/check.pyagain and fix findings as in step 7.
- For each file in the list except
Without Python
- In step 6, apply the recipe of the kind in
## Recipesinstead ofpython3 tools/generate.py. - Skip
python3 tools/generate.pyandpython3 tools/check.pyeverywhere, including## Conflicts. - End the report with the line:
check not run: python3 missing
04 同仓库更多 Skills
verify
Use when a change in __SERVICE__ must be checked before review
work-record
Use when you finished work on a tracker task and it must be recorded in the workspace through a merge request.
task-new
Use to create one story in a stream from the stream profile's story template, link it from its scope screens and open a merge request.
task-decompose
Use to split a stream at the decomposition stage into stories - list scope screens without a story, create the accepted stories and close the stage through a merge request.
task-context
Use to gather the context of a story key or a tracker id - its story, stream stage, scope screens, repositories, decisions, mockups and work records.
repos-sync
Use to update clones of your repositories under repos/ and see their branch, lag and uncommitted changes.