ZHANG.LOG

Personal field log / 2026

Use Agents toturn ideas intoreality.

A working record of how I use agents to move from an open question to a tested, usable product.

Agent workflowsRapid prototypesWorking notes
01ideas
02Agents
03reality

Let agents participate, not replace judgment

Rather than setting an agent loose, we write the development document together: requirements analysis, module design, task breakdown, tool configuration, acceptance criteria, following a software-engineering process shaped for agents. What comes out is one document read two ways, structured enough for an agent to build from and complete enough for a person to audit.

Selected Works

My Practice

Vue 3Element PlusVite

SpringAiMall: Dual-Frontend Engineering and AI Customer Service

Coding

2026-10-05 / 9 minRead more
SpringAiMall: Dual-Frontend Engineering and AI Customer Service
01

Forty Million Weibo Posts: Sentiment, Repost Graphs, and Replay

PySpark / Python / Big Data / Data Visualization

2026-10-27
02

Civil Service Exam Notebook

JavaScript / Supabase / Tailwind CSS

2026-10-18
03

Zhang's Personal Site

Next.js / TypeScript / MDX

2026-08-29

How I Use Agents

My Agents

Notes on how I use, configure, and understand agents in real workflows.

Agent Special: Raising a Lobster

My OpenClaw

A continuing record of building a personal AI system, from setup to multi-agent workflows.

OpenClaw / Contents
01OpenClaw Blueprint
02Architecture
03Quick Start
04My Configuration
05Usage Notes
06Scenarios
07Maintenance

Codex Setup

My Global Coding RulesAGENTS.md (CLAUDE.md)

Based on Andrej Karpathy's LLM coding pitfalls

The coding rules are based on Andrej Karpathy's summary of LLM coding pitfalls, addressing wrong assumptions, hidden confusion, missing trade-offs, and over-engineering.

01

Clarify first

When a request is ambiguous, confirm the goal, scope, and trade-offs before letting the Agent guess.

02

Verify each step

Turn changes into tests, type checks, builds, or observable results that prove the goal was met.

03

Keep the scope tight

Respect existing code and user changes instead of turning one request into an unrelated refactor.

Global Prompt
# AGENTS.md

_These are the user's non-negotiable rules. Follow and re-check them in context at all times._

## System Awareness

**System:** Windows 11 | **Shell:** Git Bash

- Run Windows-native commands through `cmd /c` or `powershell -Command`.
- Python 3.13 and Java 17 are installed.
- Git user: yking / 3202708371@qq.com

## Coding Rules That Reduce Common LLM (Your) Mistakes

**Trade-off:** These rules favor caution over speed. Use judgment for simple tasks.

### 1. Ask Questions and Clarify Requirements

**When the user gives a coding task, do not rush into implementation. Clarify the requirements until you are confident about the ideal outcome.**

Before you are at least 95% sure about the user's ideal implementation:
- Keep asking about implementation directions and possibilities related to the task.
- Ask which direction the user prefers when several are possible.
- Clarify how high-impact details should be handled.
- Do not change a single line without a clear direction.

### 2. Think Before Coding

**Do not jump to conclusions. Do not hide confusion. Weigh trade-offs honestly.**

Before implementation:
- State your assumptions explicitly. Ask when something is unclear.
- If there are multiple interpretations, present them. Do not choose silently.
- If there is a simpler approach, propose it. Stand your ground when necessary.
- If something is unclear, stop. Say what confuses you. Then ask.

### 3. Simplicity First

**Solve the problem with the least code. Do not write speculative code.**

- Do not add features beyond the requirement.
- Do not abstract one-off code.
- Do not add unrequested flexibility or configurability.
- Do not handle cases that cannot occur.
- If you wrote 200 lines for a 50-line problem, rewrite it.
- Prefer mature third-party libraries over building your own.

Ask yourself: "Would a senior engineer consider this too complex?" If so, simplify.

### 4. Precise Changes

**Touch only what must change. Clean up only the mess you made.**

When editing existing code:
- Do not improve adjacent code, comments, or formatting.
- Do not refactor parts that are not broken.
- Match the existing code style, even if you would write it differently.
- If you find unrelated dead code, point it out. Do not delete it.

When your change orphans code or files:
- Delete imports, variables, or functions that became useless because of your change.
- Do not delete existing invalid code unless asked.

Test: every line of the diff should trace directly to the user's requirement.

### 5. Goal-Driven Execution

**Define success criteria. Iterate until verification passes.**

Turn tasks into verifiable goals:
- "Add validation" becomes "write tests for invalid input and make them pass."
- "Fix a bug" becomes "write a test that reproduces the bug, then make it pass."
- "Refactor X" becomes "make sure tests pass before and after the refactor."

For multi-step tasks, briefly state the plan:

```
1. [Step] -> Verify: [Check]
2. [Step] -> Verify: [Check]
3. [Step] -> Verify: [Check]
```

Clear success criteria let you iterate independently. Vague criteria require constant clarification.

**Signs these rules work:** fewer unnecessary changes in the diff, fewer rewrites caused by over-complexity, and clarifying questions asked before implementation instead of after mistakes.

## Python Project Development

### Virtual Environments

Each Python project should use its own virtual environment (`venv`, `virtualenv`, or `conda`) instead of installing dependencies globally.

**Why:** Prevent dependency conflicts between projects, keep environments reproducible, and make dependency management and team collaboration easier.

**How to apply:** Identify all project dependencies, create the virtual environment, and install dependencies there. Manage versions through `requirements.txt` or `pyproject.toml`.

## Error Recovery

**Error recovery:** Every mistaken operation caused by a misunderstanding, whether in file content, file location, or the operation itself, must be immediately withdrawn, reverted, or corrected so it cannot affect later work.

## Clean Up Temporary Files

Temporary files created for tests or one-off checks must be cleaned up when the project is complete. Ask before cleaning them.

## Comments for Code Optimization and Bug Fixes

**Write comments for the new code, not the old code. Explain how the new code is meant to be used, not how it was changed. Before writing a comment, ask: "What does someone who has never seen this code need to know to understand it?"**

- Comments help understanding. They do not record modification history or the debugging process. Do not write comments such as "Deleted formulaToDb (it was unused, added the call after the bug fix)." That kind of statement belongs in the conversation's review summary.

## Emoji Usage

**Important: Misusing emoji can cause coding errors.**

When generating content:
- Emoji are allowed only in Markdown and plain-text files (`.md`, `.txt`, `.rst`).
- Emoji are forbidden in source files (`.py`, `.js`, `.ts`, `.json`, `.yaml`, `.xml`, and similar formats).

---

The agent may keep enriching this file through the conversation. Suggested additions must be reusable behavioral rules. If a suitable rule emerges, ask the user before adding it.

My Way of Using Agents

Let agents participate, not replace judgment

01

Define the Problem

Confirm the goal, boundaries, and acceptance criteria before moving in the wrong direction.

Define the Problem
02

Draw the Blueprint

Break requirements into tasks, dependencies, and expected outcomes with clear context for the agent.

Draw the Blueprint
03

Execute with Agents

Use the right models, tools, and sub-agents for each task while continuously realigning the direction.

Execute with Agents
04

Verify and Deliver

Automated tests run alongside manual ones: check the code and the features, keep the evidence, and iterate from there.

Verify and Deliver

Rather than setting an agent loose, we write the development document together: requirements analysis, module design, task breakdown, tool configuration, acceptance criteria, following a software-engineering process shaped for agents. What comes out is one document read two ways, structured enough for an agent to build from and complete enough for a person to audit.

Plugin Tools

GitNexus: Give Agents a Codebase View

GitNexus indexes a codebase into a knowledge graph, then exposes call relationships, dependencies, execution flows, and change impact through CLI and MCP.

GN
CLI + MCP + Knowledge Graph
Local index · Agent context

It is not only for “write this snippet.” It answers “how is this code related to the rest of the project?” I use it to fill in context before exploring unfamiliar code, debugging, or editing.

CLI

Analyze, refresh, and inspect indexes from the CLI

MCP

Expose code relationships for Agent queries

Graph

Dependencies, call chains, and execution flows

Map

Visual relationship map

Using GitNexus in a codebase

I usually ask the Agent to place GitNexus between understanding and editing: build the index, query context, assess impact before changes, then inspect the changed scope afterwards.

01

Index the repo

Run analyze so project structure, symbol relationships, and execution flows become queryable.

02

Understand the code

Use exploring, query, and context to find relevant flows, callers, and callees.

03

Assess impact

Before changing a function or module, inspect upstream dependents and the likely risk boundary.

04

Check the diff

After editing, run detect_changes to confirm the affected scope matches the intention.

Development Methodology

Superpowers

Superpowers is a complete software development methodology for coding agents, built from composable skills and initial instructions.

It does not jump from a request straight into code. It clarifies the goal, validates a design, creates an implementation plan, then works through each task with testing and review.

View Superpowers repository
Design principles
Test-driven developmentSystematic over ad-hocProcess over guessingComplexity reductionEvidence over claims
Operating model
01

Automatic activation

The Agent selects relevant skills from the task itself without requiring a separate workflow switch.

02

Workflow discipline

Key workflows are treated as required stages rather than optional suggestions.

03

Delegated execution

Complex plans can be assigned task by task, with each result checked before work continues.

04

Continuous review

Implementation, testing, and review alternate so issues are handled before the next stage.

The basic workflow

From shaping an idea to finishing a development branch, each stage produces something concrete and a checkpoint before the next stage.

07 Steps
01

Shape the idea

Refine rough ideas through questions, explore alternatives, validate the design in sections, and save the design document.

02

Isolate the workspace

After design approval, create an isolated branch and worktree, run setup, and verify a clean test baseline.

03

Write the plan

Break the work into bite-sized tasks with concrete file paths, code, and verification steps.

04

Execute the plan

A fresh subagent can implement and review each task, or the current session can execute the plan inline.

05

Test-driven development

Follow RED-GREEN-REFACTOR: watch a test fail, write the minimal implementation, then verify it passes.

06

Review the work

Review each task against the plan, report issues by severity, and block progress on critical problems.

07

Finish the branch

Verify tests, choose merge, PR, keep, or discard, and clean up the worktree.

What it produces
01

Validated design

A rough idea converges into a reviewed design ready for implementation.

02

Executable plan

The design becomes bite-sized tasks with files, code, and verification steps.

03

Verified delivery

After testing and review, the branch can be merged, opened as a PR, or cleaned up.

Selected MCP tools

Selected MCPs

More MCPs

MCP is an interface for capabilities an Agent can call. This is a short record of tools I use or follow and the missing piece each one adds to development.

Playwright MCP

MCP / Capability surface

Playwright MCP gives an Agent browser automation capabilities: navigate pages, read accessibility structure, interact with UI, and inspect real results.

When I use it

For web acceptance checks, mobile layout inspection, interaction regressions, and screenshots. It turns “the page should work” into an observable check.

GitNexus MCP

MCP / Capability surface

GitNexus MCP exposes local knowledge-graph queries, context, impact analysis, and change detection to an Agent.

When I use it

When I need project structure, call-chain tracing, change-impact reasoning, or diff-scope checks. It supplies context without replacing my final judgment.

Scenarios at a Glance

Use Cases

Coding

Understanding, debugging, and building software

Creating

From rough ideas to finished pieces

No entries yet

Organizing

Research, synthesis, and knowledge capture

No entries yet

Automation

Turning repeated work into reusable flows

No entries yet

Latest Blogs

View Details
Architecture

Jarvis and Three AI Employees: Running a Multi-Agent Team in OpenClaw

#OpenClaw#Agent#Multi-agent

12 min read

Beginner Tutorial

A Feishu Message at 07:00: Automating My Morning with a Cron Job

#OpenClaw#Automation#Efficiency

10 min read

Technical Explainer

Four Files, One Agent: AGENTS.md, SOUL.md, USER.md and Layered Memory

#Agent#Memory#Workflow

11 min read

Ready to Build Something Bold?

Let's collaborate on the next generation of agent-built applications.