Skip to content

Commit ea1a852

Browse files
authored
add blog -- case study building forklift with ai (#23)
1 parent 2690864 commit ea1a852

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Building Forklift with AI Agents
2+
3+
## What's Forklift?
4+
5+
Forklift is a TypeScript framework for developing, testing, and scripting Aptos Move smart contracts. It's a thin wrapper around the CLI's Transaction Simulation Sessions — lots of structured boilerplate with clear logic, which made it a great candidate for AI-driven development.
6+
7+
Check out the [Forklift repo](https://github.com/aptos-labs/forklift) if you're curious.
8+
9+
## Developing Forklift with AI
10+
11+
### Phase 1: Bootstrapping
12+
13+
I started with minimal specs: an incomplete README with the high-level design, the `Harness` class interface and a few core methods, all described in plain English, and past design docs for Transaction Simulation Sessions (what Forklift wraps).
14+
15+
This phase needed the most hand-holding:
16+
- Reviewed AI-generated code carefully, suggested architectural changes
17+
- Fine-tuned critical details (e.g., universal helper run CLI commands and parse outputs)
18+
- Guided AI on transaction semantics and invariants it couldn't figure out on its own
19+
20+
Once the core was stable, I had AI generate a testsuite. Modern agents do a really good job here — they write code, run it, parse errors, and iterate. The agent even ran CLI commands directly to figure out output formats. Still, I had to step in to help it understand certain Aptos transaction flows and invariants.
21+
22+
AI also generated the CI workflow configs.
23+
24+
### Phase 2: Adding Features
25+
26+
With the foundation in place, I was able to add features at much higher velocity.
27+
28+
The existing code and docs gave AI enough context to work on its own. My prompts became one-liners: *"Implement X, use CLI command Y."*
29+
30+
AI would add the method with docs, write tests, and debug until tests passed — with minimal help from me. A few features needed CLI-side changes, and thus more manual work.
31+
32+
### Phase 3: Polishing
33+
34+
Once implementation was done, I had AI finish the README with full API docs. The TipJar tutorial was also mostly AI-generated, though I had to ask it to simplify the scope and better tune it for the target audience.
35+
36+
Both needed some back-and-forth, but way less than bootstrapping.
37+
38+
## Key Takeaways
39+
40+
### Docs and tests become first-class dev tools
41+
42+
With AI, documentation serves two purposes: (1) clarifying the design for humans, and (2) giving AI permanent context to work with. Tests are precise specs that AI can verify against.
43+
44+
This enables a shift in workflow:
45+
46+
| | Workflow |
47+
|-------------|----------|
48+
| Traditional | PoC → design doc → implementation → polishing/docs |
49+
| AI-Assisted | Design/docs → AI-generated PoC + tests → features → polishing |
50+
51+
"Notion Engineer" is no longer a joke.
52+
53+
### "Maintainable" means something different now
54+
55+
Documentation that used to be prohibitively expensive to maintain (e.g., documenting every parameter) becomes affordable with AI.
56+
57+
Designs with repetitive boilerplate but clear logic separation become trivially maintainable — AI handles the mechanical work. This might even apply to porting the project to another language (e.g., Forklift → Python).
58+
59+
For the right projects, maintainability might be better measured by *how easily AI can understand and evolve the codebase*.
60+
61+
### Today's AI agents have become really capable
62+
- **Multi-file reasoning**: Edit a method, and AI fixes callsites, adds tests, updates docs
63+
- **Figuring out implementation details**: AI tracks data flow effectively and is good at reverse-engineering input/output formats
64+
- **Tool use**: AI runs bash commands and extracts useful info from stdout

0 commit comments

Comments
 (0)