Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Claude Code Workflow — Learning Journal

A personal record of learning how to work with Claude Code as a professional tool — not a showcase of what AI can do, but a study in how to direct it effectively.


Background

I have a background in financial services. This is a personal exploration of AI-assisted workflows — specifically, whether they can be structured to handle the kind of operational complexity found in wealth management, family office, and private banking.

Why Workflow Optimization

The question is not what Claude Code can do out of the box, but how to work with it well.

Starting with no custom configuration, the goal is to understand the default behavior first, then identify friction points, and progressively build toward workflows capable of handling real-world complexity. The target is not automation — it is directed capability: a set of transferable skills for structuring problems, communicating intent, and iterating with an AI tool effectively.

Learning Approach

Phase 1 → Baseline       No custom configuration. Understand default behavior.
Phase 2 → Iteration      Identify friction. Introduce targeted improvements.
Phase 3 → Application    Apply learnings to domain-specific, complex scenarios.

Exercise 01 — Baseline: Zero Configuration

Objective

Observe how Claude Code behaves with no custom skills, agents, or configuration. The goal is not to build something impressive, but to establish a reference point — understanding the default output before attempting any optimization.

What Was Built

The output of this exercise is a command-line Todo List application written in Python.

The tool supports four operations:

Command Description
python main.py add "Task title" Add a new task
python main.py list List all tasks with status
python main.py done <id> Mark a task as completed
python main.py delete <id> Delete a task

A typical session looks like this:

$ python main.py add "Review portfolio report"
Added: [1] Review portfolio report

$ python main.py add "Schedule client meeting"
Added: [2] Schedule client meeting

$ python main.py list
[ ] 1. Review portfolio report
[ ] 2. Schedule client meeting

$ python main.py done 1
Completed: [1] Review portfolio report

$ python main.py list
[x] 1. Review portfolio report
[ ] 2. Schedule client meeting

$ python main.py delete 2
Deleted todo #2

Tasks are saved to ~/.todo_data.json and persist across sessions. No installation required beyond Python itself — no external packages.

Source code: todo-cli/

Observations

1. A four-layer architecture emerged without prompting

Claude Code produced a clean separation of concerns across four files:

Model → Storage → Manager → CLI
  • models.py — data structure and serialization
  • storage.py — file I/O, isolated from business logic
  • manager.py — business logic, decoupled from storage
  • cli.py — user interface, decoupled from logic

This mirrors patterns used in production systems. Claude Code defaults toward separation of concerns — a useful baseline assumption when structuring future prompts.

2. Dependency injection was chosen for testability

TodoManager receives storage as a constructor argument rather than creating it internally. The CLI's run() function also accepts an optional storage parameter. This was not specified in the requirements — Claude Code anticipated the need for isolated testing and structured the code accordingly.

3. Tests were properly isolated

All tests use tmp_path (pytest's temporary directory fixture) rather than touching the real filesystem. Tests are deterministic and side-effect-free. Coverage spans all four layers: models, storage, manager, and CLI.

4. Edge cases were handled without being asked

  • Deleting a non-existent ID returns False rather than raising an exception
  • Completing a non-existent ID returns None
  • IDs increment from the current maximum — deleted IDs are never reused
  • File output is unicode-safe (ensure_ascii=False)

5. Zero external dependencies

Only Python standard library was used (argparse, json, dataclasses, datetime). The tool is portable and reproducible without any package installation beyond pytest.

Reflection

The default output was stronger than expected. Without any custom configuration, Claude Code already applied sound engineering practices: clean layering, dependency injection, isolated tests, and graceful error handling.

This shifts the optimization question. Rather than fixing structural problems, the next phase is about understanding the conversation flow itself: how many prompts were needed, where friction occurred, and what a more complex or domain-specific requirement would expose.

Next Steps

  • Document the prompt flow (number of exchanges, types of corrections needed)
  • Introduce a more domain-specific requirement to test the limits of zero-config
  • Explore customization: skills, project memory, workflow hooks

This is a living document. Updated as the learning progresses.



AI 工作流學習記錄

這是一份個人學習記錄,重點不在於 AI 能做什麼,而在於如何有效地引導它。


背景

我有金融服務的從業背景。這份記錄探索的核心問題是:AI 輔助工作流能否被有效組織, 用來處理財富管理、家族辦公室與私人銀行領域中真實存在的運營複雜度。

為什麼關注工作流優化

問題不在於 Claude Code 本身能做什麼,而在於如何與它有效協作。

從零配置出發,先理解預設行為,再找到摩擦點,逐步建構能處理真實複雜場景的工作流能力。 目標不是自動化,而是可遷移的主導能力——如何定義問題、表達意圖、在 AI 工具中有效迭代。

學習路徑

第一階段 → 基準測試     零配置:理解預設行為
第二階段 → 迭代優化     識別摩擦點,引入針對性改進
第三階段 → 場景應用     將學習成果遷移到特定領域的複雜場景

練習 01 — 基準測試:零配置狀態

目標

觀察在沒有任何自定義 skills、agents 或配置的情況下,Claude Code 的預設行為。 目標不是做出令人印象深刻的成果,而是建立一個基準參照點——在嘗試任何優化之前,先理解預設輸出的品質與結構。

建構內容

這次練習的產出是一個用 Python 撰寫的命令列 Todo List 應用程式。

工具支援四項操作:

指令 說明
python main.py add "任務標題" 新增一筆任務
python main.py list 列出所有任務與狀態
python main.py done <id> 將任務標記為已完成
python main.py delete <id> 刪除一筆任務

實際使用流程如下:

$ python main.py add "檢視投資組合報告"
Added: [1] 檢視投資組合報告

$ python main.py add "安排客戶會議"
Added: [2] 安排客戶會議

$ python main.py list
[ ] 1. 檢視投資組合報告
[ ] 2. 安排客戶會議

$ python main.py done 1
Completed: [1] 檢視投資組合報告

$ python main.py list
[x] 1. 檢視投資組合報告
[ ] 2. 安排客戶會議

$ python main.py delete 2
Deleted todo #2

任務資料儲存於 ~/.todo_data.json,關閉程式後依然保留。 除 Python 本身外不需安裝任何套件。

原始碼:todo-cli/

觀察

1. 未經提示,自動產生四層架構

在沒有任何架構指示的情況下,Claude Code 自動將程式碼分成四個職責分明的層次:

Model → Storage → Manager → CLI
  • models.py — 資料結構與序列化
  • storage.py — 檔案 I/O,與業務邏輯隔離
  • manager.py — 業務邏輯,與儲存層解耦
  • cli.py — 使用者介面,與邏輯層解耦

這與生產級系統常見的設計模式一致,說明 Claude Code 預設傾向於關注點分離——這是未來設計 prompt 時一個有用的前提假設。

2. 主動選擇依賴注入以支援測試

TodoManager 透過建構函式接收 storage,而非在內部自行建立。CLI 的 run() 函式同樣接受可選的 storage 參數。 這並非需求中的指定,而是 Claude Code 主動預判了測試隔離的需求,並據此設計了結構。

3. 測試具備正確的隔離性

所有測試使用 tmp_path(pytest 的臨時目錄 fixture),不會寫入真實檔案系統。 測試結果具有確定性,無副作用,覆蓋範圍涵蓋全部四個層次。

4. 未經要求,主動處理邊界情況

  • 刪除不存在的 ID 回傳 False,而非拋出例外
  • 完成不存在的 ID 回傳 None
  • ID 從當前最大值遞增,已刪除的 ID 不會被重複使用
  • 檔案寫入使用 ensure_ascii=False,支援 Unicode

5. 零外部依賴

僅使用 Python 標準函式庫(argparsejsondataclassesdatetime)。 除測試工具 pytest 外無需任何額外安裝,工具具有高度可攜性。

反思

預設輸出品質比預期高。在零配置的情況下,Claude Code 已經應用了扎實的工程實踐: 清晰的分層、依賴注入、隔離測試與優雅的錯誤處理。

這改變了優化問題的方向。與其修正結構性問題,下一階段的重點是理解對話流程本身: 需要多少輪 prompt、摩擦點在哪裡,以及更複雜或更具領域特性的需求會暴露什麼。

下一步

  • 記錄對話過程(互動輪數、需要修正的類型)
  • 引入領域特定需求,測試零配置的邊界
  • 探索客製化:skills、專案記憶、workflow hooks

持續更新中。

About

Journal of AI-assisted workflow experiments for family office, wealth management, and private banking operations using Claude Code and related tooling.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages