team-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

team-setup

team-setup

Overview

概述

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:
  • User-invoked (
    /team-setup
    ) — anytime, to configure or check a project.
  • Model-invoked by
    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.
team-setup
是一个交互式 skill,可指导你完成团队 AI 指令的设置。它会提供四种模式,解释每个选项,确认你的选择并执行设置。
它有两种调用方式:
  • 用户调用(
    /team-setup
    )——可随时调用,用于配置或检查项目。
  • 由
    team-boot
    模型调用
    ——当项目在会话开始时没有
    .adlc/init-options.json
    配置(自安装),便会自动执行。因此,未配置的项目无需用户了解该命令即可完成接入。
该 skill 不会造成破坏性操作:绝不会覆盖已有文件或目录。如果目标路径中已配置团队 AI 指令,它会检测到这一点,并改为提供“已配置”模式。

When to Use

使用时机

  • Starting a new team from scratch and need a neutral team AI directives scaffold to fill in later.
  • Your team already has a directives repo on GitHub and you want to clone it locally.
  • You have a local team AI directives directory already (e.g., from a previous project) and want to wire it up.
  • You're unsure whether the team AI directives is already configured and want a quick check.
  • When the project isn't yet wired to a team AI directives (no
    .adlc/init-options.json
    team_ai_directives
    field).
  • Automatically via
    team-boot
    when it detects an unconfigured project at session start (self-install).
  • 从零开始组建新团队,需要一个中立的团队 AI 指令脚手架,以便稍后填写。
  • 团队在 GitHub 上已有指令仓库,希望将其克隆到本地。
  • 已经在本地拥有团队 AI 指令目录(例如来自之前的项目),希望将其接入项目。
  • 不确定团队 AI 指令是否已配置,希望快速检查。
  • 项目尚未接入团队 AI 指令(
    .adlc/init-options.json
    中没有
    team_ai_directives
    字段)。
  • team-boot
    在会话开始时检测到项目未配置,自动触发此流程(自安装)。

Decline Handling (when model-invoked by team-boot)

拒绝处理(由 team-boot 模型调用时)

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:
  • If the user declines at mode selection, do not run any mode. Exit cleanly and tell
    team-boot
    the user declined.
  • Offer a persistent opt-out: "Don't ask again for this project?" On yes (build mode only), write
    .adlc/init-options.json
    with
    team_ai_directives: null
    :
    bash
    echo '{"team_ai_directives": null}' > ".adlc/init-options.json"
    This marker makes
    team-boot
    skip setup silently on every future prompt.
  • In plan/read-only mode, a persistent opt-out cannot be written — the decline is session-scoped only; tell
    team-boot
    to defer.
  • Never force a mode; the setup is user-consented at every step.
当
team-boot
因项目未配置而调用此 skill 时,用户可以选择暂时不设置团队 AI 指令。应明确处理拒绝操作,以避免重复提示循环:
  • 如果用户在模式选择阶段拒绝,请勿运行任何模式。干净退出,并告知
    team-boot
    用户已拒绝。
  • 提供永久退出选项:“不再为此项目询问?”如果用户选择“是”(仅限 build 模式),则写入
    .adlc/init-options.json
    ,并设置
    team_ai_directives: null
    :
    bash
    echo '{"team_ai_directives": null}' > ".adlc/init-options.json"
    此标记会让
    team-boot
    在今后的每次提示中静默跳过设置。
  • 在 plan/只读模式下,无法写入永久退出标记;拒绝仅在当前会话范围内生效;告知
    team-boot
    暂缓处理。
  • 绝不能强制选择某种模式;设置的每一步都必须获得用户同意。

Core Process

核心流程

Goal

目标

Set up a team AI directives using one of four modes.
使用四种模式之一设置团队 AI 指令。

Security: Input Validation (all 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.
  • Paths (
    {DEST}
    ,
    {ABSOLUTE_PATH}
    ): reject if they contain any of
    `
    ,
    $
    ,
    ;
    ,
    |
    ,
    &
    ,
    (
    ,
    )
    ,
    <
    ,
    >
    , newline, or backslash. Resolve to an absolute path with
    realpath
    /
    Resolve-Path
    before use.
  • Team name: must match
    ^[A-Za-z0-9 ._-]+$
    . Reject anything else.
  • Clone URL (Mode 1): must start with
    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.
执行任何模式之前,校验每个用户提供的值(路径、URL、团队名称)。这些值会被插入 shell 命令;未经校验的输入会成为命令注入入口。
  • 路径(
    {DEST}
    、
    {ABSOLUTE_PATH}
    ):如果包含以下任一字符,则拒绝处理:
    `
    、
    $
    、
    ;
    、
    |
    、
    &
    、
    (
    、
    )
    、
    <
    、
    >
    、换行符或反斜杠。使用前通过
    realpath
    /
    Resolve-Path
    将其解析为绝对路径。
  • 团队名称:必须匹配
    ^[A-Za-z0-9 ._-]+$
    。拒绝其他所有内容。
  • 克隆 URL(模式 1):必须以
    https://
    开头。拒绝
    file://
    、
    ssh://
    以及任何非
    https
    协议,除非用户明确确认风险。克隆操作本身不会运行仓库中的代码,但 Agent 之后会读取克隆内容,因此只应克隆受信任的仓库。
如果任何值未通过校验,请说明是哪个值以及失败原因,然后重新询问。绝不能将用户提供的值插入 Python/eval 源代码字符串——应通过环境变量传递(参见模式 2)。
**快速路径:**如果
.adlc/init-options.json
已包含有效的
team_ai_directives
路径,则直接跳至模式 4(已配置)——不要重新克隆、重新指向或重新创建脚手架。

Modes at a Glance

模式概览

#ModeWhenDetails in
1Clone from GitHubteam already has a directives repo
references/mode-clone.md
2Point to existing local pathdirectives dir already exists locally
references/mode-local.md
3Scaffold new empty directivesstarting a team from scratch
references/mode-scaffold.md
4Already configuredcheck / verify existing wiring
references/mode-configured.md
#模式使用场景详情见
1从 GitHub 克隆团队已有指令仓库
references/mode-clone.md
2指向现有本地路径本地已存在指令目录
references/mode-local.md
3创建新的空团队 AI 指令从零开始组建团队
references/mode-scaffold.md
4已配置检查或验证现有接入
references/mode-configured.md

Mode 1: Clone from GitHub

模式 1:从 GitHub 克隆

Full walkthrough in
references/mode-clone.md
.
完整操作步骤见
references/mode-clone.md
。

Mode 2: Point to Existing Local Path

模式 2:指向现有本地路径

Full walkthrough in
references/mode-local.md
.
完整操作步骤见
references/mode-local.md
。

Mode 3: Scaffold New Empty team AI directives

模式 3:创建新的空团队 AI 指令

Full walkthrough in
references/mode-scaffold.md
.
完整操作步骤见
references/mode-scaffold.md
。

Mode 4: Already Configured

模式 4:已配置

Full walkthrough in
references/mode-configured.md
.
完整操作步骤见
references/mode-configured.md
。

Mode Selection Flow

模式选择流程

  1. Explore: Present the user with four options:
    How would you like to set up team-ai-directives?
    
    1) Clone from GitHub — Clone an existing repository
    2) Point to existing local path — Use a team AI directives you already have
    3) Scaffold new empty team AI directives — Create a fresh neutral team AI directives
    4) Already configured — Check existing configuration
  2. Present: For the chosen mode, explain what will happen and show details.
  3. Confirm: Ask the user to confirm before executing.
  4. Write/Execute: Perform the setup for the chosen mode.
  1. 探索:向用户提供四个选项:
    How would you like to set up team-ai-directives?
    
    1) Clone from GitHub — Clone an existing repository
    2) Point to existing local path — Use a team AI directives you already have
    3) Scaffold new empty team AI directives — Create a fresh neutral team AI directives
    4) Already configured — Check existing configuration
  2. 展示:针对所选模式说明将要执行的操作并展示具体细节。
  3. 确认:执行前要求用户确认。
  4. 写入/执行:按所选模式执行设置。

Script Entry Points (deterministic, headless use)

脚本入口(确定性、headless 使用)

The Mode 1/2 validation and wiring logic has ONE home — the shared helper scripts — and is exposed as flags so headless callers (e.g.
adlc-cli team setup --directives <path>
) run the same checks without an LLM session:
  • scripts/bash/team-helpers.sh [--validate DIR] [--wire DIR]
  • scripts/powershell/team-helpers.ps1 [-Validate DIR] [-Wire DIR]
--validate DIR
runs the Verification structure check (exit 0 when complete, exit 1 with
MISSING:
lines when not).
--wire DIR
validates, then merges the absolute path into the project's
.adlc/init-options.json
as
team_ai_directives
(existing keys preserved; refuses to wire an invalid structure). Both twins behave identically. Interactive sessions still go through Mode Selection above; the in-session path and the headless path share the same implementation.
模式 1/2 的验证和接入逻辑只有一个实现位置——共享辅助脚本——并以 flags 的形式公开,使 headless 调用方(例如
adlc-cli team setup --directives <path>
)无需 LLM 会话也能运行相同检查:
  • scripts/bash/team-helpers.sh [--validate DIR] [--wire DIR]
  • scripts/powershell/team-helpers.ps1 [-Validate DIR] [-Wire DIR]
--validate DIR
会运行 Verification 结构检查(完成时退出码为 0;未完成时退出码为 1,并输出
MISSING:
行)。
--wire DIR
会先进行验证,然后将绝对路径合并到项目的
.adlc/init-options.json
中,作为
team_ai_directives
(保留已有键;拒绝接入无效结构)。两个对应脚本的行为完全一致。交互式会话仍通过上述模式选择流程进行;会话内路径与 headless 路径共享同一实现。

Post-Setup Configuration

设置后配置

After any mode completes successfully, update the project configuration:
  1. Write
    team_ai_directives
    to
    .adlc/init-options.json
  2. Verify the team AI directives is accessible by running a quick health check:
    • {TEAM_AI_DIRECTIVES}/context_modules/constitution.md
      exists
    • {TEAM_AI_DIRECTIVES}/.skills.json
      exists and is valid JSON
  3. Check the
    .gitignore
    convention (layout allowlist — see the Gitignore Convention Check step below).
  4. Inject the project-level
    AGENTS.md
    directive — full command and managed-section contract in
    references/post-setup-agents.md
    .
  5. Install MCP config — copy-once contract (seed the project's
    .mcp.json
    only when absent; an existing project file wins and is never merged into) in
    references/post-setup-mcp.md
    .
任何模式成功完成后,更新项目配置:
  1. 将
    team_ai_directives
    写入
    .adlc/init-options.json
  2. 通过快速健康检查验证团队 AI 指令可正常访问:
    • {TEAM_AI_DIRECTIVES}/context_modules/constitution.md
      存在
    • {TEAM_AI_DIRECTIVES}/.skills.json
      存在且是有效 JSON
  3. 检查
    .gitignore
    约定(布局允许列表——参见下方 Gitignore 约定检查步骤)。
  4. 注入项目级
    AGENTS.md
    指令——完整命令与托管区块约定见
    references/post-setup-agents.md
    。
  5. 安装 MCP 配置——仅复制一次的约定(仅在项目不存在
    .mcp.json
    时进行种子写入;已有项目文件优先,且绝不合并写入),详见
    references/post-setup-mcp.md
    。

Gitignore Convention Check

Gitignore 约定检查

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):
  1. If
    .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
    ).
  2. Also verify the agent-install surface rules are ignored (
    .agents/
    ,
    .opencode/
    ,
    .claude/
    ,
    .cursor/
    ,
    .codex/
    ,
    .gemini/
    ,
    .qwen/
    ,
    .devin/
    ,
    .tabnine/
    ,
    skills-lock.json
    ,
    .skills.json
    ,
    .events.json
    ,
    .pytest_cache/
    ,
    .ruff_cache/
    ). Note that
    .mcp.json
    is deliberately not in this list: it is committed project source — human-edited, never generated — so a
    .gitignore
    entry for it is a defect to report, not a missing rule to add; its guardrail is variable names only, never literal secrets —
    env
    indirection is the guard, not
    .gitignore
    .
  3. Never remove unrelated (non-ADLC) rules; only add missing allowlist rules.
  4. Tracked legacy files keep working — the allowlist gates only untracked files, so no migration is required before the switch.
验证
.gitignore
是否遵循 ADLC 允许列表——全新执行
team setup
后,绝不能保留整体忽略
.adlc/
的规则(否则会隐藏团队模型依赖的已跟踪
.adlc/
产物):
  1. 如果
    .gitignore
    包含纯粹的
    .adlc/
    规则,则将其(以及任何与之冲突的
    .adlc/*
    +
    !.adlc/...
    行)替换为 R7 允许列表: 忽略
    .adlc/*
    、
    .adlc/evals/results/
    、
    .adlc/memory/*
    、
    .adlc/team-learn-report.md
    、
    .adlc/team-levelup-report.md
    和
    graphify-out/
    ,同时重新包含
    !.adlc/init-options.json
    、
    !.adlc/workspace.yml
    、
    !.adlc/drafts/
    、
    !.adlc/evals/
    、
    !.adlc/memory/
    、
    !.adlc/memory/evals/
    和
    !.adlc/memory/evals/holdout.json
    。规范规则列表位于 workspace skill 的
    scripts/bash/paths.sh
    (
    GITIGNORE_RULES_ALLOWLIST
    ,并在
    scripts/powershell/paths.ps1
    中同步维护)。
  2. 同时验证 Agent 安装目录相关规则已被忽略(
    .agents/
    、
    .opencode/
    、
    .claude/
    、
    .cursor/
    、
    .codex/
    、
    .gemini/
    、
    .qwen/
    、
    .devin/
    、
    .tabnine/
    、
    skills-lock.json
    、
    .skills.json
    、
    .events.json
    、
    .pytest_cache/
    、
    .ruff_cache/
    )。请注意,
    .mcp.json
    被有意排除在此列表之外:它是需要提交的项目源文件,由人工编辑且绝不自动生成,因此为它添加
    .gitignore
    条目是需要报告的缺陷,而不是需要补充的缺失规则;其防护机制仅涉及变量名称,绝不涉及明文 secret——真正的防护是
    env
    间接引用,而不是
    .gitignore
    。
  3. 绝不能删除与 ADLC 无关的规则;只添加缺失的允许列表规则。
  4. 已跟踪的旧文件仍可继续使用——允许列表仅限制未跟踪文件,因此切换前无需执行迁移。

Common Rationalizations

常见错误认知

RationalizationWhy it's wrongWhat 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.
错误认知为什么是错误的应该怎么做
“我手动克隆一下就行。”手动克隆会跳过
.adlc/init-options.json
的接入配置,因此 Agent 无法找到团队 AI 指令。
使用模式 1——它会克隆并完成配置。
“我已经有团队 AI 指令目录,直接使用即可。”该目录可能不完整(缺少必需文件),或者尚未接入配置。使用模式 2——它会验证结构并创建配置条目。
“我手动创建几个文件就行。”不完整的脚手架会破坏健康检查和 Agent 发现机制。使用模式 3——它会创建全部 10 个必需文件,并确保结构有效。
“我确定已经配置好了。”路径可能已失效、被移动,或者环境变量可能指向一个已删除的目录。使用模式 4——它会验证现有配置。
“创建脚手架时不提供团队名称也可以。”团队名称会用于
README.md
;名称为空会使团队 AI 指令失去身份标识,并且更难审计。
在模式 3 中始终提供团队名称。

Red Flags

危险信号

  • Cloning over an existing directory — Mode 1 refuses if the destination already exists to prevent overwrites.
  • Pointing to a non-existent path — Mode 2 validates the path exists before proceeding.
  • Scaffolding without required dirs being writable — Mode 3 creates directories with
    mkdir -p
    but will fail on permission errors; check permissions first.
  • Skipping the
    team_ai_directives
    config write
    — without this field in
    init-options.json
    , agents cannot discover the team AI directives.
  • Using a relative path in
    init-options.json
    — always resolve to an absolute path so the config is portable across working directories.
  • Skipping
    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
    .
  • Skipping the project-level AGENTS.md injection — without the
    <!-- 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.)
  • Interpolating user input into Python/shell source strings — pass paths through the environment (
    os.environ
    ) instead; string interpolation of
    $ABSOLUTE_PATH
    into a Python one-liner is a command-injection vector.
  • Cloning a non-
    https://
    URL in Mode 1
    — reject
    file://
    /
    ssh://
    /other schemes; cloned content is read by agents later, so only clone trusted repos.
  • Skipping the MCP config install — a project with no
    .mcp.json
    of its own is never seeded and loses access to team-declared MCP servers; a project that has one only loses the gap report (its file is never written either way).
  • Accepting shell metacharacters in paths or team names — validate before interpolating into
    mkdir
    /
    git commit
    /heredocs (see Input Validation).
  • Treating user decline as an error — declining setup is a valid outcome; exit cleanly, tell
    team-boot
    the user declined, and offer the
    team_ai_directives: null
    opt-out marker (build mode only).
  • Writing the opt-out marker in plan/read-only mode — a persistent opt-out requires a write; in plan mode the decline is session-scoped and setup defers instead.
  • 克隆到已有目录——模式 1 会在目标已存在时拒绝执行,以防止覆盖。
  • 指向不存在的路径——模式 2 会在继续之前验证路径是否存在。
  • 创建脚手架时必需目录不可写——模式 3 使用
    mkdir -p
    创建目录,但遇到权限错误时会失败;请先检查权限。
  • 跳过写入
    team_ai_directives
    配置
    ——如果
    init-options.json
    中没有此字段,Agent 将无法发现团队 AI 指令。
  • 在
    init-options.json
    中使用相对路径
    ——始终将路径解析为绝对路径,以确保配置可跨工作目录使用。
  • 在模式 3 中跳过
    git init
    ——没有 git 的脚手架式团队 AI 指令无法用于
    /team-levelup
    (分支/提交/PR 流程)。模式 3 会自动运行
    git init
    ;如果跳过,则必须在
    /team-levelup
    之前手动运行
    git init
    。
  • 跳过注入项目级
    AGENTS.md
    ——如果项目的
    AGENTS.md
    中没有
    <!-- TEAM_AI_DIRECTIVES START -->
    托管区块,不支持 event 的 Agent 就无法获得会话启动时加载团队上下文的指令。仅有
    .adlc/init-options.json
    配置并不足够——它会告诉 skill 团队 AI 指令位于何处,却没有任何信息指示 Agent 去检查它。(对于支持 event 的 Agent,会话启动 hook 无论如何都会注入初始方向说明,但
    AGENTS.md
    仍是回退方案,也是 Team Context in Use 输出约定的来源。)
  • 将用户输入插入 Python/shell 源代码字符串——应通过环境变量传递路径(
    os.environ
    );将
    $ABSOLUTE_PATH
    插入 Python 单行代码字符串会形成命令注入入口。
  • 在模式 1 中克隆非
    https://
    URL
    ——拒绝
    file://
    /
    ssh://
    /其他协议;克隆内容之后会被 Agent 读取,因此只应克隆受信任的仓库。
  • 跳过安装 MCP 配置——如果项目自身没有
    .mcp.json
    ,则不会为其进行种子写入,并且会失去对团队声明的 MCP 服务器的访问权限;如果项目已有该文件,则只会失去差异报告(无论哪种情况都不会写入其文件)。
  • 接受路径或团队名称中的 shell 元字符——在插入
    mkdir
    /
    git commit
    /heredoc 之前进行校验(参见输入校验)。
  • 将用户拒绝视为错误——拒绝设置是有效结果;应干净退出,告知
    team-boot
    用户已拒绝,并提供
    team_ai_directives: null
    退出标记选项(仅限 build 模式)。
  • 在 plan/只读模式下写入退出标记——永久退出需要写权限;在 plan 模式下,拒绝仅在当前会话范围内生效,设置操作应暂缓执行。

Verification

验证

  • The team AI directives directory exists at the configured path.
  • {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 layout allowlist (no wholesale
    .adlc/
    ignore; tracked exceptions
    !.adlc/init-options.json
    ,
    !.adlc/workspace.yml
    ,
    !.adlc/drafts/
    ,
    !.adlc/evals/
    ,
    !.adlc/memory/evals/holdout.json
    present).
  • Project-level
    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.
  • (Mode 3 only)
    git rev-parse --is-inside-work-tree
    succeeds inside
    {TEAM_AI_DIRECTIVES}
    .
  • Running
    team-verify
    (Phase 0 of team-repair) passes all 7 checks.
  • All user-supplied paths/URLs/team names passed Input Validation (no shell metacharacters; clone URL is
    https://
    ).
  • Mode 2 wrote
    team_ai_directives
    via the environment (no
    $ABSOLUTE_PATH
    interpolation into Python source).
  • If
    {TEAM_AI_DIRECTIVES}/.mcp.json
    exists: the project's
    .mcp.json
    was seeded from it only when the project had none — an existing project file was left untouched (never merged into or rewritten), any gap between the two was reported rather than closed, and unresolved env vars were highlighted.
  • (Model-invoked by
    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.
  • 团队 AI 指令目录存在于配置的路径中。
  • {TEAM_AI_DIRECTIVES}/context_modules/constitution.md
    存在。
  • {TEAM_AI_DIRECTIVES}/context_modules/rules/
    存在。
  • {TEAM_AI_DIRECTIVES}/context_modules/personas/
    存在。
  • {TEAM_AI_DIRECTIVES}/context_modules/examples/
    存在。
  • {TEAM_AI_DIRECTIVES}/CDR.md
    存在。
  • {TEAM_AI_DIRECTIVES}/.skills.json
    存在且是有效 JSON。
  • .adlc/init-options.json
    包含
    team_ai_directives
    字段,且值为绝对路径。
  • .gitignore
    遵循布局允许列表(不存在整体忽略
    .adlc/
    的规则;已跟踪例外
    !.adlc/init-options.json
    、
    !.adlc/workspace.yml
    、
    !.adlc/drafts/
    、
    !.adlc/evals/
    、
    !.adlc/memory/evals/holdout.json
    均存在)。
  • 项目级
    AGENTS.md
    存在,并包含
    <!-- TEAM_AI_DIRECTIVES START -->
    托管区块,其中含有 event hook 感知说明、回退
    team-boot
    调用和 Team Context in Use 输出约定。
  • (仅限模式 3)在
    {TEAM_AI_DIRECTIVES}
    中运行
    git rev-parse --is-inside-work-tree
    成功。
  • 运行
    team-verify
    (team-repair 的阶段 0)时,全部 7 项检查均通过。
  • 所有用户提供的路径、URL 和团队名称均通过输入校验(不包含 shell 元字符;克隆 URL 使用
    https://
    )。
  • 模式 2 通过环境变量写入
    team_ai_directives
    (未将
    $ABSOLUTE_PATH
    插入 Python 源代码)。
  • 如果
    {TEAM_AI_DIRECTIVES}/.mcp.json
    存在:仅当项目原本没有
    .mcp.json
    时,才从该文件进行种子写入;已有项目文件保持不变(绝不合并写入或重写),两者之间的差异仅被报告而不被消除,并且未解析的环境变量会被重点提示。
  • (由
    team-boot
    模型调用时)用户拒绝后已干净退出且未运行任何模式;已提供永久退出选项,并且仅在 build 模式下写入
    team_ai_directives: null
    。

Configuration

配置

  • 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.
  • Default fallback:
    team-ai-directives/
    relative to project root.
  • team-helpers.sh
    /
    team-helpers.ps1
    — Shared scripts used for scaffolding and path resolution.
  • TEAM_AI_DIRECTIVES
    ——团队 AI 指令的路径(优先于
    .adlc/init-options.json
    )。
  • .adlc/init-options.json
    ——包含
    team_ai_directives
    字段的项目级配置文件。
  • 默认回退路径:相对于项目根目录的
    team-ai-directives/
    。
  • team-helpers.sh
    /
    team-helpers.ps1
    ——用于创建脚手架和解析路径的共享脚本。

12-Factor Alignment

12-Factor 对齐

Factor XI (Directives as Code) — establishes a version-controlled team directives repository.
因子 XI(Directives as Code)——建立一个纳入版本控制的团队指令仓库。