npx skills add ...
npx skills add tikalk/adlc-team-skills --skill team-setup
Use when bootstrapping a team directives repository from scratch, cloning an existing one, pointing to a local path, or checking an existing configuration.
npx skills add tikalk/adlc-team-skills --skill team-setup
team-setup is an interactive skill that guides you through setting up the team AI directives. It presents four modes, explains each option, confirms your choice, and executes the setup.
It is invoked in two ways:
/team-setup) — anytime, to configure or check a project.team-boot — automatically at session start when a project has no .adlc/init-options.json configuration (self-install), so an unconfigured project wires itself without the user knowing the command.The skill is non-destructive: it never overwrites existing files or directories. If the target path already contains a configured team AI directives, it detects this and offers the "Already configured" mode instead.
.adlc/init-options.json team_ai_directives field).team-boot when it detects an unconfigured project at session start (self-install).When team-boot invokes this skill because the project is unconfigured, the
user may choose not to set up team AI directives right now. Handle decline
explicitly to avoid a re-prompt loop:
team-boot the user declined..adlc/init-options.json with
team_ai_directives: null:
team-boot skip setup silently on every future prompt.team-boot to defer.Set up a team AI directives using one of four modes.
Before executing any mode, validate every user-supplied value (paths, URLs, team names). These values are interpolated into shell commands; unvalidated input is a command-injection vector.
{DEST}, {ABSOLUTE_PATH}): reject if they contain any of
`, $, ;, |, &, (, ), <, >, newline, or backslash.
Resolve to an absolute path with realpath/Resolve-Path before use.^[A-Za-z0-9 ._-]+$. Reject anything else.https://. Reject file://, ssh://,
and any non-https scheme unless the user explicitly confirms the risk.
Cloning runs no code from the repo, but the cloned content is read by agents
later — only clone repositories you trust.If any value fails validation, report which value and why, and re-ask. Never interpolate a user value into a Python/eval source string — pass it through the environment (see Mode 2).
Fast path: if .adlc/init-options.json already contains a valid team_ai_directives path, skip to Mode 4 (Already Configured) — do not re-clone, re-point, or re-scaffold.
| # | Mode | When | Details in |
|---|---|---|---|
| 1 | Clone from GitHub | team already has a directives repo | references/mode-clone.md |
| 2 | Point to existing local path | directives dir already exists locally | references/mode-local.md |
| 3 | Scaffold new empty directives | starting a team from scratch | references/mode-scaffold.md |
| 4 | Already configured | check / verify existing wiring | references/mode-configured.md |
Full walkthrough in references/mode-clone.md.
Full walkthrough in references/mode-local.md.
Full walkthrough in references/mode-scaffold.md.
Full walkthrough in references/mode-configured.md.
Explore: Present the user with four options:
Present: For the chosen mode, explain what will happen and show details.
Confirm: Ask the user to confirm before executing.
Write/Execute: Perform the setup for the chosen mode.
After any mode completes successfully, update the project configuration:
team_ai_directives to .adlc/init-options.json{TEAM_AI_DIRECTIVES}/context_modules/constitution.md exists{TEAM_AI_DIRECTIVES}/.skills.json exists and is valid JSON.gitignore convention (ADR-401 R7 allowlist — see the Gitignore Convention Check step below).AGENTS.md directive — full command and managed-section contract in references/post-setup-agents.md.references/post-setup-mcp.md.Verify .gitignore follows the ADLC allowlist — a fresh team setup must
never leave a wholesale .adlc/ ignore in place (it would hide the tracked
.adlc/ artifacts the team model relies on):
.gitignore contains a bare .adlc/ rule, replace it (and any
.adlc/* + !.adlc/... lines that conflict) with the R7 allowlist:
ignore .adlc/*, .adlc/evals/results/, .adlc/memory/*,
.adlc/team-learn-report.md, .adlc/team-levelup-report.md, and
graphify-out/, while re-including !.adlc/init-options.json,
!.adlc/workspace.yml, !.adlc/drafts/, !.adlc/evals/,
!.adlc/memory/, !.adlc/memory/evals/, and
!.adlc/memory/evals/holdout.json. The canonical rule list lives in the
workspace skill's scripts/bash/paths.sh (GITIGNORE_RULES_ALLOWLIST,
mirrored in scripts/powershell/paths.ps1)..agents/,
.opencode/, .claude/, .cursor/, .codex/, .gemini/, .qwen/,
.devin/, .tabnine/, skills-lock.json, .skills.json, .mcp.json,
.events.json, .pytest_cache/, .ruff_cache/).| Rationalization | Why it's wrong | What to do instead |
|---|---|---|
| "I'll just clone it manually." | Manual cloning skips the .adlc/init-options.json wiring, so agents won't find the team AI directives. | Use Mode 1 — it clones AND configures. |
| "I already have a team AI directives directory, I'll just use it." | The directory may be incomplete (missing required files) or not wired in config. | Use Mode 2 — it validates the structure and creates the config entry. |
| "I'll just create a few files by hand." | An incomplete scaffold breaks health checks and agent discovery. | Use Mode 3 — it creates all 10 required files with valid structure. |
| "I'm sure it's already configured." | The path may be stale, moved, or the env var may point to a deleted dir. | Use Mode 4 — it validates the existing configuration. |
| "Scaffolding without a team name is fine." | The team name is used in README.md — a blank name makes the team AI directives anonymous and harder to audit. | Always provide a team name in Mode 3. |
mkdir -p but will fail on permission errors; check permissions first.team_ai_directives config write — without this field in init-options.json, agents cannot discover the team AI directives.init-options.json — always resolve to an absolute path so the config is portable across working directories.git init in Mode 3 — a scaffolded team AI directives without git cannot be used by /team-levelup (branch/commit/PR flow). Mode 3 runs git init automatically; if you skip it, run git init manually before /team-levelup.<!-- TEAM_AI_DIRECTIVES START --> managed section in the project's AGENTS.md, agents without event support have no session-start instruction to load team context. The .adlc/init-options.json config alone is insufficient — it tells skills where the team AI directives is, but nothing tells the agent to check. (For agents with event support, the session-start hook injects the orientation regardless, but AGENTS.md remains the fallback and the source of the Team Context in Use output contract.)os.environ) instead; string interpolation of $ABSOLUTE_PATH into a Python one-liner is a command-injection vector.https:// URL in Mode 1 — reject file:///ssh:///other schemes; cloned content is read by agents later, so only clone trusted repos..mcp.json servers stay unconfigured; the project won't have access to team-declared MCP servers.mkdir/git commit/heredocs (see Input Validation).team-boot the user declined, and offer the team_ai_directives: null opt-out marker (build mode only).{TEAM_AI_DIRECTIVES}/context_modules/constitution.md exists.{TEAM_AI_DIRECTIVES}/context_modules/rules/ exists.{TEAM_AI_DIRECTIVES}/context_modules/personas/ exists.{TEAM_AI_DIRECTIVES}/context_modules/examples/ exists.{TEAM_AI_DIRECTIVES}/CDR.md exists.{TEAM_AI_DIRECTIVES}/.skills.json exists and is valid JSON..adlc/init-options.json contains a team_ai_directives field with the absolute path..gitignore follows the ADR-401 R7 allowlist (no wholesale .adlc/ ignore; tracked exceptions !.adlc/init-options.json, !.adlc/workspace.yml, !.adlc/drafts/, !.adlc/evals/, !.adlc/memory/evals/holdout.json present).AGENTS.md exists and contains the <!-- TEAM_AI_DIRECTIVES START --> managed section with the event-hook awareness note, fallback team-boot invocation, and the Team Context in Use output contract.git rev-parse --is-inside-work-tree succeeds inside {TEAM_AI_DIRECTIVES}.team-verify (Phase 0 of team-repair) passes all 7 checks.https://).team_ai_directives via the environment (no $ABSOLUTE_PATH interpolation into Python source).{TEAM_AI_DIRECTIVES}/.mcp.json exists, any declared mcpServers were successfully merged into the project's config, and unresolved env vars were highlighted.team-boot) a user decline exited cleanly without running any mode; the persistent opt-out was offered, and team_ai_directives: null was written only in build mode.TEAM_AI_DIRECTIVES — Path to the team AI directives (overrides .adlc/init-options.json)..adlc/init-options.json — Project-level config file with team_ai_directives field.team-ai-directives/ relative to project root.team-helpers.sh / team-helpers.ps1 — Shared scripts used for scaffolding and path resolution.Factor XI (Directives as Code) — establishes a version-controlled team directives repository.*`