AI English Shift · Lessons / C01

Reading and steering a codebase

理解并引导代码库的修改

Open the interactive lesson · 打开互动课程

An unfamiliar codebase should first be understood as a system that produces user-visible behavior, not as a pile of files to rewrite.

面对不熟悉的代码库,首先应把它理解为一个产生用户可见行为的系统,而不是一堆等待重写的文件。

初めて見るコードは、書き直すファイルの山ではなく、利用者に見える動作を生む仕組みとして理解すべきです。

Identify the entry point for the feature, the data it reads, the state it changes, and the tests that describe its intended behavior.

找出该功能的入口、它读取的数据、它改变的状态,以及描述其预期行为的测试。

機能の入口、読むデータ、変える状態、意図した動作を示すテストを特定します。

Read project guidance and determine which instructions the chosen coding tool actually loads, because filename conventions do not guarantee universal behavior.

阅读项目指导,并确认所选编程工具实际会加载哪些指令,因为文件命名惯例并不能保证所有工具的行为都相同。

ファイル名の慣習は共通動作を保証しないため、プロジェクトの案内を読み、使うツールが実際にどの指示を読み込むか確認します。

An AGENTS.md file can express working conventions, while a skill can package a reusable method for a bounded activity.

AGENTS.md 文件可以说明工作约定,而技能(skill)可以为一项范围明确的活动封装可复用的方法。

AGENTS.mdは作業上の慣習を示せ、スキルは範囲を絞った活動の再利用手順をまとめられます。

Neither should replace reading the actual code and relevant requirements when they disagree with an observed behavior.

当这些说明与观察到的行为不一致时,都不能用它们来代替对实际代码和相关需求的阅读。

観察した動作と食い違う場合、どちらも実際のコードや関連要件を読むことの代わりにはなりません。

Before requesting a change, write the expected behavior and an example that would demonstrate success.

请求修改之前,先写清楚预期行为,并提供一个能够证明修改成功的例子。

変更を頼む前に、期待する動作と成功を示せる例を書きます。

Provide the agent with relevant source pointers and constraints instead of dumping every document into the context.

向智能体提供相关源码位置和约束,而不是把每一份文档都塞进上下文。

全文書をコンテキストに入れるのではなく、関連するソースへの参照と制約をエージェントへ与えます。

Ask for a brief account of the current path through the system so that misunderstandings become visible before edits accumulate.

请智能体简要说明当前功能在系统中经过的处理路径,使误解能在修改不断累积之前暴露出来。

編集が積み重なる前に誤解を見つけられるよう、現在の処理経路を簡潔に説明してもらいます。

For a glossary search change, that path might run from the query input through normalization and matching to the displayed result list.

如果要修改术语表搜索功能,这条路径可能从查询输入开始,经过规范化和匹配,最后到显示的结果列表。

用語検索の変更なら、入力から正規化、照合を通って結果一覧を表示する経路が考えられます。

A narrow specification keeps unrelated interface changes and dependency upgrades from becoming accidental parts of the task.

范围明确的规格说明,可以避免让无关的界面修改和依赖升级意外变成任务的一部分。

範囲を絞った仕様は、無関係な画面変更や依存関係の更新が作業に紛れ込むのを防ぎます。

The useful output is a shared, inspectable understanding of what will change, why it matters, and how the outcome will be verified.

有用的产出,是大家对以下问题形成共同且可检查的理解:将修改什么、为什么重要,以及如何验证结果。

有用な成果は、何を変え、なぜ重要で、どう検証するかについて、共有して確認できる理解です。

Key terms