· Joseph · AI & Machine Learning  · 5 min read

[Day 3] BMAD-Method - react calculator

第一個project來個簡單的計算機,我打算用Reactjs做一個純前端的計算機出來,他會需要容器化技術docker。先用這個簡單的專案來做暖身。

TOC

第一個project來個簡單的計算機,我打算用Reactjs做一個純前端的計算機出來,他會需要容器化技術docker。先用這個簡單的專案來做暖身。

TOC

First agent: analyst

首先, 我用ChatGPT產生一段準備給BMAD-Method的文件,prompt如下:

https://github.com/bmad-code-org/BMAD-METHOD
你現在是一個專業的AI Prompting engineer
我要用React做一個計算機,要用docker-compose開啟,然後要給BMAD-Method AI agent framework做。
請幫我用英文生成一段prompt 讓我給BMAD-Method agents使用。
輸出格式:markdown format

接著把它存起來,準備餵給BMad:agents:analyst

根據user-guide 裡的 Flow,第一步我們要去找 /BMad:agents:analyst 問話。 step-1-analyst

結果分析了很多問題

  1. 要給誰用 對象是誰
  2. 有什麼規格要注意的
  3. 有些計算機常用的功能沒提到:像是記憶、重選重算 需不需要實作
  4. 有什麼特殊需求?美觀或速度?

blablabla,終於結束了。 step-1-result

✦ The Project Brief has been successfully created and saved to docs/brief.md.
  We have completed both the brainstorming and the project brief creation. This document now serves as a strong foundation for the rest of the team to begin their work.
  My role as the Business Analyst for this initial phase is now complete. It has been a pleasure working with you to define this project! I'll now hand you back to the main orchestrator.
  /exit

最後,Analyst會產生一份brief.md檔案,裡面就像是剛剛訪談內容的筆記,有興趣可以打開看一下內容。

Step 2: PM

有了project brief以後,我們先去諮詢PM。

/BMad:agents:pm

step-2-pmPM 一上來也是一堆問題,我選7, 10,產生個PRD出來。 後續幾個問題我都選 1. Proceed to the next section. 加快開發速度, 最後產生 docs/prd.md 檔案,我可以直接跑下一步UX or Architect。

有時候如果不知道要做什麼 可以直接問 ** what my next step **, 他們會給你指示。 這很像不太需要UX,我就先跳過他了

Step 3: architect

/BMad:agents:architect Please review the attached Product Requirements Document (docs/prd.md). Your task is to create the technical architecture document for this project, adhering to all ‘Technical Assumptions’ and breaking down the implementation plan according to the Epics and Stories provided.

這一步出現了專案 Frontend Tech Stack:

CategoryTechnologyVersionPurposeRationale
FrameworkReact18+Core application frameworkMandated by PRD.
UI LibraryMaterial-UI (MUI)5+Component library for UIMandated by PRD for rapid, high-quality UI development.
State ManagementReact Hooks18+Local component stateMandated by PRD. Sufficient for the app’s complexity.
RoutingN/AN/ANot required for a single–page appThe application exists on a single view.
Build ToolVite5+Fast development server and bundlingModern, fast, and provides a great developer experience.
StylingEmotion / TSS11+Styling components via MUIComes built-in with Material-UI.
TestingVitest, React Testing LibraryLatestUnit and Integration testingModern test runner that integrates seamlessly with Vite.

最後產生了docs/ui-architecture.md,讓我拿去找Developer agent

Step 4: developer

step-4-developer這部分就是讓 developer agent 建立專案,我插手了幾次。

  • 請他建立docker file
  • 拿掉dockerfile裡的nginx
  • run command by docker-compose run

到了這邊 gemini-pro 免費的quota,改用 gemini-2.5-flash 取代。 最後開始實作,基本上這邊就是照著prd.md裡的story一步一步做下去。每做完一個story會需要你檢查跟approved。有他不懂的地方時,給他適當的參考文件或指令,我這邊就遇到他不是很懂Mui Grid,告訴他要看文件以後她才看懂。 step-4-question

跑完所有的story以後,我們就得到一個計算機了! step-5-calc

想看project的可以來這邊:https://github.com/josephMG/bmad-method-projects

Conclusion

雖然跳過了些步驟,但還是滿好玩的。每個步驟的問題都很明確,要確認的時候也會跟你說。除了有時候會需要介入開發、給他明確檔案外,就沒什麼太大的問題了。

明天再來看要做什麼吧~。

Back to Blog

Related Posts

View All Posts »
[Day 30] BMAD-Method Summary

[Day 30] BMAD-Method Summary

import { YouTube } from 'astro-embed'; 花了好幾天的token,昨天做完Flutter記帳軟體以後,終於來到第30篇文章,最後一篇了,來總結一下我們的BMad-Method文吧。

[Day 29] BMAD-Method - Accounting App Flutter - 3

[Day 29] BMAD-Method - Accounting App Flutter - 3

import record from './record.gif'; 第29天,這本來是第19天的課題,但是發現一天內開發不完,就分了好多天實作。不要騙大家,就是隔了很久(到時候看github commit)也會被發現(!) 為什麼隔了這麼久呢,因為我原先定位這天要用flutter開發完整個app,但後面因為token不足,後來又卡了其他開發事項,所以一直沒進展,好在今天結束了,來跟大家說這不大不小的專案開發過程。 前情提要 Day 18我們開了flutter記帳的專案,也寫了story。接下來要開發完整個app。

[Day 28] BMAD-Method v6 - part 3 - BMB

[Day 28] BMAD-Method v6 - part 3 - BMB

今天介紹第二個核心功能,v6-alpha的介紹就告一個段落。 今天講的是BMAD-Method Builder (BMB),他提供了更方便的工具去 一邊討論一邊建立或編輯 agents, workflow, 跟 modules。比起前幾天讀了一堆agent or workflow的結構,BMB更簡單更便利。 Module 就是 agents + workflows + tasks + templates

[Day 27] BMAD-Method v6 - part 2 - BMM

[Day 27] BMAD-Method v6 - part 2 - BMM

今天要介紹的是BMad-Method Module (BMM),主要就是讀他們docs,可以看到v6-alpha比v4多了很多東西。 不知道BMM是什麼的,我們再簡短介紹一次 TOC