From 5fbe783875ac42c9603196dbf501185e4082fddf Mon Sep 17 00:00:00 2001 From: andrearuffini Date: Mon, 19 Oct 2026 21:17:34 +0200 Subject: [PATCH] chore: adopt repo-first agent workflow Add CLAUDE.md, AGENTS.md, docs (context, ADR, runbooks, handoffs), coordination docs and Gitea issue/PR templates. Co-Authored-By: Claude Opus 5.5 --- .env.example | 5 + .gitea/ISSUE_TEMPLATE/bug.md | 28 + .gitea/ISSUE_TEMPLATE/chore.md | 17 + .gitea/ISSUE_TEMPLATE/feature.md | 27 + .gitea/ISSUE_TEMPLATE/refactor.md | 23 + .gitea/PULL_REQUEST_TEMPLATE.md | 20 + .gitignore | 7 + AGENTS.md | 54 ++ CLAUDE.md | 57 ++ README.md | 13 + coordination/README.md | 7 + coordination/issue-lifecycle.md | 9 + coordination/labels.md | 16 + coordination/workflow.md | 13 + .../adr/0001-record-architecture-decisions.md | 16 + docs/adr/README.md | 9 + docs/context/known-constraints.md | 5 + docs/context/module-map.md | 11 + docs/context/product-scope.md | 11 + docs/handoffs/README.md | 12 + docs/handoffs/TEMPLATE.md | 27 + docs/runbooks/README.md | 9 + docs/runbooks/deploy.md | 6 + docs/runbooks/local-dev.md | 11 + docs/runbooks/testing.md | 6 + inizializzazione_repo.md | 511 ++++++++++++++++++ 26 files changed, 930 insertions(+) create mode 100644 .env.example create mode 100644 .gitea/ISSUE_TEMPLATE/bug.md create mode 100644 .gitea/ISSUE_TEMPLATE/chore.md create mode 100644 .gitea/ISSUE_TEMPLATE/feature.md create mode 100644 .gitea/ISSUE_TEMPLATE/refactor.md create mode 100644 .gitea/PULL_REQUEST_TEMPLATE.md create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 README.md create mode 100644 coordination/README.md create mode 100644 coordination/issue-lifecycle.md create mode 100644 coordination/labels.md create mode 100644 coordination/workflow.md create mode 100644 docs/adr/0001-record-architecture-decisions.md create mode 100644 docs/adr/README.md create mode 100644 docs/context/known-constraints.md create mode 100644 docs/context/module-map.md create mode 100644 docs/context/product-scope.md create mode 100644 docs/handoffs/README.md create mode 100644 docs/handoffs/TEMPLATE.md create mode 100644 docs/runbooks/README.md create mode 100644 docs/runbooks/deploy.md create mode 100644 docs/runbooks/local-dev.md create mode 100644 docs/runbooks/testing.md create mode 100644 inizializzazione_repo.md diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..239baa4 --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +# Gitea API Connection Configuration +GITEA_API_URL=https://git.a75.it/api/v1 +GITEA_TOKEN= +GITEA_OWNER=andrearuffini +GITEA_REPO=officinazuliani diff --git a/.gitea/ISSUE_TEMPLATE/bug.md b/.gitea/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000..d64d3c9 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,28 @@ +--- +name: Bug +about: Bug report +labels: ["type/bug", "status/todo"] +--- + +## Summary +Describe the bug. + +## Expected behavior +... + +## Actual behavior +... + +## Steps to reproduce +1. +2. +3. + +## Affected areas +- [ ] + +## Suspected cause +... + +## Tests expected +- [ ] diff --git a/.gitea/ISSUE_TEMPLATE/chore.md b/.gitea/ISSUE_TEMPLATE/chore.md new file mode 100644 index 0000000..5f378ac --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/chore.md @@ -0,0 +1,17 @@ +--- +name: Chore +about: Maintenance, tooling, dependencies or docs housekeeping +labels: ["type/chore", "status/todo"] +--- + +## Summary +... + +## Why now +... + +## Tasks +- [ ] + +## Done when +- [ ] diff --git a/.gitea/ISSUE_TEMPLATE/feature.md b/.gitea/ISSUE_TEMPLATE/feature.md new file mode 100644 index 0000000..d067091 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature.md @@ -0,0 +1,27 @@ +--- +name: Feature +about: New feature or enhancement +labels: ["type/feature", "status/todo"] +--- + +## Summary +Describe the feature in one paragraph. + +## Problem +What user or system problem does this solve? + +## Scope +What is included? +What is explicitly out of scope? + +## Acceptance criteria +- [ ] + +## Affected areas +- [ ] + +## Tests expected +- [ ] + +## Notes +... diff --git a/.gitea/ISSUE_TEMPLATE/refactor.md b/.gitea/ISSUE_TEMPLATE/refactor.md new file mode 100644 index 0000000..8c31635 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/refactor.md @@ -0,0 +1,23 @@ +--- +name: Refactor +about: Structural or code quality improvement +labels: ["type/refactor", "status/todo"] +--- + +## Summary +... + +## Motivation +Why is this refactor needed? + +## Scope +... + +## Risks +... + +## Acceptance criteria +- [ ] + +## Tests expected +- [ ] diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..e4e11e6 --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## Related issue +Closes # + +## Summary +... + +## What changed +- ... + +## Tests +- [ ] Lint +- [ ] Tests +- [ ] Manual verification + +## Docs updated +- [ ] Yes +- [ ] Not needed + +## Risks +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a6f3b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Secrets +.env +.env.* +!.env.example + +# OS +.DS_Store diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..42255bb --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,54 @@ +# AGENTS.md + +## Repository expectations +This repository is designed to be worked on by multiple coding agents and humans. +All agents must follow the same repo-first workflow. + +## Source of truth +- Codebase and versioned docs are authoritative +- Gitea Issues are the official task board +- ADRs are authoritative for architectural decisions +- Handoffs summarize session state, but do not replace ADRs +- External shared memory is operational only, not the final source of truth + +## Required reading order +1. Current Gitea issue +2. This file +3. `CLAUDE.md` if using Claude Code +4. Relevant files in `docs/context/` +5. Relevant ADRs in `docs/adr/` +6. Latest relevant handoff in `docs/handoffs/` + +## Work rules +- Work on one issue at a time +- Respect issue scope +- If scope changes, update the issue before proceeding +- Do not silently introduce architecture changes +- Prefer explicit, reviewable diffs +- Avoid hidden assumptions; document them +- If uncertain, leave a note in the issue and handoff +- Never commit secrets; `.env` is git-ignored and the repository is public + +## Required outputs per task +- Code changes linked to the issue +- Tests or clear explanation why tests were not added/run +- Updated docs when needed +- Handoff file for non-trivial tasks + +## Handoff minimum content +Each handoff should include: +- Issue reference +- Goal +- What was changed +- Files touched +- Tests run +- Open risks +- Recommended next step + +## File ownership convention +When a task has an active owner, avoid unrelated edits in the same area. +If multiple tasks overlap, coordinate through the Gitea issue. + +## Commit guidance +Use small, focused commits. +Reference the issue number in commit messages and PRs when applicable. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..cbf7e40 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,57 @@ +# CLAUDE.md + +## Project purpose +This repository contains the source code for the **Officina Zuliani website**. +Primary goal: a public website presenting Officina Zuliani (services, contacts, location). +Secondary goals: TBD (e.g. performance, SEO, easy content updates). + +## Working model +This repository uses a repo-first agent workflow. +The repository is the source of truth. +Do not rely on chat memory as the authoritative project memory. + +Before starting work: +1. Read `AGENTS.md` +2. Read relevant files in `docs/context/` +3. Read related ADRs in `docs/adr/` +4. Check the active Gitea issue and its acceptance criteria +5. Read the latest relevant file in `docs/handoffs/` + +## Rules +- Do not start work without an issue or explicit user instruction +- Do not change unrelated files +- Prefer minimal, reversible changes +- Preserve existing architecture unless the issue explicitly asks for refactor +- Record durable architectural decisions in `docs/adr/` +- Record end-of-session handoff in `docs/handoffs/` +- If a task changes developer workflow, update `docs/runbooks/` +- If a task changes project structure, update `docs/context/module-map.md` +- Never commit `.env` or any secret (the Gitea repo is public) + +## Quality gate +Before considering work complete: +- Run relevant tests +- Run lint/format checks where available +- Verify no accidental file changes are included +- Update docs if behavior or workflow changed +- Write a concise handoff + +## Commands +Stack not chosen yet. Fill these in once it is (see `docs/runbooks/`): +- Install: TBD +- Dev: TBD +- Test: TBD +- Lint: TBD +- Build: TBD +- Typecheck: TBD + +## Gitea +- Instance: https://git.a75.it — repo `andrearuffini/officinazuliani` +- API config lives in `.env` (`GITEA_API_URL`, `GITEA_TOKEN`, `GITEA_OWNER`, `GITEA_REPO`), git-ignored +- Labels and lifecycle: `coordination/labels.md`, `coordination/issue-lifecycle.md` + +## Architecture notes +Keep this file concise. For details, link to: +- `docs/context/module-map.md` +- `docs/context/known-constraints.md` +- `docs/runbooks/*.md` diff --git a/README.md b/README.md new file mode 100644 index 0000000..0e3b0ae --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Sito Officina Zuliani + +Website for Officina Zuliani. + +## Getting started +Stack and commands are not defined yet — see `docs/runbooks/local-dev.md`. + +## How work is organized +- Tasks: Gitea Issues at https://git.a75.it/andrearuffini/officinazuliani/issues +- Workflow: `coordination/workflow.md` +- Agent instructions: `AGENTS.md`, `CLAUDE.md` +- Context and decisions: `docs/context/`, `docs/adr/` +- Session handoffs: `docs/handoffs/` diff --git a/coordination/README.md b/coordination/README.md new file mode 100644 index 0000000..b616115 --- /dev/null +++ b/coordination/README.md @@ -0,0 +1,7 @@ +# Coordination + +How humans and coding agents coordinate work on this repository. + +- `workflow.md` → the standard sequence for any task +- `labels.md` → Gitea label set and meaning +- `issue-lifecycle.md` → how an issue moves through states diff --git a/coordination/issue-lifecycle.md b/coordination/issue-lifecycle.md new file mode 100644 index 0000000..9d8f25a --- /dev/null +++ b/coordination/issue-lifecycle.md @@ -0,0 +1,9 @@ +# Issue lifecycle + +1. The issue is created with `type/*` + `status/todo` + a `priority/*` label. +2. When an agent or human starts, set the assignee, `agent/*` and `status/in-progress`. +3. If a real blocker emerges, switch to `status/blocked` and explain it in a comment. +4. When the code is ready but needs human or another agent's review, use `status/review`. +5. When it is merged and verified, close the issue (or mark `status/done`). + +Only one `status/*` label at a time. diff --git a/coordination/labels.md b/coordination/labels.md new file mode 100644 index 0000000..5c97f79 --- /dev/null +++ b/coordination/labels.md @@ -0,0 +1,16 @@ +# Labels + +## type/* +Feature classification: `type/feature`, `type/bug`, `type/refactor`, `type/docs`, `type/chore` + +## status/* +Workflow state: `status/todo`, `status/in-progress`, `status/blocked`, `status/review`, `status/done` + +## priority/* +Business/technical urgency: `priority/p0` (highest) … `priority/p3` (lowest) + +## agent/* +Who is currently leading the task: `agent/claude`, `agent/codex`, `agent/human` + +## area/* (optional) +`area/frontend`, `area/backend`, `area/infra`, `area/docs`, `area/automation` diff --git a/coordination/workflow.md b/coordination/workflow.md new file mode 100644 index 0000000..331a1ee --- /dev/null +++ b/coordination/workflow.md @@ -0,0 +1,13 @@ +# Workflow + +## Core rule +No non-trivial work starts without a Gitea issue. + +## Sequence +1. Pick issue +2. Read repo instructions and relevant docs +3. Implement within scope +4. Run checks +5. Update docs if needed +6. Write handoff if task is not trivial +7. Open/update PR diff --git a/docs/adr/0001-record-architecture-decisions.md b/docs/adr/0001-record-architecture-decisions.md new file mode 100644 index 0000000..4607720 --- /dev/null +++ b/docs/adr/0001-record-architecture-decisions.md @@ -0,0 +1,16 @@ +# ADR 0001: Use ADRs to record architecture decisions + +## Status +Accepted + +## Context +This project is developed by humans and coding agents across multiple sessions. +Important decisions were at risk of being lost in chat history or issue comments. + +## Decision +We will store durable architectural decisions in `docs/adr/`. + +## Consequences +- Decisions become reviewable and versioned +- New contributors and agents can reconstruct project intent +- Chat memory is no longer required to understand architecture diff --git a/docs/adr/README.md b/docs/adr/README.md new file mode 100644 index 0000000..32a6141 --- /dev/null +++ b/docs/adr/README.md @@ -0,0 +1,9 @@ +# ADRs + +This directory stores Architecture Decision Records. + +Rules: +- One decision per file +- Immutable history: do not rewrite old decisions, supersede them with a new ADR +- Use sequential numbering +- Link related issues where relevant diff --git a/docs/context/known-constraints.md b/docs/context/known-constraints.md new file mode 100644 index 0000000..0b226e4 --- /dev/null +++ b/docs/context/known-constraints.md @@ -0,0 +1,5 @@ +# Known constraints + +- The Gitea repository (`andrearuffini/officinazuliani` on git.a75.it) is public: no secrets in commits; `.env` stays git-ignored. +- Gitea Issues are the task board; no external tracker. +- Stack, hosting and deploy target: not decided yet (record the decision as an ADR). diff --git a/docs/context/module-map.md b/docs/context/module-map.md new file mode 100644 index 0000000..f9ff96d --- /dev/null +++ b/docs/context/module-map.md @@ -0,0 +1,11 @@ +# Module map + +No application code yet. Update this file when the stack and structure are introduced. + +## Top-level areas +- `docs/` → context, ADRs, runbooks, handoffs +- `coordination/` → workflow, labels, issue lifecycle +- `.gitea/` → issue and PR templates + +## Important flows +- TBD diff --git a/docs/context/product-scope.md b/docs/context/product-scope.md new file mode 100644 index 0000000..eecd56f --- /dev/null +++ b/docs/context/product-scope.md @@ -0,0 +1,11 @@ +# Product scope + +## What this project does +Public website for Officina Zuliani: presents the business, its services, and how to get in touch. + +## Who it serves +- Prospective and existing customers looking for services, opening hours, contacts, location +- The business owner, who needs to keep content up to date + +## What is out of scope +TBD (e.g. online booking, e-commerce, customer accounts — unless decided otherwise in an issue/ADR) diff --git a/docs/handoffs/README.md b/docs/handoffs/README.md new file mode 100644 index 0000000..10d97dd --- /dev/null +++ b/docs/handoffs/README.md @@ -0,0 +1,12 @@ +# Handoffs + +Use this directory for non-trivial task handoffs between sessions, humans, and coding agents. + +Naming convention: +`YYYY-MM-DD-issue--short-title.md` + +Write a handoff when: +- the task spans multiple sessions +- the task is blocked +- another agent or human may continue the work +- there are open risks or partial changes diff --git a/docs/handoffs/TEMPLATE.md b/docs/handoffs/TEMPLATE.md new file mode 100644 index 0000000..d6fdddd --- /dev/null +++ b/docs/handoffs/TEMPLATE.md @@ -0,0 +1,27 @@ +# Handoff + +## Issue +# - + +## Goal +... + +## Status +todo / in-progress / blocked / ready-for-review / done + +## What changed +- ... + +## Files touched +- ... + +## Tests +- Run: +- Not run: +- Result: + +## Risks / open questions +- ... + +## Suggested next step +- ... diff --git a/docs/runbooks/README.md b/docs/runbooks/README.md new file mode 100644 index 0000000..2771251 --- /dev/null +++ b/docs/runbooks/README.md @@ -0,0 +1,9 @@ +# Runbooks + +Operational how-tos for developers and agents. + +- `local-dev.md` → set up and run the project locally +- `testing.md` → run tests and checks +- `deploy.md` → build and deploy + +Update these whenever a task changes the developer workflow. diff --git a/docs/runbooks/deploy.md b/docs/runbooks/deploy.md new file mode 100644 index 0000000..9c73022 --- /dev/null +++ b/docs/runbooks/deploy.md @@ -0,0 +1,6 @@ +# Deploy + +TBD. Hosting target not decided yet — record the choice as an ADR, then document: +- Build command and output directory +- Deploy procedure +- Rollback procedure diff --git a/docs/runbooks/local-dev.md b/docs/runbooks/local-dev.md new file mode 100644 index 0000000..dc51f11 --- /dev/null +++ b/docs/runbooks/local-dev.md @@ -0,0 +1,11 @@ +# Local development + +Stack not chosen yet. Once it is, document here: +- Prerequisites (runtime versions, tools) +- Install command +- Dev server command and URL +- Required environment variables (names only, never values) + +## Environment +`.env` (git-ignored) currently holds the Gitea API configuration: +`GITEA_API_URL`, `GITEA_TOKEN`, `GITEA_OWNER`, `GITEA_REPO`. diff --git a/docs/runbooks/testing.md b/docs/runbooks/testing.md new file mode 100644 index 0000000..2865d36 --- /dev/null +++ b/docs/runbooks/testing.md @@ -0,0 +1,6 @@ +# Testing + +TBD once the stack is chosen. Document: +- Unit/integration test command +- Lint / format / typecheck commands +- Manual verification checklist (pages render, links work, mobile layout) diff --git a/inizializzazione_repo.md b/inizializzazione_repo.md new file mode 100644 index 0000000..df6328e --- /dev/null +++ b/inizializzazione_repo.md @@ -0,0 +1,511 @@ +Sì: ti preparo un setup concreto, con una struttura pensata per **Gitea Issues come board**, `CLAUDE.md` per Claude Code, `AGENTS.md` per compatibilità cross-agent e documentazione minima ma rigorosa in repo. `CLAUDE.md` è il punto giusto per istruire Claude Code a livello progetto, mentre `AGENTS.md` è ormai il formato consigliato per dare istruzioni repository-level a Codex e ad altri coding agent. [agents](https://agents.md) + +Ti propongo un setup **pragmatico e leggero**, così puoi introdurlo subito nella codebase attuale senza stravolgere tutto. Gitea supporta template per issue e PR direttamente nel branch di default, quindi possiamo anche preparare una struttura che funziona bene con i tuoi repository self-hosted. [docs.gitea](https://docs.gitea.com/usage/issue-pull-request-templates) + +## Struttura repo +Questa è la struttura che ti consiglio di aggiungere in root: [developers.openai](https://developers.openai.com/codex/guides/agents-md) + +```text +/ +├─ CLAUDE.md +├─ AGENTS.md +├─ README.md +├─ docs/ +│ ├─ adr/ +│ │ ├─ README.md +│ │ └─ 0001-record-architecture-decisions.md +│ ├─ handoffs/ +│ │ ├─ README.md +│ │ └─ TEMPLATE.md +│ ├─ runbooks/ +│ │ ├─ README.md +│ │ ├─ local-dev.md +│ │ ├─ testing.md +│ │ └─ deploy.md +│ └─ context/ +│ ├─ product-scope.md +│ ├─ module-map.md +│ └─ known-constraints.md +├─ coordination/ +│ ├─ README.md +│ ├─ workflow.md +│ ├─ labels.md +│ └─ issue-lifecycle.md +└─ .gitea/ + ├─ ISSUE_TEMPLATE/ + │ ├─ feature.md + │ ├─ bug.md + │ ├─ refactor.md + │ └─ chore.md + └─ PULL_REQUEST_TEMPLATE.md +``` + +## Logica dei file +- `CLAUDE.md`: onboarding e regole per Claude Code; Claude Code lo carica automaticamente come memoria/instruction file di progetto. [builder](https://www.builder.io/blog/claude-md-guide) +- `AGENTS.md`: contratto operativo comune per Codex e altri agenti; OpenAI raccomanda esplicitamente di aggiungerlo in root per far rispettare aspettative di repo e workflow. [github](https://github.com/agentsmd/agents.md) +- `docs/adr/`: decisioni permanenti; serve a non lasciare scelte architetturali solo nelle chat o nei commenti issue. [humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) +- `.gitea/ISSUE_TEMPLATE/`: Gitea supporta più template issue e PR nel branch di default, quindi qui possiamo standardizzare bene il task intake. [docs.gitea](https://docs.gitea.com/usage/issue-pull-request-templates) + +## CLAUDE.md +Ti propongo una prima versione molto concreta: [reddit](https://www.reddit.com/r/ClaudeAI/comments/1r66oo0/how_i_structure_claude_code_projects_claudemd/) + +```md +# CLAUDE.md + +## Project purpose +This repository contains the source code for [NOME PROGETTO]. +Primary goal: [obiettivo sintetico del progetto]. +Secondary goals: [vincoli o obiettivi secondari]. + +## Working model +This repository uses a repo-first agent workflow. +The repository is the source of truth. +Do not rely on chat memory as the authoritative project memory. + +Before starting work: +1. Read `AGENTS.md` +2. Read relevant files in `docs/context/` +3. Read related ADRs in `docs/adr/` +4. Check the active Gitea issue and its acceptance criteria +5. Read the latest relevant file in `docs/handoffs/` + +## Rules +- Do not start work without an issue or explicit user instruction +- Do not change unrelated files +- Prefer minimal, reversible changes +- Preserve existing architecture unless the issue explicitly asks for refactor +- Record durable architectural decisions in `docs/adr/` +- Record end-of-session handoff in `docs/handoffs/` +- If a task changes developer workflow, update `docs/runbooks/` +- If a task changes project structure, update `docs/context/module-map.md` + +## Quality gate +Before considering work complete: +- Run relevant tests +- Run lint/format checks where available +- Verify no accidental file changes are included +- Update docs if behavior or workflow changed +- Write a concise handoff + +## Commands +Add the real commands for this repo here, for example: +- Install: `...` +- Dev: `...` +- Test: `...` +- Lint: `...` +- Build: `...` +- Typecheck: `...` + +## Architecture notes +Add only high-value orientation notes here, not full documentation. +Keep this file concise. +For details, link to: +- `docs/context/module-map.md` +- `docs/context/known-constraints.md` +- `docs/runbooks/*.md` +``` + +## AGENTS.md +Questo file deve essere ancora più neutro e cross-tool: [agents](https://agents.md) + +```md +# AGENTS.md + +## Repository expectations +This repository is designed to be worked on by multiple coding agents and humans. +All agents must follow the same repo-first workflow. + +## Source of truth +- Codebase and versioned docs are authoritative +- Gitea Issues are the official task board +- ADRs are authoritative for architectural decisions +- Handoffs summarize session state, but do not replace ADRs +- External shared memory is operational only, not the final source of truth + +## Required reading order +1. Current Gitea issue +2. This file +3. `CLAUDE.md` if using Claude Code +4. Relevant files in `docs/context/` +5. Relevant ADRs in `docs/adr/` +6. Latest relevant handoff in `docs/handoffs/` + +## Work rules +- Work on one issue at a time +- Respect issue scope +- If scope changes, update the issue before proceeding +- Do not silently introduce architecture changes +- Prefer explicit, reviewable diffs +- Avoid hidden assumptions; document them +- If uncertain, leave a note in the issue and handoff + +## Required outputs per task +- Code changes linked to the issue +- Tests or clear explanation why tests were not added/run +- Updated docs when needed +- Handoff file for non-trivial tasks + +## Handoff minimum content +Each handoff should include: +- Issue reference +- Goal +- What was changed +- Files touched +- Tests run +- Open risks +- Recommended next step + +## File ownership convention +When a task has an active owner, avoid unrelated edits in the same area. +If multiple tasks overlap, coordinate through the Gitea issue. + +## Commit guidance +Use small, focused commits. +Reference the issue number in commit messages and PRs when applicable. +``` + +## README docs contestuali +Per non caricare troppo `CLAUDE.md`, ti consiglio di spostare il contesto in file separati, seguendo il principio di progressive disclosure raccomandato per questo tipo di setup. [builder](https://www.builder.io/blog/claude-md-guide) +Crea almeno questi: + +### `docs/context/product-scope.md` +```md +# Product scope + +## What this project does +... + +## Who it serves +... + +## What is out of scope +... +``` + +### `docs/context/module-map.md` +```md +# Module map + +## Top-level areas +- `/app` → ... +- `/packages/...` → ... +- `/infra/...` → ... +- `/scripts/...` → ... + +## Important flows +- Auth flow: ... +- Data sync flow: ... +- Background jobs: ... +``` + +### `docs/context/known-constraints.md` +```md +# Known constraints + +- Constraint 1: ... +- Constraint 2: ... +- Constraint 3: ... +``` + +## ADR setup +Le ADR servono a fissare le decisioni durevoli. [humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) + +### `docs/adr/README.md` +```md +# ADRs + +This directory stores Architecture Decision Records. + +Rules: +- One decision per file +- Immutable history: do not rewrite old decisions, supersede them with a new ADR +- Use sequential numbering +- Link related issues where relevant +``` + +### `docs/adr/0001-record-architecture-decisions.md` +```md +# ADR 0001: Use ADRs to record architecture decisions + +## Status +Accepted + +## Context +This project is developed by humans and coding agents across multiple sessions. +Important decisions were at risk of being lost in chat history or issue comments. + +## Decision +We will store durable architectural decisions in `docs/adr/`. + +## Consequences +- Decisions become reviewable and versioned +- New contributors and agents can reconstruct project intent +- Chat memory is no longer required to understand architecture +``` + +## Handoff setup +L’handoff serve per passare il lavoro tra Claude Code, Codex e te in modo leggibile. [dev](https://dev.to/laynepenney/what-happens-when-4-ai-agents-share-a-memory-pool-k58) + +### `docs/handoffs/README.md` +```md +# Handoffs + +Use this directory for non-trivial task handoffs between sessions, humans, and coding agents. + +Naming convention: +`YYYY-MM-DD-issue-<number>-short-title.md` + +Write a handoff when: +- the task spans multiple sessions +- the task is blocked +- another agent or human may continue the work +- there are open risks or partial changes +``` + +### `docs/handoffs/TEMPLATE.md` +```md +# Handoff + +## Issue +#<issue-number> - <title> + +## Goal +... + +## Status +todo / in-progress / blocked / ready-for-review / done + +## What changed +- ... + +## Files touched +- ... + +## Tests +- Run: +- Not run: +- Result: + +## Risks / open questions +- ... + +## Suggested next step +- ... +``` + +## Gitea labels +Gitea supporta labels e milestones in modo nativo, quindi puoi standardizzare il flusso senza introdurre altri strumenti. [docs.gitea](https://docs.gitea.com/usage/labels) + +Ti suggerisco questo set iniziale: + +### Tipo +- `type/feature` +- `type/bug` +- `type/refactor` +- `type/docs` +- `type/chore` [docs.gitea](https://docs.gitea.com/usage/labels) + +### Stato +- `status/todo` +- `status/in-progress` +- `status/blocked` +- `status/review` +- `status/done` [github](https://github.com/go-gitea/gitea/issues/26704) + +### Priorità +- `priority/p0` +- `priority/p1` +- `priority/p2` +- `priority/p3` [docs.gitea](https://docs.gitea.com/usage/labels) + +### Owner logico +- `agent/claude` +- `agent/codex` +- `agent/human` [docs.gitea](https://docs.gitea.com/usage/labels) + +### Area opzionale +- `area/frontend` +- `area/backend` +- `area/infra` +- `area/docs` +- `area/automation` + +## Lifecycle issue +Ti consiglio questo lifecycle semplice: [go-gitea-gitea.mintlify](https://go-gitea-gitea.mintlify.app/features/issues) + +1. L’issue nasce con `type/*` + `status/todo` + priorità. [go-gitea-gitea.mintlify](https://go-gitea-gitea.mintlify.app/features/issues) +2. Quando un agente inizia, aggiungi assignee + `status/in-progress`. [docs.gitea](https://docs.gitea.com/usage/labels) +3. Se emerge un impedimento reale, passa a `status/blocked`. [docs.gitea](https://docs.gitea.com/usage/labels) +4. Quando il codice è pronto ma richiede controllo umano o altro agente, usa `status/review`. [github](https://github.com/go-gitea/gitea/issues/26704) +5. Quando è integrato e verificato, chiudi issue o marca `status/done`. [go-gitea-gitea.mintlify](https://go-gitea-gitea.mintlify.app/features/issues) + +## Template issue Gitea +Gitea supporta template multipli dentro `.gitea/ISSUE_TEMPLATE/`, quindi puoi far comparire modelli dedicati alla creazione issue. [docs.gitea](https://docs.gitea.com/usage/issue-pull-request-templates) + +### `.gitea/ISSUE_TEMPLATE/feature.md` +```md +--- +name: Feature +about: New feature or enhancement +--- + +## Summary +Describe the feature in one paragraph. + +## Problem +What user or system problem does this solve? + +## Scope +What is included? +What is explicitly out of scope? + +## Acceptance criteria +- [ ] + +## Affected areas +- [ ] + +## Tests expected +- [ ] + +## Notes +... +``` + +### `.gitea/ISSUE_TEMPLATE/bug.md` +```md +--- +name: Bug +about: Bug report +--- + +## Summary +Describe the bug. + +## Expected behavior +... + +## Actual behavior +... + +## Steps to reproduce +1. +2. +3. + +## Affected areas +- [ ] + +## Suspected cause +... + +## Tests expected +- [ ] +``` + +### `.gitea/ISSUE_TEMPLATE/refactor.md` +```md +--- +name: Refactor +about: Structural or code quality improvement +--- + +## Summary +... + +## Motivation +Why is this refactor needed? + +## Scope +... + +## Risks +... + +## Acceptance criteria +- [ ] + +## Tests expected +- [ ] +``` + +### `.gitea/PULL_REQUEST_TEMPLATE.md` +```md +## Related issue +Closes # + +## Summary +... + +## What changed +- ... + +## Tests +- [ ] Lint +- [ ] Tests +- [ ] Manual verification + +## Docs updated +- [ ] Yes +- [ ] Not needed + +## Risks +... +``` + +## Coordination docs +Ti consiglio anche due file minimi per allineare il team umano/agentico: + +### `coordination/workflow.md` +```md +# Workflow + +## Core rule +No non-trivial work starts without a Gitea issue. + +## Sequence +1. Pick issue +2. Read repo instructions and relevant docs +3. Implement within scope +4. Run checks +5. Update docs if needed +6. Write handoff if task is not trivial +7. Open/update PR +``` + +### `coordination/labels.md` +```md +# Labels + +## type/* +Feature classification + +## status/* +Workflow state + +## priority/* +Business/technical urgency + +## agent/* +Who is currently leading the task +``` + +## Come fare la migrazione dal setup attuale +Hai detto che hai iniziato con Claude Code + Ruflo ma vuoi cambiare approccio. In pratica farei così: [institute.sfeir](https://institute.sfeir.com/en/claude-code/claude-code-memory-system-claude-md/deep-dive/) + +- Mantieni Ruflo solo se ti serve come strato operativo, ma **non farlo diventare la memoria primaria del progetto**. [github](https://github.com/haasonsaas/shared-memory-mcp) +- Sposta dentro la repo tutte le convenzioni, i comandi, le decisioni e il contesto che oggi sono “sparsi” o solo impliciti. [reddit](https://www.reddit.com/r/ClaudeAI/comments/1r66oo0/how_i_structure_claude_code_projects_claudemd/) +- Da oggi in poi, ogni attività nuova passa da Gitea Issue + docs + handoff. [docs.gitea](https://docs.gitea.com/usage/issue-pull-request-templates) +- La memoria esterna, se la tieni, deve contenere solo stato operativo e contesto breve di sessione. [ideas-net-studio.github](https://ideas-net-studio.github.io/mcp-shared-memory/) + +## Ordine pratico di implementazione +Farei questi passi, in quest’ordine: +1. Crea i file e le cartelle sopra. [institute.sfeir](https://institute.sfeir.com/en/claude-code/claude-code-memory-system-claude-md/deep-dive/) +2. Compila `CLAUDE.md` con i comandi reali del progetto. [builder](https://www.builder.io/blog/claude-md-guide) +3. Compila `AGENTS.md` con regole neutrali cross-agent. [developers.openai](https://developers.openai.com/codex/guides/agents-md) +4. Crea labels e template issue in Gitea. [docs.gitea](https://docs.gitea.com/usage/issue-pull-request-templates) +5. Scrivi `module-map.md` e `known-constraints.md`. [humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) +6. Registra la prima ADR. [humanlayer](https://www.humanlayer.dev/blog/writing-a-good-claude-md) +7. Crea una prima issue di migrazione: “Adopt repo-first agent workflow”. [go-gitea-gitea.mintlify](https://go-gitea-gitea.mintlify.app/features/issues) + +Se vuoi, nel prossimo messaggio posso fare il passo successivo e scriverti **i file già personalizzati** per il tuo progetto, se mi dici almeno: stack principale, struttura repo attuale e comandi reali di dev/test/build/lint. \ No newline at end of file