add-feature
Use when adding a medium or larger feature (or a non-trivial change) to the azure-functions-agents-runtime repository — i.e. anything that introduces new public surface, spans multiple modules, or changes authoring/discovery/registration behavior. Drives the full feature lifecycle defined in AGENTS.md: triage + worktree, writing a Feature Requirements Document (FRD) with a Decisions log, an architecture-review checkpoint, surgical implementation, a testing checkpoint, and documentation updates. Trigger on requests like 'add a feature', 'I want to implement X', 'let's design X', or when a change is clearly larger than a nit/bug/small fix. Do NOT use for typos, formatting, comments, or self-contained one-module fixes — those follow the lightweight lane in AGENTS.md.
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 13
- Forks
- 10
01 前言 Front Matter
- name
- add-feature
- description
- Use when adding a medium or larger feature (or a non-trivial change) to the azure-functions-agents-runtime repository — i.e. anything that introduces new public surface, spans multiple modules, or changes authoring/discovery/registration behavior. Drives the full feature lifecycle defined in AGENTS.md: triage + worktree, writing a Feature Requirements Document (FRD) with a Decisions log, an architecture-review checkpoint, surgical implementation, a testing checkpoint, and documentation updates. Trigger on requests like 'add a feature', 'I want to implement X', 'let's design X', or when a change is clearly larger than a nit/bug/small fix. Do NOT use for typos, formatting, comments, or self-contained one-module fixes — those follow the lightweight lane in AGENTS.md.
02 资源文件 1
- 参考文档references/split-rules.md5.6 KB
03 SKILL.md 正文
add-feature — feature lifecycle for azure-functions-agents-runtime
This skill operationalizes the lifecycle in AGENTS.md §1
for medium+ features. Run the phases in order; each has an exit gate — do not
advance until it is met. Record consequential feature-behavior choices in
the FRD Decisions log, not delivery or PR-management decisions.
When to use
Use for medium+ features: new public surface (frontmatter keys, config, endpoints), cross-module changes, or new discovery/registration/authoring behavior. Skip (use the lightweight lane) for nits, typos, and self-contained one-module bug fixes.
Prerequisites
- Read
AGENTS.md(process) anddocs/architecture.md§2–§3 (design + module map). - Know the canonical gate commands (
AGENTS.md§3).
Phase 0 — Triage + worktree (gate: scope + lane agreed)
- Confirm the change is genuinely medium+. If not, drop to the lightweight lane.
- Agree a short slug and create a worktree off
main:git worktree add \ ../copilot-worktrees/azure-functions-agents-runtime/<user>-<slug> \ -b <user>/<slug> main
Phase 1 — FRD (gate: FRD drafted)
- Determine the next FRD number: highest
docs/frds/NNNN-*.md+ 1, zero-padded. - Copy
docs/frds/_template.md→docs/frds/<NNNN>-<slug>.md. - Fill every section. Map the Proposed design onto the pipeline stages (discover → translate → register → execute) and describe the intended behavior, compatibility boundaries, and acceptance criteria. Do not describe the PR sequence, slice scope, ownership, schedule, or rollout plan in the FRD.
- Seed the Decisions log with feature-contract choices and who made them (Human vs Agent). Do not record implementation or delivery planning there.
- If the implementation is too large or risky for one reviewable PR, read
references/split-rules.md. Discuss the PR sequence and dependencies in PR descriptions or a separate delivery plan, never in the FRD. - Keep the FRD focused on intended behavior, contracts, and durable decisions.
Do not encode delivery mechanics such as PR numbers, commit SHAs, temporary
slice/phasing labels, or package versions already owned by
pyproject.toml. - Write in crisp, plain English. Use short sentences, define terms on first use, assume little background context, and state conclusions as facts. Do not narrate investigation history in the FRD; put evidence in PR descriptions.
- Never cite Decisions-log numbers in FRD prose or cross-references; describe the decision instead, because numbers shift on merges/renumbering.
Phase 2 — Architecture review (planning mode) (gate: human sign-off → status: Finalized)
- Run a dedicated review pass — prefer a review sub-agent (e.g.
rubber-duck) so the author's context does not bias it. Ask it to judge the FRD for:- completeness (all sections answered, edge cases, compatibility);
- alignment with the
docs/architecture.mdmodule map and pipeline boundaries (discovery read-only; registration is the only Azure-aware stage; lazy runner); - whether the public surface stays consistent with
docs/front-matter-spec.md.
- Iterate on the FRD until findings are resolved. Append decisions to the log.
- Get explicit human sign-off, record it in §8, and set
status: Finalized. Do not implement before the FRD is Finalized.
Phase 3 — Implementation (gate: ruff + mypy clean)
For multi-PR delivery, repeat phases 3–5 for every approved slice. Give each
slice its own branch and worktree as described in AGENTS.md.
- Implement product changes only, per the finalized FRD. Keep diffs surgical; no unrelated refactors.
- For multi-PR delivery, implement only the agreed delivery slice and keep its dependency and review scope explicit in the PR, not the FRD.
- Follow
AGENTS.md§5 conventions (PEP 695 type aliases, strict typing, Pydantic v2 base-class fields, MAF default with only AGENTS.md's bounded app-level Copilot preview exception, shared_logger). - Run and pass:
python -m ruff check src tests python -m mypy src
Phase 4 — Testing (gate: full gate green)
- Design coverage for the current slice's behavior — prefer a separate testing review pass (sub-agent or fresh checklist) so gaps are caught independently.
- Add tests under
tests/, mirroring source modules. For config/authoring changes, add a scenario folder undertests/fixtures/config_scenarios/. - For bug-adjacent work, add a failing regression test first.
- Run the full CI-equivalent gate:
python -m pytest --cache-clear --cov=./src/azure_functions_agents --cov-report=xml --cov-branch tests
Phase 5 — Docs (gate: DoD met)
- Update documentation made inaccurate by the current slice.
docs/architecture.md(module map / pipeline) is the design source of truth and must stay accurate. - If schema.py changed:
- Run
python eng/scripts/generate_config_reference.pyto regenerate the reference - Use the
update-schema-docsskill to add examples todocs/front-matter-spec.mdand reviewdocs/architecture.mdfor consistency - Review the skill's PR checklist and address architectural concerns
- Run
- Update relevant docs under
docs/(commonlyfront-matter-spec.md,triggers.md, or other files as needed) if the authoring surface changed (for non-schema changes, or to refine schema-generated examples). - Update
README.mdif user-facing behavior changed. - Update the FRD index in
docs/frds/README.md. - Verify the
AGENTS.md§8 Definition of Done, then open the PR. - After each PR merges, remove its worktree (
git worktree remove <path>). Set the FRDstatus: Implementedonly after the final planned PR merges.
Guardrails
- Never skip a gate. If a gate fails, fix before advancing.
- Keep the Decisions log focused on the feature contract; it is not a delivery diary.
- Never cite Decisions-log numbers in FRD prose or cross-references; describe the decision instead, because numbers shift on merges/renumbering.
- Keep implementation diffs surgical and scoped to the FRD.
- This skill is repo dev-tooling under
.github/skills/; it is unrelated to the runtime's user-authored agent skills discovered from an app'sskills/folder.
04 同仓库更多 Skills
child
Nested document belonging to parent.
parent
Parent skill with nested resources.
grouped
Skill at the permitted second directory level.
too-deep
Skill beyond the shared search depth.
excluded
Independently discovered but excluded skill.
guide-child
Nested child skill guidance.