Repository navigation
feat(hygiene): support layered projects via docs/features/ - #96
Closed
jota-batuta wants to merge 9 commits into
Closed
jota-batuta wants to merge 9 commits into
jota-batuta wants to merge 9 commits into
Conversation
Add 4 skills on top of upstream addyosmani/agent-skills: - batuta-skill-authoring: meta-skill that enforces npx-skills-find-first before authoring - batuta-agent-authoring: meta-skill enforcing distinctness check against existing agents - research-first-dev: wraps context7 with citation-comment enforcement - notion-kb-workflow: three modes for Notion KB sync (read/init/append) Vendor two upstream skills with their licenses preserved: - skills/_vendored/writing-skills from obra/superpowers (MIT, Jesse Vincent) - skills/_vendored/context7 from intellectronica/agent-skills (CC0) Modify CLAUDE.md: append Mandatory Skills section declaring the 4 new skills and documenting the vendored directory. Add ATTRIBUTION.md at root listing all sources, licenses, and the referenced find-skills dependency (not vendored, install via npx skills). Upstream remains untouched. Merge upstream changes via: git fetch upstream && git merge upstream/main
…, update README The marketplace.json inherited from the upstream declared the marketplace as addy-agent-skills and pointed the plugin source back at addyosmani/agent-skills — so users installing via the fork URL got the upstream without the four Batuta additions. Fix: - Rename marketplace.name to batuta-agent-skills - Update owner to jota-batuta - Point plugin source at jota-batuta/batuta-agent-skills - Rename the plugin to batuta-agent-skills - Rewrite the README to describe the fork and install path - Preserve upstream README as a reference section below Install path after this fix: /plugin marketplace add jota-batuta/batuta-agent-skills /plugin install batuta-agent-skills@batuta-agent-skills
New skill batuta-project-hygiene automates two moments that must not depend on the operator remembering a slash command: - project-init mode: triggered at session start when cwd has no CLAUDE.md but looks like a project. Detects stack from manifest files, runs built-in /init, appends Mandatory Skills and Feature folder convention sections, handles git init and optional gh repo create. - feature-init mode: triggered when the operator announces a new feature. Reads project CLAUDE.md for Feature folder convention, asks once and persists the choice if placeholder. Creates scoped sub-folder with its own CLAUDE.md plus SPEC.md, starts feature/<name> branch. Evaluated with 5 cases (2 trigger, 1 bypass, 2 edge) via RED/GREEN sub-agents: 5/5 PASS. Fork overall 14/14 PASS across 5 Batuta skills. Also add user-settings/ as a backup of the operator's ~/.claude/CLAUDE.md so the user-level rules survive machine changes. README explains the sync flow. CLAUDE.md of the fork updated to list five Mandatory Skills (from four).
The .claude-plugin/plugin.json kept the upstream name 'agent-skills', which caused a namespace collision with the marketplace entry (also called batuta-agent-skills). Claude Code resolved skills under the wrong namespace, loading only a subset. Also bump version to 1.1.0 to reflect the Batuta layer (5 added skills + vendored writing-skills and context7 + ATTRIBUTION + user-settings backup).
…root The skill previously delegated SPEC creation to upstream spec-driven-development without overriding its target. Upstream default writes to project root — wrong for monorepos and src-layout projects, produces spaghetti (every feature's SPEC.md piles at root with no scope association). Changes: - SKILL.md description explicitly states 'NEVER at project root' — raises trigger priority for any flow that would write a scoped artifact. - Feature-init Mode now auto-detects folder convention from project structure before asking: pyproject.toml + src/ -> src/<name>/; package.json + packages/ -> packages/<name>/; Next.js App Router + app/ -> app/<name>/; Cargo.toml workspace -> crates/<name>/; otherwise features/<name>/. - Hard override: if upstream /spec writes SPEC.md at root, move it to the feature folder before committing. Do not accept a root-level SPEC for a scoped feature. - New red flag: 'SPEC.md or CLAUDE.md for a feature ending up at project root' — now the top failure mode in the list. Also sync user-settings/CLAUDE.md with the expanded 'Autonomous project hygiene' section that spells out the hard rules in the user-level file.
Make explicit that src/ (or packages/, app/, features/, crates/) is a features root that holds N feature subfolders, each self-contained. The previous single-feature example made this ambiguous. The skill rule was already correct; this just clarifies the visual. Also strip the confusing 'SPEC.md only for single-feature repos' note from the user CLAUDE.md — specs are always scoped to features. Sync user-settings backup.
Add Step 0 to project-init that classifies a project as feature-oriented (vertical slices) or layer-oriented (horizontal layers like Django, Rails, FastAPI, Temporal workers). Layered projects route feature docs to docs/features/<name>/ instead of forcing a src/<feature>/ refactor, so existing code stays in its technical layer. - SKILL.md: add alternate layered layout, Step 0 classifier, style-aware feature-init branch, layered CLAUDE.md template with Code map, layered verification block, three new red flags. - SKILL.eval.yaml: add trigger-03 case covering a Django/FastAPI/ Temporal-style project with models/, services/, activities/. - plugin.json: bump 1.1.0 -> 1.2.0 (MINOR, additive, non-breaking). Rationale: forcing a vertical-slice refactor in a monolith-by-layer breaks imports, tests and worker/router registrations with risk disproportionate to the doc-scoping benefit. Layered projects keep code where it is; docs/features/<feature>/CLAUDE.md maps which layer files implement each feature.
Update the user-level CLAUDE.md backup to match the new batuta-project-hygiene behavior: - Insert a "Decisión previa" section before the hard rules block, explaining when to use vertical-slice folders vs docs/features/ for layered projects. - Rewrite hard rule #1 to cover both feature-oriented and layered project layouts (previously only covered feature-oriented). - Extend hard rule #4 auto-detection tree with a layered-project branch as the first check, and require explicit style: and features-root: fields in the persisted CLAUDE.md convention.
Author
|
Created against the wrong upstream by mistake. Reopening in jota-batuta/batuta-agent-skills. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
batuta-project-hygienethat classifies projects as feature-oriented (vertical slices) vs layer-oriented (horizontal layers like Django, Rails, FastAPI, Temporal workers).docs/features/<name>/instead of attempting to createsrc/<name>/or move existing code.CLAUDE.mdgets a new Code map section in the layered variant that lists which files in each technical layer implement the feature.user-settings/CLAUDE.mdbackup with a matching "Decisión previa" section and revised hard rules Add Claude Code plugin support and fix stale swe-skills references #1 and docs: add code-simplification to README #4.1.1.0→1.2.0(MINOR — additive, non-breaking: legacy CLAUDE.md withoutstyle:field defaults to feature-oriented).Rationale
Forcing a vertical-slice refactor in a monolith-by-layer breaks imports, tests and worker/router registrations with risk disproportionate to the doc-scoping benefit. Rule of thumb: if relocating code to reach
src/<feature>/would need a PR touching >20 files, the project is layered → usedocs/features/.Test plan
python -c "yaml.safe_load(...)"parsesSKILL.eval.yamlcleanly (6 cases incl. newtrigger-03).plugin.jsonparses, version is1.2.0.SKILL.mdkeeps valid frontmatter and all canonical sections (Overview / When to Use / Process / Verification / Red Flags); grew 196 → 291 lines.user-settings/CLAUDE.mdin sync with~/.claude/CLAUDE.md(diff empty).daily-reporttodocs/features/daily-report/.app/billing/.(Last two run locally after merge — tracked separately.)