Skip to content

chore: add the tdd skill for test-driven development - #3637

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-167-09-08-tdd-skill
Sep 8, 2026
Merged

sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat-167-09-08-tdd-skill

Conversation

@sailist

@sailist sailist commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Related Issue

N/A — internal change, no linked issue.

Problem

Agents developing in this repo have no shared reference for test-driven development. Test style (what a good test is, where tests should live, when to mock) is re-derived from scratch each session.

What changed

  • Vendored the tdd skill from mattpocock/skills into .agents/skills/tdd/ (SKILL.md, tests.md, mocking.md, byte-identical to upstream; the OpenAI-harness-only agents/openai.yaml was dropped). It is a repo-local project skill for development use only — nothing ships in the CLI.
  • Root AGENTS.md: added one coding rule — when writing or updating tests, follow the tdd skill (.agents/skills/tdd/SKILL.md).

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: the issue must have a maintainer's /approve). — N/A: internal change.
  • I have added tests that prove my feature works. — N/A: content-only skill files plus an AGENTS.md rule; nothing executable changed.
  • Ran gen-changesets skill, or this PR needs no changeset. — No changeset: .agents/skills/ is repo development tooling and never enters the shipped artifact.
  • Ran gen-docs skill, or this PR needs no doc update. — No doc update: the skill is not part of the product.

@changeset-bot

changeset-bot Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 55d3035

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@695c093
npx https://pkg.pr.new/@moonshot-ai/kimi-code@695c093

commit: 695c093

@sailist
sailist force-pushed the feat-167-09-08-tdd-skill branch from 34eb743 to 695c093 Compare September 8, 2026 04:46
@sailist sailist changed the title feat(agent-core-v2): add the tdd builtin skill chore: add the tdd skill for test-driven development Sep 8, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34eb7433f8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread AGENTS.md Outdated
- Internal methods with only a single parameter should not be turned into options objects just for stylistic uniformity.
- Split functions only along abstraction levels: each function reads as one level of narrative (Step-down Rule), and a wrapper that adds no new abstraction level — especially one with a single call site — is inlined instead of extracted.
- Except for a package's `index.ts`, other `index.ts` files should prefer `export * from './module';`.
- When writing or updating tests, follow the `tdd` skill.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the required TDD skill discoverable

This makes the skill mandatory for every test change, but a repo-wide search of .agents/skills finds no tdd skill; the only implementation added here is inside the Kimi runtime catalog. Repository-aware agents that are not already running the newly built CLI therefore cannot resolve or follow this instruction. Add a discoverable .agents/skills/tdd/SKILL.md or avoid making the root workflow depend on it.

AGENTS.md reference: AGENTS.md:L61-L61

Useful? React with 👍 / 👎.

Comment thread .changeset/tdd-skill.md Outdated
"@moonshot-ai/kimi-code": minor
---

Add the `/tdd` skill for test-driven development. Use it to build features or fix bugs test-first with the red → green loop.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Collapse the changeset to one sentence

The entry consists of two user-facing sentences (Add ... and Use ...), so it will generate release text that violates the repository's explicit single-sentence changeset requirement. Combine the usage detail into the first sentence or remove it before this changeset is consumed.

AGENTS.md reference: AGENTS.md:L86-L87

Useful? React with 👍 / 👎.

Comment thread docs/en/reference/slash-commands.md Outdated
| `/update-config` | Inspect or edit `config.toml` (model, provider, permission, hooks) and `tui.toml` (theme, editor, notifications, auto-update) |
| `/check-kimi-code-docs` | Answer Kimi Code product questions (CLI usage, configuration, membership, error codes) against the official docs |
| `/import-from-cc-codex` | Import Claude Code and Codex instructions, skills, and MCP settings into Kimi Code |
| `/tdd` | Build features or fix bugs test-first with the red → green loop: what a good test is, where tests go, anti-patterns, and mocking guidelines |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Explain the newly introduced testing jargon

This is the first occurrence on the page of terms such as “red → green loop,” “anti-patterns,” and “mocking,” but none receives the required plain-language gloss; the mirrored Chinese row likewise introduces seam and mock without explaining them. Readers outside software development cannot determine what the command actually guides them through, so add brief parenthetical explanations in both locales.

AGENTS.md reference: docs/AGENTS.md:L38-L46

Useful? React with 👍 / 👎.

@sailist
sailist force-pushed the feat-167-09-08-tdd-skill branch from 695c093 to 55d3035 Compare September 8, 2026 04:50
@sailist
sailist merged commit f88ed6d into MoonshotAI:main Sep 8, 2026
15 checks passed
@sailist sailist mentioned this pull request Sep 19, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant