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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
- [ ]
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Chore
|
||||
about: Maintenance, tooling, dependencies or docs housekeeping
|
||||
labels: ["type/chore", "status/todo"]
|
||||
---
|
||||
|
||||
## Summary
|
||||
...
|
||||
|
||||
## Why now
|
||||
...
|
||||
|
||||
## Tasks
|
||||
- [ ]
|
||||
|
||||
## Done when
|
||||
- [ ]
|
||||
@@ -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
|
||||
...
|
||||
@@ -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
|
||||
- [ ]
|
||||
@@ -0,0 +1,20 @@
|
||||
## Related issue
|
||||
Closes #
|
||||
|
||||
## Summary
|
||||
...
|
||||
|
||||
## What changed
|
||||
- ...
|
||||
|
||||
## Tests
|
||||
- [ ] Lint
|
||||
- [ ] Tests
|
||||
- [ ] Manual verification
|
||||
|
||||
## Docs updated
|
||||
- [ ] Yes
|
||||
- [ ] Not needed
|
||||
|
||||
## Risks
|
||||
...
|
||||
@@ -0,0 +1,7 @@
|
||||
# Secrets
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
@@ -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.
|
||||
@@ -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`
|
||||
@@ -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/`
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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`
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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).
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -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-<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
|
||||
@@ -0,0 +1,27 @@
|
||||
# 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
|
||||
- ...
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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`.
|
||||
@@ -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)
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user