원본 Skill 문서
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Setup G-Cubed Skills
Set up MSG operating guidance without silently rewriting the user's existing instructions.
The Skills CLI owns skill selection, agent selection, and global/project install scope. This setup skill does not install, select, enable, disable, or enumerate other skills. It only proposes MSG Architect methodology from the bundled template, includes project-memory methodology guidance when that skill is installed for the target AGENTS.md scope, keeps all changes review-first, and removes this setup skill after successful validation.
Assets
- Architect methodology template:
assets/templates/global-architect-agents.md
Workflow
- Resolve the target
AGENTS.md:
- Use the file the user named when they provide one.
- Otherwise, if inside a git repository or obvious workspace, use the repository/workspace root
AGENTS.md, not the current subdirectory. - For global setup, use the user's Codex
AGENTS.mdonly when the user explicitly asks for global setup or no repository/workspace target applies. - If the target is ambiguous, ask one concise question. Do not ask the user to reselect skills or install scope;
npx skillsalready handled that.
- Load bundled assets before proposing:
- Read
assets/templates/global-architect-agents.mdfrom this installed skill directory and treat it as the source candidate for Architect methodology. - Render the Architect methodology from the bundled template. Do not recreate, paraphrase, or infer this methodology from active session instructions, global
AGENTS.md, memory, or conversation history. - Determine the target skill scope from the resolved
AGENTS.md: project/devcontainer/Codespace targets use the target repo or workspace skill install; global targets use the global Codex skill install. - If
$project-memoryis installed for the target skill scope, read its bundledassets/snippets/project-memory-methodology.mdand replace{{PROJECT_MEMORY_METHODOLOGY}}with that snippet. If$project-memoryis not installed for the target skill scope, remove the placeholder. - A globally installed
$setup-gcubed-skillsmay configure a project-localAGENTS.md; in that case, use the project-local skill state for$project-memory, not the global setup skill's sibling directory. - When file inspection is needed for a project target, check the target repo's
skills-lock.jsonand.agents/skills/. If they disagree, surface the inconsistency in the proposal and prefer actually present skill files for rendering bundled snippets. - When file inspection is needed for a global target, check the global Codex skill directory that contains this setup skill and any available global skills lock/state.
- Use an existing target
AGENTS.md, current/global instructions, and conversation context only as merge context. Do not use them as the source for MSG Architect methodology. - If active/global instructions contradict the bundled template, prefer the bundled template for MSG-owned methodology and surface the conflict in the proposal.
- If the bundled Architect template cannot be read or rendered, stop and report the missing asset. Do not fall back to ambient or global
AGENTS.mdprose.
- Inspect before proposing:
- Read the target
AGENTS.mdif it exists. - For project/devcontainer scope, inspect repo-local guidance enough to avoid contradicting it.
- When
$project-memoryis installed for the target scope, inspect the target docs memory set enough to identify durable project facts that already belong indocs/. - Notice existing generated blocks and manually maintained instructions from any collection. Preserve them unless the user explicitly asks to clean them up.
- Apply the Architect methodology policy:
- Architect behavior is scope-independent. Apply it to global, project, devcontainer, and Codespace targets from the same bundled template.
- Do not weaken, omit, or reinterpret Architect behavior because the target is project-local.
- Project-local instructions may add domain-specific constraints, but they do not disable Architect behavior unless the user explicitly asks to remove or change it.
- Preserve stronger existing local constraints around safety, approvals, commands, secrets, validation, and project conventions. Surface conflicts instead of silently resolving them.
- Prepare the proposal:
- If the target
AGENTS.mdis missing, propose the rendered Architect template as the new file. - If the target
AGENTS.mdalready has meaningful instructions, propose an intelligent merge between the rendered bundled source candidate and the existing target as merge context, rather than a blind replacement. - When
$project-memoryis installed, do not preserve durable project facts inAGENTS.mdmerely because they already exist there. Propose moving runtime flow, environment variable catalogs, release procedure, architecture overview, current status, roadmap, and long maintenance notes into the smallest appropriatedocs/files, leavingAGENTS.mdas concise guardrails plus pointers. - Keep project-local guardrails short and actionable: usually 5-10 bullets, one or two lines each. If a guardrail needs background, examples, runtime flow, or operational procedure, put the explanation in
docs/and link or point to it fromAGENTS.md. - Preserve unrelated skill collection instructions. Do not generate a per-skill instruction list; installed skills are loaded from the scope selected by
npx skills. - Remove duplicate or contradictory MSG-owned setup guidance only. Preserve user/project safety rules and unrelated collection guidance unless the user explicitly approves changing them.
- If older G-Cubed setup prose duplicates only now-obsolete setup guidance, propose removing or replacing it, but preserve it unchanged unless the user approves.
- Quality-check the proposal:
- Report the proposed
AGENTS.mdline count and word count. - Warn when global guidance exceeds roughly 40 lines or 500 words.
- Warn when project-local guidance grows beyond 5-10 concise guardrail bullets or starts carrying durable project facts.
- Flag content that should move behind progressive disclosure: long procedures, tool catalogs, environment catalogs, runtime flow, release steps, architecture overviews, current status, roadmaps, pasted transcripts, and repeated per-skill instructions.
- Flag contradictions or weakened constraints around delegation, first-start sub-agent disclosure, approvals, destructive changes, local override order, read-only versus implementation behavior, dirty worktree preservation, validation, and secret handling.
- Prefer warnings over hard failure, but stop when the proposal would silently weaken safety, discard user/project constraints, or contradict the bundled Architect source.
- Include a short "kept / compressed / moved to docs or skills" summary before the diff.
- Show before writing:
- The source path used for the Architect methodology and its first non-heading sentence, so the user can verify provenance.
- Whether project-memory guidance was included because
$project-memoryis installed for the target skill scope, or omitted because$project-memoryis not installed for that scope. - The proposal quality-check counts, warnings, and kept/compressed/moved summary.
- Short semantic summary.
- Unified diff, or full proposed file if creating a missing file.
- Any conflicts, assumptions, or questions.
- A clear note that approval means the setup skill will re-read the target, write the approved content when changes are needed, validate the result, and then uninstall only
$setup-gcubed-skillsfrom the scope that supplied the running skill. - If the proposed file matches the target, report that no
AGENTS.mdchanges are needed, skip the write and backup steps, then continue to validation and self-removal because setup is already complete.
- Write only after explicit approval when changes are needed:
- Re-read the target immediately before writing. If it changed since the diff was shown, stop and show a refreshed proposal instead of writing stale approved content.
- Back up the existing target first when one exists, using a unique timestamped backup path that will not overwrite an earlier backup.
- Apply the approved content exactly.
- Validate the completed setup before uninstalling:
- Re-read the target
AGENTS.mdafter writing, or immediately for a no-change setup, and confirm it exactly matches the approved or already-matching proposed content. - Confirm no unresolved setup placeholders remain, including
{{PROJECT_MEMORY_METHODOLOGY}}. - Confirm the project-memory methodology block is present or absent according to the proposal.
- Re-run the line and word counts from the proposal and report material drift.
- Confirm a backup path was created when the target already existed and the setup wrote changes.
- If validation fails, stop, do not uninstall the setup skill, and report the exact issue and recovery path.
- Remove this bootstrap skill after successful validation:
- Remove only
$setup-gcubed-skills, and remove it from the scope that supplied the running skill. Do not remove project workflow skills such as$project-memory,$skill-capture,$review-synthesis, or$code-structure-cleanup. - For a global setup skill, run
npx skills remove --global setup-gcubed-skills. - For a project/devcontainer/Codespace setup skill, run
npx skills remove setup-gcubed-skillsfrom that project or workspace root. - If the running setup skill scope is ambiguous, ask one concise question before removing anything.
- If the Skills CLI is unavailable or removal fails, leave the setup result in place, report the manual command to run, and explain that the skill remains installed until removal succeeds.
- Finish with lifecycle guidance:
- Tell the user validation passed, what scope the setup skill was removed from, and that this keeps future startup context lean because the durable guidance now lives in
AGENTS.md. - Tell the user to restart Codex, reload the workspace, or start a new Codex thread so the updated
AGENTS.mdand skill inventory are loaded. - Point back to this repo's README install instructions for reinstalling
$setup-gcubed-skillsif Architect guidance needs refreshing later.
Boundaries
- This skill does not install skills or choose which skills are active. Use
npx skills@latest add McKibbin-Software-Group/gcubed-skillsfor that. - This skill removes only itself after successful validation. It must never remove or disable unrelated skills.
- This skill does not wire installed skills into
AGENTS.md; Codex loads installed skills from the selected install scope. - This skill does not create the project docs memory baseline. Use
$project-memoryfor that when the target repo wants one. - Architect methodology adoption is review-first; never silently replace or substantially rewrite an existing
AGENTS.md. - Canonical instruction prose belongs in assets, not shell scripts.
