PTENES
TRACK 5

🏗️ Long-term projects

Structure, version, and maintain real projects that stand the test of time. From CLAUDE.md to architecture, from CHANGELOG to case study.

4
Modules
24
Topics
~3h
Duration
Advanced
Level
📦 Deploy / Cloudflare / VPS 🧪 Tests · CI · CHANGELOG 🧠 CLAUDE.md · Memory · Context 🏗️ Architecture · Modules · Stack

Learning path map

Detailed content

5.1 ~45 min

🏗️ Project architecture

Structure a project built to last: folders, modules, separation of responsibilities, and documented decisions.

What it is:

The folder structure is the physical map of your project. It determines how modules find each other, how dependencies flow, and how new contributors (or Claude) understand the system without reading a line of code.

Why learn:

Projects without structure become chaotic monoliths in weeks. A well-planned folder structure from the start saves hours of refactoring later. Claude Code navigates organized projects better—less context, more precise answers.

Key Concepts:
src/ for source codescripts/ for automationdocs/ for decisionstests/ for coverage
What it is:

Single Responsibility Principle applied to files and modules: every piece of code has one reason to exist and one reason to change.

Why learn:

Cohesive modules make it easier for Claude to understand, modify, and test isolated parts without introducing regressions. Less coupling = faster iteration.

Key Concepts:
High cohesionLoose couplingClean interfacesDependency inversion
What it is:

Choose languages, runtimes, frameworks, and build tools based on explicit criteria: ecosystem, performance, ease of deployment, and Claude support.

Why learn:

Changing stacks in the middle of a project is costly. The right choice at the start reduces technical debt and maximizes the help Claude can provide — it knows popular stacks better.

Key Concepts:
Explicit trade-offsADR (Architecture Decision Record)Lock-in vs. flexibilityLLM support
What it is:

Architecture Decision Records (ADRs) are short documents that record the decision's context, the options considered, and the choice made. CLAUDE.md is the main ADR.

Why learn:

Without decision documentation, Claude (and you in the future) will wonder why certain choices were made and may inadvertently undo them.

Key Concepts:
Decision contextRejected optionsExpected consequencesDate and author
What it is:

A strategy of building the functional core first and adding layers progressively—without planning a huge architecture before validating hypotheses.

Why learn:

Projects with Claude evolve quickly. Starting small lets you validate the design before committing effort to abstractions that may not be necessary.

Key Concepts:
Walking skeletonIncremental iterationYAGNI principleContinuous refactoring
What it is:

Principles that keep a project healthy for months or years: asynchronous code review, living documentation, automation of repetitive tasks, and health metrics.

Why learn:

Most projects fail because of a lack of planned maintenance, not a lack of features. With Claude, the risk is adding code too quickly without keeping the foundation solid.

Key Concepts:
Living documentationControlled technical debtCI automationHealth metrics
📖 View All
5.2 ~40 min

🧠 CLAUDE.md and persistent memory

CLAUDE.md as project instructions, memory between sessions, and team conventions.

What it is:

CLAUDE.md is the project's persistent instruction file. Claude reads it at the start of each session, providing context about the project, conventions, and behavioral rules.

Why learn:

Without CLAUDE.md, you repeat the same context every session. With it, Claude knows where it is, what it can and can't do, and how the project is structured.

Key Concepts:
Persistent contextAgent instructionsAutomatic readingProject scope
What it is:

Claude has no native memory between sessions. Persistent memory is built explicitly: state files, decision logs, context saved in JSON or Markdown.

Why learn:

Long-running projects accumulate decisions and state. Without explicit memory, each session starts from scratch, and Claude may contradict previous decisions.

Key Concepts:
State filesDecision logContext injectionSession handoff
What it is:

Keep CLAUDE.md concise and relevant: include only what Claude needs to know now, not the project’s complete history.

Why learn:

A very long CLAUDE.md dilutes attention. Claude prioritizes information at the beginning of the context — critical information should appear first.

Key Concepts:
Information priorityRemove obsolete itemsSection hierarchyInformation density
What it is:

Section of CLAUDE.md that defines code standards, naming conventions, git workflow, PR rules, and communication tone that Claude should follow.

Why learn:

Without explicit conventions, Claude adopts its own standards — which may differ from the team's and create inconsistencies that are hard to maintain.

Key Concepts:
Naming conventionsGit flowCode styleReview checklist
What it is:

Guidelines on what information should go in CLAUDE.md (architecture, conventions, context) and what should never appear there (secrets, tokens, personal data).

Why learn:

CLAUDE.md is read and may be sent to the model. Sensitive information in it creates leakage risks — especially in projects with multiple collaborators.

Key Concepts:
No secrets in markdownSeparate env vars.gitignore for .envPeriodic audit
What it is:

How to keep CLAUDE.md up to date as the project grows: when to review it, who can edit it, and how to version changes to the instruction file.

Why learn:

An outdated CLAUDE.md is worse than none — Claude follows outdated instructions and may make wrong decisions based on incorrect context.

Key Concepts:
Quarterly reviewVersion control with gitOwner definedInternal changelog
📖 View All
5.3 ~45 min

📦 Maintenance, versioning, and CHANGELOG

Semver, CHANGELOG, safe rollback, continuous refactoring, and how to avoid technical debt in long-running projects.

What it is:

Semantic Versioning (semver): MAJOR.MINOR.PATCH — each number has a precise meaning about the type of change and compatibility.

Why learn:

Semantic versions communicate impact. When you ask Claude to "bump a version," it needs to know which digit to increment and why.

Key Concepts:
MAJOR: breaking changeMINOR: new featurePATCH: bugfixgit tag -a v1.2.3
What it is:

CHANGELOG.md file structured by version, with Added / Changed / Fixed / Removed sections. Read by humans, not machines.

Why learn:

The CHANGELOG is the project's diary. It lets you audit when something broke, justify changes to stakeholders, and guide Claude during maintenance sessions.

Key Concepts:
Keep a ChangelogAdded/Changed/FixedRelease dateUnreleased section
What it is:

Strategies for safely reverting the project state: git revert, git reset, feature flags, deploying a previous version.

Why learn:

With Claude generating code quickly, rollback capability is the safety net. You need to know how to undo changes without losing valid work.

Key Concepts:
git revert vs resetFeature flagsBlue/green deployState backup
What it is:

The process of improving the internal structure of code without changing its external behavior — with tests as a safety net.

Why learn:

Refactoring with Claude is fast and risky. Without tests, a refactor that seems safe can break workflows that weren’t visible during the session.

Key Concepts:
Red/Green/RefactorMinimum coverageSmall stepsAtomic commit
What it is:

Well-written tests document the system’s expected behavior. They’re the most reliable spec because they have to pass—unlike docs, which become outdated.

Why learn:

Claude uses existing tests to understand what a module should do before modifying it. Projects with good tests get better, safer help.

Key Concepts:
Test as documentationVitest / JestIntegration testsCoverage threshold
What it is:

Technical debt is the future cost of shortcuts taken today. It isn't always bad — but it needs to be recorded, prioritized, and paid down before it becomes unmanageable.

Why learn:

Projects with Claude can quickly accumulate technical debt—quickly generated code isn’t always sustainable. Periodically monitoring and paying down debt is a healthy project habit.

Key Concepts:
TODO/FIXME trackingTech debt backlogRefactor sprintsCode quality metrics
📖 View All
5.4 ~50 min

🖥️ Case Study: ClaudeOS (Hermes)

Dissect a real long-term project: a personal AI dashboard with Bun, TanStack/React, Vite, Tailwind, and deployment on Cloudflare.

What it is:

ClaudeOS (Hermes) is a read-only personal dashboard for people running a local AI stack. It consolidates data from Claude Code, Codex, OpenRouter, Pinecone, and Obsidian in a single interface.

Why learn:

It's a concrete project that applies all the principles in this learning path: layered architecture, a rigorous CLAUDE.md, versioning with a CHANGELOG, and separation of responsibilities.

Key Concepts:
Read-only dashboardStack: Bun + React + ViteDeploy: CloudflareV2.3 — May 2026
What it is:

The scripts/aggregate.ts file is the heart of the system: it reads ~/.claude/, Obsidian vaults, Pinecone, and OpenRouter, then generates src/data/live-data.json, which the React dashboard consumes.

Why learn:

This "generator script → static file → UI" pattern is an elegant architecture that separates data collection from presentation. It can be replicated in any dashboard project.

Key Concepts:
Data pipeline scriptStatic JSON artifactCollection/UI separationCron scheduling
What it is:

The /dream skill audits the last 24 hours of the AI stack across 8 signal buckets and writes the 4 highest-impact prescriptions in JSON. The dashboard renders these prescriptions as action cards.

Why learn:

It's an example of a skill with structured output (JSON) consumed by a UI — a reusable pattern for any Claude Code + dashboard integration.

Key Concepts:
8 signal bucketsJSON output skillImpact prescriptionsUI rendering
What it is:

ClaudeOS's CLAUDE.md defines: an onboarding greeting, critical rules (never read/write ~/.claude directly, local data, anonymization enabled, no telemetry, read-only dashboard).

Why learn:

This CLAUDE.md is a production-level example. It shows how to use explicit constraints to protect user data and keep the agent in its role.

Key Concepts:
Onboarding greetingAccess restrictionsLocal privacyRead-only enforcement
What it is:

The ClaudeOS CHANGELOG chronicles the project's evolution: V2.3 (Documents Gallery, 31 mai 2026) shows how each feature was added, what changed, and what was fixed.

Why learn:

The CHANGELOG is evidence of a mature project. Each version tells the story of maintenance—and serves as context for Claude when planning upcoming features.

Key Concepts:
V2.3 Documents GalleryDate + feature nameVisual progressImplied roadmap
What it is:

Extracting replicable patterns from ClaudeOS: the scripts/src separation, CLAUDE.md with constraints, JSON as a state artifact, and CHANGELOG as a narrative.

Why learn:

Studying well-structured real projects is much more effective than abstract tutorials. ClaudeOS is a mental template for any long-running project with Claude Code.

Key Concepts:
Reusable patternsMental templateNext stepsContinuous deployment
📖 View All
←Track 4: Automation Track 6: Deploy→