1.1.1
功能工作流程
跟著一個有界的功能需求,從 sprint 條目一路走完實作、驗證與收尾。
適用對象: 開發者與 coding agent
場景#
功能這個例子跟互動式 Demo 演的是同一件事:加一個可訪問的密碼可見性 控制元件,同時保住登入 API 和鍵盤行為。
需求由使用者提出。儲存庫工作流程由 coding agent 跑完。
圈定範圍#
agent 寫一張 sprint card,上面只放一個確切的、可開成 Task 的條目。
# Password Visibility [plan-ref: login/password-visibility/root]
- [ ] Add the accessible control and focused tests. [ref: login/password-visibility/implement]然後從這個確切條目啟動繫結的 Task。
ait task start \
--from docs/sprints/password_visibility.md#login/password-visibility/implement \
--intent "Add accessible password visibility control"輸出會給出 Task、Change 和工作區路徑。
在繫結的工作區裡實作#
agent 進到列印出來的那個路徑,改控制元件、改對應的測試,再跑儲存庫自己那 套驗證。AIT 不猜框架,也不替你編一條測試命令。
src/LoginForm.tsx
tests/LoginForm.test.tsx
3 tests passed記錄結果#
檢查透過之後,agent 把程式碼狀態記下來。
ait snapshot create --message "Add accessible password visibility control"有遠端支撐的工作接著用引導式的就緒命令,直到選中的 Patchset 拿齊 CI、 attestation、評審和策略這幾類證據,再用評審者持有的 finish 入口完成原子 遠端收尾。
ait workflow ready <change-id> --apply
ait workflow finish <change-id> --apply收尾並核對#
agent 用儲存庫生成指示裡給的那條 Task 命令收尾,然後核對 Task、工作區、 Line 和 sprint 條目是否都已關閉。
ait task finish <task-or-change-id>
ait task audit <task-id>這個例子已經建立最終 Snapshot,所以 task finish 複用乾淨的 Line head。 如果本地工作仍是 dirty,就用 ait task finish <task-or-change-id> --message <message>,讓同一個操作先建立 最終 Snapshot,再完成收尾。