DEV Community

Cover image for AI Coding Sessions That Don't Start From Scratch
叁則
叁則

Posted on

AI Coding Sessions That Don't Start From Scratch

For developers who spend 2+ hours daily coding with AI and need sessions that don't start from scratch every time.


The real problem isn't memory

You've probably set up project-level context for your AI — rules files, system prompts, documentation. And they work for teaching the AI your conventions.

But there are three problems they don't solve:

1. Cross-session continuity

You're building a feature with AI. Three hours in, you've split it into 8 tasks and finished 5. Then you close your laptop.

Next morning, new session, blank slate. You paste yesterday's conversation back in. The AI says "got it" and starts from task 3, silently rewriting task 4's logic along the way.

2. Scope creep without consent

You ask the AI to fix a button style. It refactors the component structure. You ask it to fix a bug. It "optimizes" a database query. These changes are mixed in with your intended work, and you might not notice.

3. No decision trail

Three days later you're looking at the code: why was this designed this way? What alternatives were considered? If you relied on chat history, you'd scroll through dozens of turns. If the session expired, that context is gone forever.


What if context lived in your file system?

Sopify is an open-source workflow layer that injects engineering structure into AI coding sessions. The core idea: context lives in your file system, not in the AI's memory.

Plan lifecycle

When you start a feature, Sopify generates a structured plan:

.sopify-skills/
├── blueprint/           # Long-term project knowledge
│   ├── background.md
│   ├── design.md
│   └── tasks.md
└── plan/
    └── 20260601_user_auth/
        ├── background.md   # Requirements context
        ├── design.md       # Technical design
        └── tasks.md        # Task checklist with verification criteria
Enter fullscreen mode Exit fullscreen mode

Each task has verifiable completion criteria, explicit dependencies, and status tracking. When complete, plan packages are archived to history/ — you can always look up past design decisions.

Checkpoints

At high-risk points (database schema changes, auth logic, breaking API changes), the AI stops and asks for confirmation instead of plowing ahead:

[my-project-ai] Development ?

Task 2.3 involves database schema changes:
  - Add user_sessions table
  - Add last_login_at column to users table

This is a high-risk operation. Continue or revise the plan?

---
Next: Confirm to proceed, or reply with changes
Enter fullscreen mode Exit fullscreen mode

Every completed task goes through verification + two-stage review (spec compliance + code quality). "Should be fine" is not evidence.

Cross-session resume

Close your session. Open a new one — even switch to a different AI tool. Type ~go:

[my-project-ai] Ready ✓

Active plan detected: 20260601_user_auth
Progress: 5/8 tasks completed
Next task: 2.6 Implement session validation in src/auth/middleware.ts

---
Next: Continue? (Y/n)
Enter fullscreen mode Exit fullscreen mode

It knows because task state, plan documents, and project knowledge all live in .sopify-skills/ — committed alongside your code. Switch sessions, switch hosts, switch models. The work continues.


Real-world test

Last month I did a 15-milestone refactoring over 20 days. Switched between Claude Code and GitHub Copilot. Interrupted for days at a time. Went off to fix unrelated bugs mid-stream.

Every milestone was a complete plan package with background, design, and task checklist. Three weeks later I could still look up why a specific route was deleted at milestone P3a — by opening the archived plan file, not by searching chat logs.


Who is this for?

Good fit:

  • You code with AI 2+ hours daily
  • You build features that span multiple sessions/days
  • You want traceable engineering records for AI-assisted work

Not a fit:

  • You occasionally ask AI to write a function
  • You don't need structured workflows

Getting started

Sopify supports Claude Code, GitHub Copilot, and Codex CLI. Works in English and Chinese:

# Claude Code
curl -fsSL https://github.com/evidentloop/sopify/releases/latest/download/install.sh | bash -s -- --target claude:en-US

# GitHub Copilot
curl -fsSL https://github.com/evidentloop/sopify/releases/latest/download/install.sh | bash -s -- --target copilot:en-US

# Codex CLI
curl -fsSL https://github.com/evidentloop/sopify/releases/latest/download/install.sh | bash -s -- --target codex:en-US
Enter fullscreen mode Exit fullscreen mode

Then type ~go in your AI coding tool. For Chinese, replace :en-US with :zh-CN.


GitHub: evidentloop/sopify

Feedback via issues is welcome. PRs for new host adapters even more so.

Top comments (1)

Collapse
 
harjjotsinghh profile image
Harjot Singh

i totally relate to the frustration of losing context in AI sessions. it can be so disruptive when you have to reintroduce everything each time. at moonshift, we help you get a full next.js + postgres + auth app deployed in about 7 minutes, and you keep your code on github. if you're interested, i can offer a free run to see how it fits into your workflow.