workspace-create
Use when the workspace-builder agent must create a new team workspace from the kit
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- workspace-create
- description
- Use when the workspace-builder agent must create a new team workspace from the kit
03 SKILL.md 正文
Create a workspace
Create a new team workspace from the kit, describe it with the owner, fill its trackers, first project, repositories and domains by the workspace's own skills, and leave every file uncommitted.
Collect
Ask one question per message and wait for the answer before the next one.
- The absolute target path, for example
/Users/owner/work/abs-operations. It must be missing or an empty directory; whenls -A <target>prints anything, ask for another path. Call it<target>. workspace_name: lowercase name of the workspace, for exampleabs-operations.title: human title, for exampleABS operations workspace.forge: take it from the host of the future workspace remote. A host containinggitlabgivesgitlab,github.comgivesgithub, a local path or no forge givesgit. Ask the owner for the remote when it is not known yet.id_pattern: Python regular expression for tracker task ids, used with fullmatch, for example(DEMO|SPPP)-\d+.- A real task id from the tracker. Check it against the pattern with
python3 -c 'import re, sys; print(bool(re.fullmatch(sys.argv[1], sys.argv[2])))' '<id_pattern>' '<id>'. When it printsFalse, fixid_patternwith the owner and check again. tracker_url: task link with{id}in place of the id, for examplehttps://tracker.example/i/{id}. It must contain{id};workspace-kitrejects it otherwise.- Every other tracker of the team, asked after the seed tracker of steps 5 to 7, each as
{key, id_pattern, url}. Everykeyis a lowercase word, unique in the list; check everyid_patternandurlthe way steps 6 and 7 do. The seed tracker enters the list as the first entry with keymain. - The first project, optional: a project key of lowercase letters, digits and
-, for exampleabs. When the owner names one, the workspace getsprojects/<key>/PROJECT.mdthrough its own skills in## First project.
Create
- Run, with each value in single quotes:
~/.config/opencode/bin/workspace-kit create <target> --param workspace_name=... --param title=... --param forge=... --param id_pattern=... --param tracker_url=... - On exit 2, show the owner the message, fix the value together and rerun.
Run every command below in <target>.
Describe
- Fill
README.mdwith the owner. Keep the kit sections and add the team's specifics to them. - Fill every section of
docs/ARCHITECTURE.mdwith the owner. - Fill
tracker/trackers.jsonwith the tracker list from Collect: one object per tracker withkey,id_patternandurl, in this order, themainentry first. JSON doubles every backslash, so the pattern(DEMO|SPPP)-\d+is written(DEMO|SPPP)-\\d+in the file. - When the owner points to existing documents or code, send the
explorersubagent to read them and bring back findings. - Refer to repositories, domains, stands and decisions by keys (
repo:<name>,domain:<name>,stand:<name>,adr:NNNN). Never write home paths or stand URLs. - Pass the prose through the humanize skill before writing it.
First project
When the owner named a first project in Collect, follow the project kind of .agents/skills/extend/SKILL.md: steps 1 to 3, the project steps in ## Kinds, then steps 6 and 7 of that skill. Skip its branch, commit, rebase and push steps, and keep the key the owner gave: the result is projects/<key>/PROJECT.md. When the owner named no project, skip this section.
Repositories and domains
- For each starting repository, apply steps 2 to 9 of
.agents/skills/repos-add/SKILL.md, except step 6: no branch. - For each domain, follow the
domainkind of.agents/skills/extend/SKILL.md: steps 1 to 3, thedomainsteps in## Kinds, then steps 6 and 7. Skip its branch and commit steps.
Verify
- Run
python3 tools/generate.py, thenpython3 tools/check.py. - Fix every finding and run both again until
check.pyprints nothing. - Run
git init. The repository stays with no commits. - Show the owner the final output of both commands.
Hand-off
Report to the owner:
- the path
<target>; - the kit
nameandversionfrom.agents/kit.json; - the parameters;
- the trackers from
tracker/trackers.json; - the first project and its key, when one was created;
- the repositories and domains;
- the final
check.pyoutput.
Say that every file is uncommitted and the repository has no commits. Run git status and show its output. Then print the commands the owner runs.
- The first commit, always:
git add -A && git commit -m "chore(workspace): create from kit <version>"
- When the owner gave a remote, tell them to create it as an empty repository first, because a push does not create it:
gitlab: create an empty project in the GitLab UI, or runglab repo create <group>/<name> --privatewhenglabis available;github:gh repo create <owner>/<name> --private.
- When the owner gave a remote, print the commands to add it and push:
git remote add origin <remote>git push -u origin HEAD
For forge=git with no remote, print only the first commit commands.
Never run any of these commands yourself, even when the owner asks; your permissions deny git commit and git push.
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.