Skip to content

Commit 081b525

Browse files
committed
Merge claude guidelines into CLAUDE.md
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
1 parent d99e1f1 commit 081b525

File tree

3 files changed

+45
-41
lines changed

3 files changed

+45
-41
lines changed

CLAUDE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
> Important! When `SECTION:some/path/CLAUDE.md START` HTML comment tag is encountered in this file, it means that the content within this tag applies to `some/path/` directory.
2+
13
## Context: CLAUDE.md
24
<!-- SECTION:CLAUDE.md START -->
35
# CLAUDE.md
@@ -254,6 +256,46 @@ The repository seamlessly integrates four major programming languages, each serv
254256
- **Performance Monitoring**: Built-in benchmarking and profiling tools
255257

256258
This repository represents a complete platform for incremental stream processing, providing everything needed to develop, deploy, and operate high-performance streaming analytics at scale. The modular architecture enables both ease of development and flexibility in deployment while maintaining the performance characteristics essential for real-time data processing.
259+
260+
## CLAUDE.md Authoring Guide
261+
262+
Follow these governing principles when documenting the repository in CLAUDE.md files.
263+
264+
### Purpose and placement
265+
266+
* Write only what’s needed to work effectively in that directory's context; avoid project history; concise underlying reasoning is OK.
267+
268+
### Layering and scope
269+
270+
* Top level provides a high-level overview: the project’s purpose, key components, core workflows, and dependencies between major areas.
271+
* In the top level, include exactly one short paragraph per current subdirectory describing why it exists and what lives there. Keep it concrete but concise.
272+
* Subdirectory docs add progressively more detail the deeper you go. Each level narrows to responsibilities, interfaces, commands, schemas, and caveats specific to that scope.
273+
274+
### DRY information flow
275+
276+
* Do not repeat what a parent `CLAUDE.md` already states about a subdirectory. Instead, link up to the relevant section.
277+
* Put cross-cutting concepts at the highest level that owns them, and reference from below.
278+
* Keep a single source of truth for contracts, schemas, and commands; everything else links to it.
279+
280+
### Clarity for Claude Code
281+
282+
* Prefer crisp headings, short paragraphs, and tight bullets over prose.
283+
* Name files, entry points, public interfaces, and primary commands explicitly where they belong.
284+
* Call out constraints, feature flags, performance notes, and “gotchas” near the workflows they affect.
285+
286+
### Maintenance rules
287+
288+
* Update the highest applicable level first; ensure lower levels still defer to it.
289+
* Remove stale sections rather than letting them drift; shorter and correct beats exhaustive and outdated.
290+
* When documenting a new directory, add its paragraph to the top level and create its own `CLAUDE.md` that deepens—never duplicates—the parent’s description.
291+
292+
### Quality checklist
293+
294+
* Top level gives a true overview and one concise paragraph per important subdirectory.
295+
* Every subdirectory doc increases detail appropriate to its scope.
296+
* No duplication across levels; links replace repetition.
297+
* Commands, interfaces, and data shapes are precise and current. It is OK to document different arguments for the same command for different use-cases.
298+
* Formatting is skim-friendly and consistent across the repo.
257299
<!-- SECTION:CLAUDE.md END -->
258300

259301
---

CLAUDE_GUIDELINES.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

scripts/claude.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ ${sectionEnd(relPath)}
6969
7070
---
7171
`
72+
const mergedFileHeader =
73+
'> Important! When `SECTION:some/path/CLAUDE.md START` HTML comment tag is encountered in this file, it means that the content within this tag applies to `some/path/` directory.\n'
7274

7375
/**
7476
* @param {string} dir
@@ -122,7 +124,7 @@ async function mergeAll() {
122124
const files = await listClaudeFiles(REPO_ROOT);
123125
files.sort((a, b) => toRel(a).localeCompare(toRel(b)));
124126

125-
const sections = [];
127+
const sections = [mergedFileHeader];
126128

127129
// If a pre-merge root existed, include it as an (optional) root section
128130
if (preMergeRoot !== null) {

0 commit comments

Comments
 (0)