diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index 2fa7879..116ef86 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -15,14 +15,14 @@ jobs: name: Verify runs-on: ubuntu-latest steps: - - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 with: node-version: '24' cache: npm - run: npm ci - run: npm run verify - - uses: actions/upload-pages-artifact@v5 + - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5 if: github.event_name != 'pull_request' with: path: dist @@ -44,4 +44,4 @@ jobs: steps: - name: Publish id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5 diff --git a/.gitignore b/.gitignore index 887371d..bd1567d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist/ .env .env.* .DS_Store +security_best_practices_report.md diff --git a/README.md b/README.md index af0b8cc..3dc7fe5 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,8 @@ one language before the other is supported. ## Content Write Markdown in `src/content/posts/it/` and `src/content/posts/en/`. -The repository includes one published example in each language and one Italian -draft; replace these with your own articles when ready. +The first article is available as a draft in Italian (`grill-me-prima-del-codice.md`) +and English (`grill-me-before-coding.md`). For example, an Italian article can start with: ```yaml @@ -148,10 +148,25 @@ as `.github.io/blog/` requires configuring `base` and adapting interna ## Verification and dependency status -Prepared with Astro 7.3.5 on 2026-10-03. Local checks and static build pass. -GitHub deployment must still be verified in your own repository. -At preparation time, npm audit reports a high-severity advisory for the transitive -`http-cache-semantics` dependency (also attributed to Astro), with no patched version -available in npm. See https://github.com/advisories/GHSA-ch52-4w7c-c8xp. -This project publishes static files only; it does not deploy an Astro caching server. -Do not use `npm audit fix --force`, whose proposed downgrade is incompatible with this starter. +The project uses Astro 7.3.5 and publishes static files only. The lockfile resolves +`http-cache-semantics` to 4.3.0. Run `npm ci`, `npm audit`, and `npm run verify` to +check the locked dependencies and production build. Avoid `npm audit fix --force`, +which can introduce incompatible dependency changes. + +GitHub Actions are pinned to full commit SHAs. When updating an Action, verify the +replacement commit in its official repository and update its version comment. + +Production builds include a Content Security Policy generated by Astro. Scripts +are limited to the same origin and build-generated hashes; the initial theme +script is served from `/theme-init.js` and runs before visible page content. Inline +style attributes remain allowed for Shiki syntax highlighting, while script attributes +and arbitrary inline scripts are blocked. YouTube embeds use +`https://www.youtube-nocookie.com`, and article images may use HTTPS sources. +Check theme switching, search, code highlighting, and video embeds in a production +preview after policy changes: CSP is not enforced by Astro's development server. +Astro currently emits a generic Shiki/CSP warning even with the explicit style +attribute allowance; syntax highlighting has been verified in a production browser. + +The policy is delivered through a meta tag on GitHub Pages. Directives that require +HTTP headers, such as `frame-ancestors`, must be configured at a compatible hosting +layer if needed. Local validation does not verify a deployment on GitHub Pages. diff --git a/astro.config.mjs b/astro.config.mjs index 1e85412..1c49b21 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,31 @@ export default defineConfig({ site: 'https://CodeGeeksAI.github.io', output: 'static', trailingSlash: 'always', + security: { + csp: { + directives: [ + "default-src 'self'", + "base-uri 'none'", + "object-src 'none'", + "form-action 'self'", + 'frame-src https://www.youtube-nocookie.com', + "img-src 'self' https: data:", + ], + scriptDirective: { + resources: [ + { resource: "'self'", kind: 'element' }, + { resource: "'none'", kind: 'attribute' }, + ], + }, + styleDirective: { + resources: [ + { resource: "'self'", kind: 'element' }, + // Shiki uses style attributes; scripts and style elements remain restricted. + { resource: "'unsafe-inline'", kind: 'attribute' }, + ], + }, + }, + }, i18n: { locales: ['it', 'en'], defaultLocale: 'it', diff --git a/package-lock.json b/package-lock.json index d96b02f..22c62f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3166,9 +3166,9 @@ } }, "node_modules/http-cache-semantics": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", - "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz", + "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==", "license": "BSD-2-Clause" }, "node_modules/iron-webcrypto": { diff --git a/public/theme-init.js b/public/theme-init.js new file mode 100644 index 0000000..19d0479 --- /dev/null +++ b/public/theme-init.js @@ -0,0 +1,6 @@ +(() => { + let theme; + try { theme = localStorage.getItem('code-geeks-theme'); } catch {} + document.documentElement.dataset.theme = theme === 'dark' || theme === 'light' + ? theme : (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); +})(); diff --git a/src/content/posts/en/first-post.md b/src/content/posts/en/first-post.md deleted file mode 100644 index 3ca6ff7..0000000 --- a/src/content/posts/en/first-post.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "My first article about AI" -description: "A starting point for my blog about AI and technology." -pubDate: 2026-10-03 -lang: en -translationKey: primo-post -urlSlug: first-post -tags: [ai, technology] -draft: false ---- - -This is the first article on my blog. - -## Why this blog - -I want to share experiments, explanations and verifiable results. - -```python -print("Hello, AI!") -``` diff --git a/src/content/posts/en/grill-me-before-coding.md b/src/content/posts/en/grill-me-before-coding.md new file mode 100644 index 0000000..4ce2b4d --- /dev/null +++ b/src/content/posts/en/grill-me-before-coding.md @@ -0,0 +1,317 @@ +--- +title: "Grill me: questions to ask before writing code with AI" +description: "How to use a guided discussion to clarify requirements, constraints, and decisions before handing implementation over to a coding agent." +pubDate: 2026-10-16 +lang: en +translationKey: grill-me-before-coding +urlSlug: grill-me-before-coding +tags: [ai, coding, agentic-engineering] +author: Fedele Mantuano +draft: true +--- + +When we give a coding task to an AI assistant, we often describe the outcome we want while leaving implicit the choices we take for granted. The assistant then has to fill those gaps with assumptions, which can lead to an implementation that differs from what we had in mind. + +A request such as “add a function to import a CSV” may seem clear, but it leaves many questions unanswered: which columns to accept, how to handle invalid rows or duplicates, and where to save the data. There is a gap between the request and the decisions needed to implement it. When an agent lacks the necessary instructions, we effectively force it to make assumptions. + +Working with an AI agent calls for a change in perspective. We are no longer writing all the code ourselves: we have a “team” to guide, and we need to explain the decisions we want it to make. This takes time and attention, because we have to consider the choices involved and how they affect the result. In this article, we will explore how to structure a guided discussion with an AI assistant, known as **grill me**, to clarify requirements, constraints, and decisions before handing implementation over to a coding agent. + +## What “grill me” means + +In this context, the expression means “challenge me with probing questions.” The assistant’s first task becomes examining the idea, finding ambiguities, and helping me choose between concrete alternatives. + +In [Matt Pocock’s skills repository](https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md), `grill-me` invokes the `grilling` skill. The [grilling procedure](https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md) organizes the discussion into rounds and accounts for dependencies between decisions: some questions only become meaningful once earlier ones have been resolved. It also recommends an answer to each question, which the user can accept or discuss. For coding work, [`grill-with-docs`](https://github.com/mattpocock/skills/blob/main/skills/engineering/grill-with-docs/SKILL.md) combines the discussion with defining the project’s vocabulary and documenting decisions. + +The key idea is that the agent can inspect the code and documentation, while the user understands the product and the intended design choices. The discussion brings unresolved decisions to the surface so we can examine and clarify them before writing code. + +## Why a short request leaves decisions open + +Consider this request: + +> Add a CSV import for contacts. + +An implementation might work perfectly with a sample file and behave unexpectedly with real data. Before writing it, there are at least four decisions to make: + +| Decision | Question to clarify | Effect on the code | +| --- | --- | --- | +| Format | Which columns are required? | Header and field validation | +| Duplicates | How do we recognize an existing contact? | Matching and update rules | +| Errors | Does one invalid row block the entire file? | Partial saves or a full rollback | +| Result | How do we report what was imported? | User-facing summary and diagnostics | + +The initial prompt can be brief. The crucial step is making its implications explicit before turning it into code. + +## An example discussion before implementation + +Suppose we choose the email address as the contact’s identifier. A follow-up question then becomes useful: + +> If the CSV contains an email address that already exists, should we update the contact, skip the row, or report an error? + +If we choose to update the contact, another decision opens up: + +> Should an empty field in the CSV clear the existing value or leave it unchanged? + +The second question depends on the first. If we had decided to skip duplicates, it would not be needed for that path. + +This is an illustrative example, not a transcript of an actual session or a measured result. It shows how a seemingly simple request can hide decisions about product behavior. + +## A prompt to start with + +Here is an example set of instructions to start the discussion, which you can adapt to your project: + +```text +I want to add a CSV import for contacts. + +Before writing code, help me clarify the design through a “grill me” discussion. + +Inspect the available code and documentation to establish the facts +you can verify yourself. Ask me to decide on the desired behavior +and any constraints you cannot infer from the repository. + +Organize the questions into short rounds. For each question, explain +the decision needed, its consequences, and your recommended answer, +with a reason. Wait for my answers before asking dependent questions. + +Challenge my assumptions when you find contradictions or uncovered cases. +Distinguish verified facts from assumptions that are still open. + +At the end, summarize requirements, exclusions, decisions, and acceptance +criteria. Wait for me to confirm the summary before implementing anything. +``` + +The repository instructions are especially useful with an agent that can read files. If CSV validation already exists, it should inspect it. Questions to the user can then focus on unresolved decisions. + +## Installing the skills + +Let’s get practical. To follow this workflow, we first need to install the plugin that bundles Matt Pocock’s skills. A **skill** contains instructions for performing a task; the **plugin** distributes the collection of skills to the coding agent. + +With Claude Code, run this in your terminal: + +```bash +claude plugin install mattpocock-skills@claude-plugins-official +``` + +With Codex, first register the marketplace—the catalog from which to install the plugin—then add the plugin: + +```bash +codex plugin marketplace add mattpocock/skills +codex plugin add mattpocock-skills@mattpocock +``` + +These are the commands listed in the [project README](https://github.com/mattpocock/skills#installation-30-second-setup). Choose the procedure for the agent you use. After installation, check that the skills are available in the session you will work in. + +In the following examples, I use the project’s `/skill-name` notation. In Codex, you can explicitly invoke a skill by typing `$skill-name` or selecting it from the skills menu, as described in the [official documentation](https://developers.openai.com/codex/skills). For example, the equivalent of `/grill-with-docs` is `$grill-with-docs`. + +## Setting up the repository once + +Open the agent in your project directory. To configure the skills, use `/setup-matt-pocock-skills` and pass the configuration proposal shown below directly with it. + +The [setup skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/setup-matt-pocock-skills/SKILL.md) inspects the repository, agrees on where to manage issues, and configures conventions for documents and, where applicable, ticket classification. It proposes changes before writing them. The instructions are linked from the project’s existing `CLAUDE.md` or `AGENTS.md`, with details under `docs/agents/`. + +A **ticket**, or issue, is a single unit of work: it describes the desired outcome, how to verify it, and which other tasks it depends on. I suggest choosing **Local Markdown** to keep these documents in the repository too. This is a practical preference for this workflow: we can read and edit everything with the same tools we use for code, and the agent can find the requirements without going through an external service. + +The [local convention proposed by the skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md) uses `.scratch/`. The name suggests a place for temporary notes, although the directory is not automatically deleted. I prefer keeping specifications and tickets under **`docs/features/`**, because they describe the project and its evolution, and I want to maintain them alongside the code. + +I therefore suggest starting setup by sending **the command and these instructions in the same message**. You can copy this proposal directly: + +```text +/setup-matt-pocock-skills Use the Local Markdown tracker with a custom convention: +save specifications and tickets under docs/features// +instead of .scratch//. + +For each feature, use spec.md for the specification and issues/ for tickets, +with one numbered file per ticket. Keep status, dependencies, +and acceptance criteria in the individual tickets. + +Record these paths in docs/agents/issue-tracker.md and reference +the convention from the repository instructions file already in use. +When a skill proposes .scratch/, apply this convention instead. +``` + +This gives the agent our preference from the start of setup. Before approving the proposed changes, check that `docs/agents/issue-tracker.md` lists the paths under `docs/features/`. + +For the CSV import, the suggested structure becomes: + +```text +docs/ +├── agents/ +│ └── issue-tracker.md +├── adr/ +│ └── 0001-contact-import-boundary.md +└── features/ + └── import-contacts-csv/ + ├── spec.md + └── issues/ + ├── 01-basic-import.md + └── 02-duplicate-handling.md +``` + +Setup defines the conventions; the specification, tickets, and any ADRs come in the following steps. `docs/agents/issue-tracker.md` tells the agent where to find and update the work; `docs/features/` collects specifications and tickets by feature; `docs/adr/` stores architectural decisions. The glossary stays in the project’s `GLOSSARY.md`. + +This customizes the default paths: some skill instructions explicitly mention `.scratch/`, so it is worth repeating the convention in later requests and checking the paths of generated files. There is no need to modify the installed plugin. Track these documents in Git and keep completed tickets too, updating their status: they remain useful for tracing what was requested, decided, and built. + +The benefit grows as we record and update decisions. The agent can reconstruct the project more easily in later sessions: the documents provide a reference that must stay aligned with the code. + +## Starting the discussion and recording decisions + +After setup, we can start with: + +```text +/grill-with-docs I want to add a CSV import for contacts. +``` + +This skill combines `grilling` and `domain-modeling`: while we discuss the desired behavior, the agent also clarifies the meaning of the terms we use. Before moving on, ask it to summarize the decisions and confirm that you have reached a shared understanding. + +### The glossary: the role of the old CONTEXT.md + +Earlier examples in the project refer to `CONTEXT.md`; today, the reference document is called **`GLOSSARY.md`**. The [README notes the name change](https://github.com/mattpocock/skills#2-the-agent-is-way-too-verbose). + +The glossary defines the domain language. In our example, it might explain what we mean by *contact*, *duplicate*, and *import*. It helps us use the same concepts in conversations, documents, and code names. It does not contain the chat transcript or technical plan. The [domain modeling skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/SKILL.md) creates or updates it when a term is clarified. + +### ADRs: what we decided and why + +An **ADR**, or *Architecture Decision Record*, records an architectural decision and the reasons behind it. It is normally stored in a numbered file under `docs/adr/`, such as `0001-contact-import-boundary.md`. + +Its value is explaining a choice to someone reading the code months later. A hypothetical example: “We store specifications and tickets as Markdown files in the repository rather than using GitHub Issues. This keeps code, requirements, and decisions together for anyone who downloads the project, and lets the agent consult them without accessing external services. We accept giving up the assignment and notification features offered by GitHub Issues.” Where alternatives existed, we can record why we rejected them and which consequences we accept. + +The [format used by the skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/ADR-FORMAT.md) can be brief: context, decision, and rationale. ADRs are proposed selectively, for choices that are costly to reverse, hard to understand without context, and the result of a genuine trade-off. + +A session may therefore update an existing glossary and produce one or more ADRs when needed. It does not guarantee the creation of exactly two files at the end of every discussion. + +## Turning the discussion into a specification + +Once the decisions are confirmed, I suggest one more step before implementation: + +```text +/to-spec + +Follow docs/agents/issue-tracker.md: save the specification to +docs/features/import-contacts-csv/spec.md. +``` + +The [`to-spec` skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/to-spec/SKILL.md) synthesizes the conversation and its understanding of the code into a specification: the problem, solution, user needs, implementation decisions, planned checks, and exclusions. It also clarifies where to test the behavior and asks for confirmation of those testing boundaries. + +With the local convention agreed during setup, the specification is written to `docs/features/import-contacts-csv/spec.md`. We now have a reference to read and correct before assigning the work. + +For the CSV import, a verifiable rule might be: “If a row contains an invalid email address, no new contacts are saved, and the result identifies the invalid row.” A statement like this gives us a way to assess the implementation. + +## Breaking the work into tickets + +A specification may involve more work than it makes sense to assign to a single session. In that case, use: + +```text +/to-tickets docs/features/import-contacts-csv/spec.md + +Follow docs/agents/issue-tracker.md: save one file per ticket under +docs/features/import-contacts-csv/issues/. +``` + +The [`to-tickets` skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/to-tickets/SKILL.md) proposes small tasks, each delivering complete, verifiable behavior, with acceptance criteria and explicit dependencies. It asks us to approve the breakdown before saving it. With the local tracker, it creates one Markdown file per ticket. + +For example, one illustrative breakdown is: + +| Ticket | Verifiable outcome | Depends on | +| --- | --- | --- | +| 01 — Basic import | A valid CSV creates contacts and returns a count | None | +| 02 — Duplicates | Existing contacts are skipped and duplicates within the file are reported | 01 | +| 03 — Errors and rollback | An invalid file leaves no partially saved contacts | 01 | + +Each ticket includes checks for its own behavior. The agent must inspect the code to assess whether 02 and 03 are truly independent: they may touch the same areas and require a different order. For a very small change, one ticket may be enough. + +## Choosing the model and preparing the handoff + +For the design phase, I suggest a frontier model with strong reasoning capabilities: it needs to spot ambiguities, discuss alternatives, and check that decisions are consistent. To implement narrowly scoped tickets, we can consider a smaller, less expensive model and verify its results. Documentation reduces the number of implicit choices; the difficulty of the ticket remains the basis for choosing the model. + +I suggest keeping the **grill-me chat as the parent chat** during implementation too. The main agent retains the overall picture of the decisions, coordinates the work, and collects the results. Implementation of individual tickets is delegated to dedicated subagents, each with its own separate context. Give each subagent its ticket and references to the relevant specification, glossary, and ADRs, so it can focus on its task while the parent chat maintains the overall view. + +## Implementing with dedicated subagents + +A **subagent** is an agent to which the main agent delegates a bounded task and which returns its result. Its context is separate from the parent chat’s context; this does not necessarily mean it starts without information from the conversation, because what it inherits depends on the environment and how it is started. For this workflow, we ask for it to receive the instructions and documents needed for the ticket, avoiding the full grill-me discussion. The [official Codex documentation](https://developers.openai.com/codex/subagents) explains how delegation can keep exploration and intermediate output out of the main conversation. Check which models and capabilities are available in your environment. + +To delegate a single ticket, explicitly ask the parent chat to start a subagent. You can use this message, replacing the placeholder with an available model: + +```text +Start a dedicated subagent to implement the ticket +docs/features/import-contacts-csv/issues/01-basic-import.md +using the model . + +Give it the ticket and references to the specification +docs/features/import-contacts-csv/spec.md, the glossary, and relevant ADRs. +Ask it to follow the implement skill for that ticket, including +the required tests and code review. Do not transfer the full grill-me conversation. + +Keep this chat as the coordinator: wait for the subagent’s result, +check that it meets the acceptance criteria, and report the changes, +checks performed, and any open issues. +If the environment does not support delegation, the requested model, +or starting without inheriting the full history, report that before proceeding. +``` + +The request to “start a subagent” makes delegation explicit. Writing only `/implement docs/features/import-contacts-csv/issues/01-basic-import.md` asks the current agent to use the skill: that command alone does not assign implementation to another agent. + +The [`implement` skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/implement/SKILL.md) calls for test-driven development where possible, checks during the work, the full test suite, and a final code review. It also calls for a commit on the current branch: if you want to handle commits yourself, say so in your request. + +To coordinate the entire specification, there is [`implement-spec`](https://github.com/mattpocock/skills/blob/main/skills/engineering/implement-spec/SKILL.md). It reads the dependencies between tickets, uses subagents with separate branches and worktrees, and brings their work together on an integration branch. A **worktree** is a separate Git working directory: it lets agents edit files without sharing the same working copy. + +In the same grill-me chat, you can give an instruction like this, replacing the placeholder with an available model: + +```text +/implement-spec docs/features/import-contacts-csv/spec.md + +Read the specification, the tickets in docs/features/import-contacts-csv/issues/, +the glossary, and relevant ADRs. + +Keep this chat as the coordinator and delegate each ticket to a dedicated +subagent using the model . Give each subagent its ticket +and the necessary documents, avoiding the full grill-me conversation +when the environment allows it. + +If delegation or the requested model is unavailable, report that +before proceeding. + +Run tickets in parallel only when their dependencies have been resolved. +Integrate the results, run checks across the combined changes, +and complete the code review required by the skill, fixing any issues found. + +At the end, report completed tickets, tests run, and any remaining issues. +``` + +The skill coordinates tickets that are ready to start, launching others as dependencies are resolved. Parallelism helps when work can be separated; integration still needs to resolve conflicts and verify the overall behavior. + +It is better to invoke these skills explicitly: `implement` and `implement-spec` are declared as user-invoked skills. Simply writing “implement the tickets” does not guarantee that the documented procedure will be activated. + +## Code review and testing the actual result + +The [`code-review` skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.md) separates two checks: compliance with repository standards and correspondence between the code and the specification. Both need a clear reference for the changes to review, such as the commit before implementation, along with the approved specification. + +**Review is already part of the implementation workflow:** `implement` invokes `code-review` when the work is done, before committing; `implement-spec` invokes it on the integration branch once all tickets are complete and calls for fixing the issues found. There is no need to run it again if it has already reviewed the entire result. + +You can still invoke it explicitly, for example for a later review. In the parent chat, write: + +```text +/code-review + +Review the changes between and HEAD. +Use docs/features/import-contacts-csv/spec.md and its associated tickets +as the reference for the required behavior. + +Report repository standards violations separately from differences +against the specification, identifying the affected code +and the relevant requirement or rule. +``` + +Replace `` with the Git identifier recorded before starting the work. The comparison must include every commit for the feature: using only the commit immediately before `HEAD` could leave part of the implementation out. This example covers changes already committed; if there are uncommitted changes too, explicitly ask for them to be included in the review. + +Before considering the work complete, we need to read the results, have any issues fixed, and try the feature. Automated tests should already be part of implementation; our own checks on the product complement that work. + +For the CSV import, try a valid file, an existing contact, repeated email addresses, and an invalid row. Check both the returned message and the data actually saved, including whether a failed attempt leaves any partial changes. Closing the tickets should correspond to a result we can observe and accept. + +## When to use it and its limitations + +This approach is useful when a change involves product rules, data handling, integrations, or decisions that are difficult to reverse. + +For a typo or a change already defined in detail, a direct request may be enough. + +The assistant can still recommend a poor choice, miss a requirement, or present an assumption with too much confidence. The discussion helps make decisions visible; code quality still needs to be verified through tests, review, and checks appropriate to the project. + +Before asking AI to implement a feature, it is worth understanding which decisions we are handing over. A grill-me session can turn a vague idea into a set of choices we can explain and verify. diff --git a/src/content/posts/it/bozza-esempio.md b/src/content/posts/it/bozza-esempio.md deleted file mode 100644 index 4be47be..0000000 --- a/src/content/posts/it/bozza-esempio.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Una bozza da completare" -description: "Questo articolo compare solo nell'anteprima di sviluppo." -pubDate: 2026-10-03 -lang: it -translationKey: bozza-esempio -urlSlug: bozza-esempio -tags: [ai] -draft: true ---- - -Questa bozza è visibile con `npm run dev`, ma non viene inclusa nel sito pubblicato. diff --git a/src/content/posts/it/grill-me-prima-del-codice.md b/src/content/posts/it/grill-me-prima-del-codice.md new file mode 100644 index 0000000..4a9b0f8 --- /dev/null +++ b/src/content/posts/it/grill-me-prima-del-codice.md @@ -0,0 +1,314 @@ +--- +title: "Grill me: le domande da fare prima di scrivere codice con l’AI" +description: "Come usare un confronto guidato per chiarire requisiti, vincoli e scelte prima di affidare un’implementazione a un agente di coding." +pubDate: 2026-10-16 +lang: it +translationKey: grill-me-before-coding +urlSlug: grill-me-prima-del-codice +tags: [ai, coding, agentic-engineering] +author: Fedele Mantuano +draft: true +--- +Quando affidiamo un’attività di coding a un assistente AI, spesso descriviamo il risultato che vogliamo ottenere, ma lasciamo implicite le scelte che per noi sono scontate. L’assistente deve quindi colmare quei vuoti con delle ipotesi, che possono portare a un’implementazione diversa da quella che avevamo in mente. +Una richiesta come «aggiungi una funzione per importare un CSV» può sembrare chiara, ma lascia aperte molte domande: quali colonne accettare, come gestire righe errate o duplicati, e dove salvare i dati. Fondamentalmente c'è un disallineamento tra la richiesta e le decisioni che l’implementazione richiede. Quindi, l'agente che non ha ricevuto tutte le istruzioni necessarie, sbaglia, o meglio lo costringiamo a fare delle ipotesi. +Quando lavoriamo con un agente AI dobbiamo cambiare prospettiva, noi non stiamo più scrivendo codice, ma abbiamo un "team" che dobbiamo guidare e a cui dobbiamo spiegare tutte le decisioni che vogliamo vengano prese. Ovviamente questa attività richiede tempo e attenzione, perché bisogna pensare a tutte le possibili decisioni e a come queste influenzano il risultato finale. In questo articolo esploreremo come strutturare un confronto guidato con l’assistente AI, noto come **grill me**, per chiarire requisiti, vincoli e scelte prima di affidare l’implementazione a un agente di coding. + +## Che cosa significa “grill me” + +L’espressione significa, in questo contesto, «mettimi alla prova con domande approfondite». Il compito iniziale dell’assistente diventa esaminare l’idea, trovare le ambiguità e aiutarmi a scegliere tra alternative concrete. + +Nel [repository di skill di Matt Pocock](https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md), `grill-me` richiama la skill `grilling`. La [procedura di grilling](https://github.com/mattpocock/skills/blob/main/skills/productivity/grilling/SKILL.md) organizza il confronto in turni e tiene conto delle dipendenze tra le decisioni: alcune domande diventano sensate solo dopo aver risolto quelle precedenti. Per ogni domanda propone anche una risposta consigliata, che l’utente può accettare o discutere. Per il lavoro sul codice, la skill [`grill-with-docs`](https://github.com/mattpocock/skills/blob/main/skills/engineering/grill-with-docs/SKILL.md) affianca al confronto la definizione del linguaggio del progetto e la documentazione delle decisioni. +Il concetto fondamentale è che l'agente ha la conoscenza del codice e della documentazione, mentre l'utente ha la conoscenza del prodotto e delle scelte di design. Il confronto serve a far emergere le decisioni che non sono ancora state prese, così da poterle discutere e chiarire prima di scrivere codice. + +## Perché una richiesta breve lascia scelte aperte + +Consideriamo questa richiesta: + +> Aggiungi un’importazione CSV per caricare i contatti. + +Un’implementazione potrebbe funzionare perfettamente con un file di esempio e comportarsi in modo inatteso con i dati reali. Prima di scriverla, ci sono almeno quattro decisioni da prendere: + +| Decisione | Domanda da chiarire | Conseguenza sul codice | +| --- | --- | --- | +| Formato | Quali colonne sono obbligatorie? | Validazione dell’intestazione e dei campi | +| Duplicati | Come riconosciamo un contatto già presente? | Regole di confronto e aggiornamento | +| Errori | Una riga errata blocca tutto il file? | Salvataggio parziale o annullamento completo | +| Risultato | Come comunichiamo ciò che è stato importato? | Riepilogo e diagnostica per l’utente | + +Il prompt di partenza può essere breve. Il passaggio decisivo è renderne esplicite le conseguenze prima di trasformarlo in codice. + +## Un esempio di confronto prima dell’implementazione + +Immaginiamo di scegliere l’indirizzo email come identificativo del contatto. A quel punto diventa utile una domanda successiva: + +> Se nel CSV compare un’email già presente, vuoi aggiornare il contatto, ignorare la riga oppure segnalare un errore? + +Se scegliamo di aggiornare il contatto, si apre un’altra decisione: + +> Un campo vuoto nel CSV deve cancellare il valore esistente oppure lasciarlo invariato? + +Quest’ultima domanda dipende dalla precedente. Se avessimo deciso di ignorare i duplicati, non sarebbe necessaria per quel percorso. + +L’esempio è illustrativo: non rappresenta una sessione eseguita né un risultato misurato. Mostra come una richiesta apparentemente semplice possa nascondere scelte sul comportamento del prodotto. + +## Un prompt da cui partire + +Questo è un esempio di istruzioni per avviare il confronto, da adattare al progetto: + +```text +Voglio aggiungere un’importazione CSV per i contatti. + +Prima di scrivere codice, aiutami a chiarire il progetto con un confronto +in stile “grill me”. + +Esamina il codice e la documentazione disponibili per ricavare i fatti +che puoi verificare da solo. Chiedimi le decisioni sul comportamento +desiderato e sui vincoli che non puoi dedurre dal repository. + +Organizza le domande in turni brevi. Per ogni domanda spiega quale scelta +serve, quali conseguenze ha e quale risposta consigli, con una motivazione. +Aspetta le mie risposte prima di porre domande che dipendono da esse. + +Metti in discussione le mie ipotesi quando trovi contraddizioni o casi +non coperti. Distingui i fatti verificati dalle ipotesi ancora aperte. + +Alla fine riepiloga requisiti, esclusioni, decisioni e criteri di +accettazione. Attendi la mia conferma del riepilogo prima di implementare. +``` + +La parte sul repository è particolarmente utile con un agente che può leggere i file. Se la validazione del CSV esiste già, dovrebbe esaminarla. Le domande all’utente possono così concentrarsi sulle scelte ancora aperte. + +## Installare le skill + +Entriamo nella parte pratica. Per seguire questo percorso dobbiamo prima installare il plugin che raccoglie le skill di Matt Pocock. Una **skill** contiene istruzioni per svolgere un’attività; il **plugin** distribuisce l’insieme delle skill nell’agente di coding. + +Con Claude Code, eseguiamo nel terminale: + +```bash +claude plugin install mattpocock-skills@claude-plugins-official +``` + +Con Codex, registriamo prima il marketplace, cioè il catalogo da cui installare il plugin, e poi aggiungiamo il plugin: + +```bash +codex plugin marketplace add mattpocock/skills +codex plugin add mattpocock-skills@mattpocock +``` + +Questi sono i comandi indicati nel [README del progetto](https://github.com/mattpocock/skills#installation-30-second-setup). Le due procedure sono alternative in base all’agente utilizzato. Terminata l’installazione, verifichiamo che le skill siano disponibili nella sessione con cui lavoreremo. + +Negli esempi seguenti uso la notazione `/nome-skill` del progetto. In Codex possiamo richiamare esplicitamente una skill scrivendo `$nome-skill` o selezionandola dal menu delle skill, come descritto nella [documentazione ufficiale](https://developers.openai.com/codex/skills). Per esempio, l’equivalente di `/grill-with-docs` è `$grill-with-docs`. + +## Configurare il repository una volta + +Apriamo l’agente nella directory del progetto. Per configurare le skill usiamo `/setup-matt-pocock-skills`, passando direttamente la proposta di configurazione mostrata qui sotto. + +La [skill di setup](https://github.com/mattpocock/skills/blob/main/skills/engineering/setup-matt-pocock-skills/SKILL.md) esamina il repository, concorda dove gestire le issue e configura le convenzioni per documenti e, se prevista, classificazione dei ticket. Propone le modifiche prima di scriverle. Le istruzioni vengono collegate dal file `CLAUDE.md` o `AGENTS.md` già usato dal progetto, con i dettagli in `docs/agents/`. + +Un **ticket**, o issue, è una singola unità di lavoro: descrive cosa ottenere, come verificarlo e da quali altre attività dipende. Io suggerisco di scegliere **Local Markdown** per conservare anche questi documenti nel repository. È una preferenza pratica per questo flusso: possiamo leggere e modificare tutto con gli stessi strumenti del codice, e l’agente può trovare i requisiti senza passare da un servizio esterno. + +La [convenzione locale proposta dalla skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md) usa `.scratch/`. Il nome richiama uno spazio per appunti temporanei, anche se la directory non viene cancellata automaticamente. Io preferisco conservare specifiche e ticket sotto **`docs/features/`**, perché descrivono il progetto e la sua evoluzione e voglio mantenerli insieme al codice. + +Suggerisco quindi di avviare il setup inviando **il comando e queste istruzioni nello stesso messaggio**. Possiamo copiare direttamente questa proposta: + +```text +/setup-matt-pocock-skills Usiamo il tracker Local Markdown, con una convenzione personalizzata: +salva specifiche e ticket in docs/features// anziché +in .scratch//. + +Per ogni funzionalità usa spec.md per la specifica e issues/ per i ticket, +con un file numerato per ciascun ticket. Mantieni stato, dipendenze +e criteri di accettazione nei singoli ticket. + +Registra questi percorsi in docs/agents/issue-tracker.md e richiama +la convenzione dal file di istruzioni del repository già in uso. +Quando una skill propone .scratch/, applica invece questa convenzione. +``` + +In questo modo l’agente conosce la nostra preferenza fin dall’avvio del setup. Prima di confermare le modifiche proposte, controlliamo che `docs/agents/issue-tracker.md` riporti i percorsi sotto `docs/features/`. + +Per l’importazione CSV, la struttura suggerita diventa: + +```text +docs/ +├── agents/ +│ └── issue-tracker.md +├── adr/ +│ └── 0001-confine-importazione-contatti.md +└── features/ + └── import-contatti-csv/ + ├── spec.md + └── issues/ + ├── 01-importazione-base.md + └── 02-gestione-duplicati.md +``` + +Il setup definisce le convenzioni; specifica, ticket ed eventuali ADR arriveranno nei passaggi successivi. `docs/agents/issue-tracker.md` spiega all’agente dove trovare e aggiornare il lavoro; `docs/features/` raccoglie specifiche e ticket per funzionalità; `docs/adr/` conserva le decisioni architetturali. Il glossario resta nel `GLOSSARY.md` del progetto. + +Questa è una personalizzazione dei percorsi predefiniti: alcune istruzioni delle skill citano esplicitamente `.scratch/`, quindi conviene ribadire la convenzione nelle richieste successive e controllare i percorsi dei file generati. Non serve modificare il plugin installato. Versioniamo questi documenti in Git e conserviamo anche i ticket conclusi, aggiornandone lo stato: restano utili per ricostruire cosa è stato richiesto, deciso e realizzato. + +Il vantaggio cresce man mano che registriamo e aggiorniamo le decisioni. L’agente può ricostruire più facilmente il progetto nelle sessioni successive: i documenti sono una memoria consultabile, che va mantenuta allineata al codice. + +## Avviare il confronto e conservare le decisioni + +Dopo il setup possiamo partire con: + +```text +/grill-with-docs Voglio aggiungere un’importazione CSV per i contatti. +``` + +Questa skill combina `grilling` e `domain-modeling`: mentre discutiamo il comportamento desiderato, l’agente chiarisce anche il significato dei termini usati. Prima di passare alle fasi successive, facciamoci riepilogare le decisioni e confermiamo di aver raggiunto una comprensione condivisa. + +### Il glossario: il ruolo del vecchio CONTEXT.md + +In esempi precedenti del progetto si incontra `CONTEXT.md`; oggi il documento di riferimento si chiama **`GLOSSARY.md`**. Il [README segnala il cambio di nome](https://github.com/mattpocock/skills#2-the-agent-is-way-too-verbose). + +Il glossario definisce il linguaggio del dominio. Nel nostro esempio potrebbe spiegare che cosa intendiamo per *contatto*, *duplicato* e *importazione*. Serve a usare gli stessi concetti nelle conversazioni, nei documenti e nei nomi del codice. Non contiene la trascrizione della chat o il piano tecnico. La [skill di domain modeling](https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/SKILL.md) lo crea o aggiorna quando viene chiarito un termine. + +### Gli ADR: che cosa abbiamo deciso e perché + +Un **ADR**, *Architecture Decision Record*, registra una decisione architetturale e le ragioni che l’hanno motivata. Si conserva normalmente in un file numerato sotto `docs/adr/`, per esempio `0001-confine-importazione-contatti.md`. + +Il suo valore è spiegare una scelta a chi leggerà il codice mesi dopo. Un esempio ipotetico: «Conserviamo specifiche e ticket come file Markdown nel repository, invece di usare GitHub Issues. In questo modo chi scarica il progetto trova insieme codice, requisiti e decisioni, e l’agente può consultarli senza accedere a servizi esterni. Accettiamo di rinunciare alle funzioni di assegnazione e notifica offerte da GitHub Issues.». Se esistevano alternative, possiamo annotare perché le abbiamo scartate e quali conseguenze accettiamo. + +Il [formato previsto dalla skill](https://github.com/mattpocock/skills/blob/main/skills/engineering/domain-modeling/ADR-FORMAT.md) può essere breve: contesto, decisione e motivazione. Gli ADR vengono proposti con criterio, per scelte costose da cambiare, poco comprensibili senza contesto e nate da un confronto tra alternative reali. + +Quindi la sessione può aggiornare un glossario esistente e produrre uno o più ADR quando servono. Non garantisce la creazione di esattamente due file alla fine di ogni confronto. + +## Trasformare il confronto in una specifica + +Confermate le decisioni, suggerisco un passaggio ulteriore prima dell’implementazione: + +```text +/to-spec + +Segui docs/agents/issue-tracker.md: salva la specifica in +docs/features/import-contatti-csv/spec.md. +``` + +La [skill `to-spec`](https://github.com/mattpocock/skills/blob/main/skills/engineering/to-spec/SKILL.md) sintetizza la conversazione e la conoscenza del codice in una specifica: problema, soluzione, esigenze degli utenti, decisioni di implementazione, verifiche previste ed esclusioni. Chiarisce anche dove verificare il comportamento con i test e chiede conferma su questi punti. + +Con la convenzione locale concordata durante il setup, la specifica viene scritta in `docs/features/import-contatti-csv/spec.md`. Da questo momento abbiamo un riferimento da rileggere e correggere prima di assegnare il lavoro. + +Per il CSV, una regola verificabile potrebbe essere: «Se una riga contiene un’email non valida, nessun nuovo contatto viene salvato e il risultato indica la riga errata». Una frase così permette di valutare l’implementazione. + +## Dividere il lavoro in ticket + +Una specifica può richiedere più lavoro di quanto sia ragionevole affidare a una singola sessione. In quel caso usiamo: + +```text +/to-tickets docs/features/import-contatti-csv/spec.md + +Segui docs/agents/issue-tracker.md: salva un file per ticket in +docs/features/import-contatti-csv/issues/. +``` + +La [skill `to-tickets`](https://github.com/mattpocock/skills/blob/main/skills/engineering/to-tickets/SKILL.md) propone attività piccole, ciascuna con un comportamento completo e verificabile, criteri di accettazione e dipendenze esplicite. Prima di salvarle ci chiede di approvare la suddivisione. Con il tracker locale crea un file Markdown per ogni ticket. + +Per esempio, una possibile suddivisione illustrativa è: + +| Ticket | Risultato verificabile | Dipende da | +| --- | --- | --- | +| 01 — Importazione base | Un CSV valido crea contatti e restituisce un conteggio | Nessuno | +| 02 — Duplicati | I contatti esistenti vengono ignorati e le ripetizioni interne segnalate | 01 | +| 03 — Errori e annullamento | Un file non valido non lascia contatti salvati parzialmente | 01 | + +Ogni ticket comprende le verifiche del proprio comportamento. L’agente deve valutare sul codice se 02 e 03 siano davvero indipendenti: potrebbero modificare gli stessi punti e richiedere un ordine diverso. Per una modifica molto piccola può bastare un solo ticket. + +## Scegliere il modello e preparare il passaggio di consegne + +Per la fase di progettazione io suggerisco un modello di frontiera con buone capacità di ragionamento: deve individuare ambiguità, discutere alternative e controllare la coerenza delle decisioni. Per implementare ticket circoscritti possiamo valutare un modello più piccolo e meno costoso, verificandone i risultati. La documentazione riduce le scelte lasciate implicite; la difficoltà del ticket resta il criterio per scegliere il modello. + +Suggerisco di mantenere la **chat del grill-me come chat madre** anche durante l’implementazione. Qui l’agente principale conserva il quadro delle decisioni, coordina il lavoro e raccoglie i risultati. L’implementazione dei singoli ticket viene invece affidata a subagent dedicati, ciascuno con un proprio contesto separato. A ogni subagent passiamo il ticket e i riferimenti a specifica, glossario e ADR pertinenti, così può concentrarsi sul proprio compito mentre la chat madre mantiene la visione d’insieme. + +## Implementare con subagent dedicati + +Un **subagent** è un agente a cui l’agente principale delega un compito delimitato e che restituisce il proprio risultato. Il suo contesto è separato da quello della chat madre; questo non significa necessariamente che parta senza informazioni della conversazione, perché ciò che eredita dipende dall’ambiente e dalla modalità di avvio. Per questo flusso chiediamo di fornirgli le istruzioni e i documenti necessari al ticket, evitando di trasferire tutta la discussione del grill-me. La [documentazione ufficiale di Codex](https://developers.openai.com/codex/subagents) spiega come la delega possa tenere esplorazioni e output intermedi fuori dalla conversazione principale. Modello e capacità disponibili vanno verificati nell’ambiente usato. + +Per delegare un singolo ticket, chiediamo esplicitamente alla chat madre di avviare un subagent. Possiamo usare questo messaggio, sostituendo il segnaposto con un modello disponibile: + +```text +Avvia un subagent dedicato per implementare il ticket +docs/features/import-contatti-csv/issues/01-importazione-base.md +usando il modello . + +Assegnagli il ticket e i riferimenti alla specifica +docs/features/import-contatti-csv/spec.md, al glossario e agli ADR pertinenti. +Chiedigli di seguire la skill implement per quel ticket, inclusi i test +e la code review previsti. Non trasferire l’intera conversazione del grill-me. + +Mantieni questa chat come coordinamento: attendi il risultato del subagent, +controlla che soddisfi i criteri di accettazione e riportami modifiche, +verifiche eseguite ed eventuali problemi aperti. +Se l’ambiente non supporta la delega, il modello richiesto o l’avvio senza +ereditare l’intera cronologia, segnalalo prima di procedere. +``` + +La richiesta «avvia un subagent» rende esplicita la delega. Scrivere soltanto `/implement docs/features/import-contatti-csv/issues/01-importazione-base.md` chiede invece all’agente corrente di usare la skill: quel comando, da solo, non assegna l’implementazione a un altro agente. + +La [skill `implement`](https://github.com/mattpocock/skills/blob/main/skills/engineering/implement/SKILL.md) prevede sviluppo guidato dai test dove possibile, controlli durante il lavoro, suite completa e code review finale. Prevede anche un commit sul branch corrente: se vogliamo gestire i commit personalmente, specifichiamolo nella richiesta. + +Per coordinare l’intera specifica esiste invece [`implement-spec`](https://github.com/mattpocock/skills/blob/main/skills/engineering/implement-spec/SKILL.md). Legge le dipendenze tra ticket, usa subagent con branch e worktree separati e riunisce il lavoro in un branch di integrazione. Un **worktree** è una directory di lavoro Git separata: consente agli agenti di modificare i file senza usare la stessa copia di lavoro. + +Nella stessa chat del grill-me possiamo dare un’istruzione di questo tipo, sostituendo il segnaposto con un modello disponibile: + +```text +/implement-spec docs/features/import-contatti-csv/spec.md + +Leggi la specifica, i ticket in docs/features/import-contatti-csv/issues/, +il glossario e gli ADR pertinenti. + +Mantieni questa chat come coordinamento e delega ogni ticket a un subagent +dedicato, usando il modello . Passa a ciascun subagent il ticket +e i documenti necessari, evitando di includere l’intera conversazione +del grill-me quando l’ambiente lo consente. + +Se la delega o il modello richiesto non sono disponibili, segnalalo +prima di procedere. + +Avvia in parallelo solo i ticket le cui dipendenze sono già risolte. +Integra i risultati, esegui le verifiche sull’insieme delle modifiche +e completa la code review prevista dalla skill, correggendo i problemi emersi. + +Alla fine riporta i ticket conclusi, i test eseguiti e gli eventuali +problemi ancora aperti. +``` + +La skill coordina i ticket che possono partire, avviandone altri quando le dipendenze sono risolte. Il parallelismo aiuta quando il lavoro è separabile; l’integrazione deve comunque risolvere i conflitti e verificare il comportamento complessivo. + +È preferibile richiamare queste skill esplicitamente: `implement` e `implement-spec` sono dichiarate come skill da invocare su richiesta dell’utente. Scrivere soltanto «implementa i vari ticket» non garantisce l’attivazione della procedura documentata. + +## Code review e prova sul risultato reale + +La [skill `code-review`](https://github.com/mattpocock/skills/blob/main/skills/engineering/code-review/SKILL.md) separa due controlli: il rispetto degli standard del repository e la corrispondenza tra codice e specifica. Per entrambi serve un riferimento chiaro delle modifiche da esaminare, per esempio il commit precedente all’implementazione, oltre alla specifica approvata. + +**La review è già prevista nel flusso di implementazione:** `implement` richiama `code-review` al termine del lavoro, prima del commit; `implement-spec` la richiama sul branch di integrazione quando tutti i ticket sono completati e prevede la correzione dei problemi emersi. Non serve quindi avviarla di nuovo se è già stata eseguita sull’intero risultato. + +Possiamo comunque richiamarla esplicitamente, per esempio per una revisione successiva. Nella chat madre scriviamo: + +```text +/code-review + +Esamina le modifiche tra e HEAD. +Usa docs/features/import-contatti-csv/spec.md e i ticket associati +come riferimento per il comportamento richiesto. + +Riporta separatamente le violazioni degli standard del repository +e le differenze rispetto alla specifica, indicando i punti del codice +coinvolti e il requisito o la regola di riferimento. +``` + +Sostituiamo `` con l’identificativo Git annotato prima di iniziare il lavoro. Il confronto deve includere tutti i commit della funzionalità: usare soltanto quello precedente a `HEAD` potrebbe escludere parte dell’implementazione. Questo esempio riguarda le modifiche già presenti nei commit; se ci sono anche modifiche non committate, chiediamo esplicitamente di includerle nella review. + +Prima di considerare concluso il lavoro dobbiamo leggere i risultati, far correggere i problemi emersi e provare la funzionalità. I test automatizzati devono già essere parte dell’implementazione; la nostra verifica sul prodotto completa quel lavoro. + +Per l’importazione CSV, proviamo un file valido, un contatto già presente, email ripetute e una riga errata. Controlliamo sia il messaggio restituito sia i dati effettivamente salvati, verificando anche che un tentativo fallito non lasci modifiche parziali. La chiusura dei ticket deve corrispondere a un risultato che sappiamo osservare e accettare. + +## Quando usarlo e quali limiti ha + +Questo approccio è utile quando una modifica coinvolge regole di prodotto, gestione dei dati, integrazioni o scelte difficili da cambiare in seguito. +Per correggere un refuso o una modifica già definita nei dettagli, una richiesta diretta può essere sufficiente. + +L’assistente può inoltre suggerire una scelta sbagliata, trascurare un requisito o presentare un’ipotesi con troppa sicurezza. Il confronto aiuta a rendere visibili le decisioni; la qualità del codice va comunque verificata con test, revisione e controlli appropriati al progetto. + +Prima di chiedere all’AI di implementare una funzione, vale quindi la pena capire quali decisioni le stiamo affidando. Una sessione di “grill me” può trasformare un’idea ancora vaga in un insieme di scelte che sappiamo spiegare e verificare. diff --git a/src/content/posts/it/primo-post.md b/src/content/posts/it/primo-post.md deleted file mode 100644 index e0c1028..0000000 --- a/src/content/posts/it/primo-post.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Il mio primo articolo sull'AI" -description: "Un punto di partenza per il mio blog su AI e tecnologia." -pubDate: 2026-10-03 -lang: it -translationKey: primo-post -urlSlug: primo-post -tags: [ai, technology] -draft: false ---- - -Questo è il primo articolo del mio blog. - -## Perché questo blog - -Voglio condividere esperimenti, spiegazioni e risultati verificabili. - -```python -print("Ciao, AI!") -``` diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro index e9bb9f8..aa02731 100644 --- a/src/layouts/Base.astro +++ b/src/layouts/Base.astro @@ -41,16 +41,10 @@ const navigation = [ {alternatives.map((item) => )} - + +