Chạy dự án này
Tải bản gốc ↓CRM-142: nhập liên hệ từ CSV
Ticket Jira mẫu và liên hệ là giả định. CRM cục bộ dùng lưu trữ trình duyệt; không tải gì lên Jira hay tài khoản CRM.
1. Mở dự án
Dùng dự án riêng hoặc giải nén bản đầu và mở thư mục crm trong terminal. Ví dụ CRM cần Node.js 24,, Git, Python 3.11+ cho hàng rào và Codex CLI đã đăng nhập.
Để xem ứng dụng khởi đầu, chạy node --test tests/contacts.test.js (năm kiểm thử đạt), rồi npm start và mở http://127.0.0.1:8830. Toàn bộ lệnh npm test ban đầu thất bại vì src/import.js mới chưa có. Giữ bộ kiểm thử chấp nhận không đổi.
2. Nhận AgentBay
Đã có AgentBay? Bỏ qua bước này. Nếu chưa, cài một lần cho mọi dự án:
npx --yes skills@1.7.4 add https://github.com/ravisingh11/agentbay-ultimate-list/tree/bd8399db8fd370a55d9aa315661a653353a7799d/skills/agentbay-skill-installer --skill agentbay-skill-installer --agent codex --yes --global
Bắt đầu chat Codex mới trong dự án, xác nhận AgentBay (agentbay-skill-installer) hiện trong Skills. Tái dùng cài đặt hiện có thay vì thêm bản thứ hai. Không cần checkout toàn bộ AgentBay hay tài khoản Jira. Cần truy cập mạng công khai để lấy kỹ năng và tệp toolkit.
3. Chuẩn bị ticket
Chạy codex trong thư mục dự án. Dán ticket (tickets/CRM-142.md trong mẫu) với prompt này:
Use AgentBay to prepare this project for my ticket.
Inspect the project. Find and install only the missing skills this ticket needs. Read their instructions and confirm your agent can load them.
Set up local guardrails with official AI Software Toolkit v2.3.3: https://github.com/ravisingh11/ai-software-toolkit/tree/248d8f02e774e4f75af6ea2de49b466688dfae54. Inspect and use setup-guardrails.py if this project includes it; otherwise follow the toolkit's setup instructions. Keep GitHub Actions off.
Use this project's test commands and run the baseline. Report AgentBay loading, selected skills, missing tools or access, guardrail configuration and test results. Separate expected missing-feature failures from setup problems.
Stop before design or implementation. Do not change application files or tests, commit, deploy or grant account access.
Dự kiến nhận kỹ năng đã chọn, quyền công cụ, cấu hình hàng rào và kết quả kiểm thử cơ sở. Giải quyết thiết lập thiếu rồi khám phá ý tưởng. Chuẩn bị không triển khai ticket.
Tiếp tục hướng dẫn
Lần lập trình ghi nhận chọn brainstorming và writing-plans từ obra/superpowers. Prompt thiết lập trên là điểm vào mới ưu tiên chuẩn bị; không phải biên nhận thực thi mới. Bài giữ prompt CLI, revision và kết quả thật trong chi tiết chạy. Chỉ thực thi công việc bằng Codex CLI đã được thử.
Kiểm tra kết quả
Chạy npm test: dự án hoàn chỉnh đạt 17 ca đơn vị. Trong trình duyệt mới, chọn samples/customer-contacts.csv, chọn Review CSV và dự kiến Ready 3, Invalid 1, Duplicate 2. Xác nhận và dự kiến Added 3, skipped 3; tải lại, xác minh còn năm liên hệ. Hủy không lưu gì. Fail next save thử phục hồi; thử lại nên đạt một lần. Nhập lại tệp không thêm trùng. Search và Add contact hiện có vẫn hoạt động.
Trạng thái trình duyệt chỉ dùng agentbay-crm-142-contacts trên nguồn cục bộ này. Profile/context mới lặp trạng thái ban đầu. Ví dụ dùng lưu trữ trình duyệt, không cơ sở dữ liệu máy chủ hay giao dịch nhiều tab. Thực thi Desktop/Claude không thuộc biên nhận CLI này.
Dự án hoàn chỉnh có thiết kế và kế hoạch thực trong docs/. Bài hiển thị quyết định cùng ảnh và giữ toàn bộ tài liệu có thể xem ngay trong trang.
06 Hàng rào kiểm soát
Cần Python 3.11+, cùng Node.js 24 và Git. Trước triển khai ticket, cài toolkit cục bộ đã ghim và bắt buộc kiểm thử đơn vị:
python3 setup-guardrails.py --yes
git init
git add .
git commit -m "Record CRM starter with enforced unit tests"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref HEAD --json
Bản đầu bị chặn vì thiếu src/import.js. Triển khai tính năng đã xét, cập nhật README mô tả kết quả, xem và commit thay đổi, rồi kiểm tra commit đó:
git add index.html style.css src/app.js src/import.js docs README.md
git commit -m "Implement CRM-142 and document the import flow"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref STARTER_COMMIT --json
Thay STARTER_COMMIT bằng SHA đầy đủ in bởi git rev-parse HEAD ở điểm đầu. Dùng danh tính tác giả Git của bạn. Kiểm thử đơn vị bắt buộc; kiểm soát khác là tư vấn. Đọc mọi khuyến cáo. ALLOW báo quyết định chính sách chọn, không commit, merge hay triển khai. Thiết lập không bật GitHub Actions hay biến kho mã.
Tệp gốc và chi tiết nguồn
README.md · SHA-256 591dc1ada59cf750d1b4141219b0245fcf3870352e57d976cf17febb4e60cd77
# CRM-142: import contacts from CSV
The sample Jira ticket and contacts are fictional. This local CRM uses browser storage; nothing is uploaded to Jira or a CRM account.
## 1. Open your project
Use your own project, or unzip the starter and open its crm folder in your terminal. The CRM example needs Node.js 24, Git, Python 3.11+ for guardrails and a signed-in Codex CLI.
To see the starting app, run `node --test tests/contacts.test.js` (five passing tests), then `npm start` and open http://127.0.0.1:8830. Full `npm test` initially fails because the new src/import.js does not exist yet. Keep that acceptance suite unchanged.
## 2. Get AgentBay
Already have AgentBay? Skip this step. Otherwise install it once for all your projects:
```sh
npx --yes skills@1.7.4 add https://github.com/ravisingh11/agentbay-ultimate-list/tree/bd8399db8fd370a55d9aa315661a653353a7799d/skills/agentbay-skill-installer --skill agentbay-skill-installer --agent codex --yes --global
```
Start a fresh Codex chat in your project and confirm AgentBay (agentbay-skill-installer) appears in Skills. Reuse an existing project installation instead of adding a second copy. No full AgentBay checkout or Jira account is needed. Public network access is required to fetch skills and toolkit files.
## 3. Prepare your ticket
Run `codex` in the project folder. Paste your ticket (tickets/CRM-142.md for the sample) with this prompt:
```text
Use AgentBay to prepare this project for my ticket.
Inspect the project. Find and install only the missing skills this ticket needs. Read their instructions and confirm your agent can load them.
Set up local guardrails with official AI Software Toolkit v2.3.3: https://github.com/ravisingh11/ai-software-toolkit/tree/248d8f02e774e4f75af6ea2de49b466688dfae54. Inspect and use setup-guardrails.py if this project includes it; otherwise follow the toolkit's setup instructions. Keep GitHub Actions off.
Use this project's test commands and run the baseline. Report AgentBay loading, selected skills, missing tools or access, guardrail configuration and test results. Separate expected missing-feature failures from setup problems.
Stop before design or implementation. Do not change application files or tests, commit, deploy or grant account access.
```
Expect the selected skills, tool access, guardrail configuration and baseline test results. Resolve missing setup items, then start brainstorming. Preparation does not implement the ticket.
## Continue the walkthrough
The recorded coding run selected brainstorming and writing-plans from obra/superpowers. The setup prompt above is the new readiness-first entry point; it is not a new execution receipt. The article retains the actual CLI prompts, revisions and results under Run details. Only Codex CLI task execution was tested.
## Check the result
Run `npm test`: the finished project passes 17 unit cases. In a fresh browser, select samples/customer-contacts.csv, choose Review CSV and expect Ready 3, Invalid 1, Duplicate 2. Confirm and expect Added 3, skipped 3; reload and verify five contacts remain. Cancel must save nothing. Fail next save exercises recovery; retry should succeed once. Importing the same file again must not add duplicates. Existing search and Add contact must still work.
Browser state uses only agentbay-crm-142-contacts on this local origin. A fresh browser profile/context repeats the initial state. This fixture uses browser storage, not a server database or multi-tab transaction. Desktop/Claude execution is not part of this CLI receipt.
The finished project includes the actual design and plan under docs/. The article shows their decisions with screenshots and keeps the full documents available inside the page.
## 06 Guardrails
Requires Python 3.11+ as well as Node.js 24 and Git. Before implementing the ticket, install the pinned local toolkit and enforce unit tests:
```sh
python3 setup-guardrails.py --yes
git init
git add .
git commit -m "Record CRM starter with enforced unit tests"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref HEAD --json
```
The starter is blocked because src/import.js does not exist. Implement the reviewed feature, update this README to describe the result, review and commit the changes, then check that commit:
```sh
git add index.html style.css src/app.js src/import.js docs README.md
git commit -m "Implement CRM-142 and document the import flow"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref STARTER_COMMIT --json
```
Replace STARTER_COMMIT with the full SHA printed by `git rev-parse HEAD` at the starter checkpoint. Use your own Git identity. Unit tests are enforced; other controls stay advisory. Read every advisory finding. ALLOW reports the selected policy decision; it does not commit, merge or deploy. No GitHub Actions or repository variables are enabled by this setup.