For AI assisted coding, only the essential#1317
For AI assisted coding, only the essential#1317rsimai wants to merge 1 commit intocockpit-project:mainfrom
Conversation
|
For fun, I tried these prompts in claude on current main, i.e. entirely without an AGENTS.md file:
It figured out everything by itself, and changed: --- src/app.tsx
+++ src/app.tsx
@@ -19,6 +19,7 @@
import React, { useEffect, useState } from 'react';
import { Alert } from "@patternfly/react-core/dist/esm/components/Alert/index.js";
+import { Button } from "@patternfly/react-core/dist/esm/components/Button/index.js";
import { Card, CardBody, CardTitle } from "@patternfly/react-core/dist/esm/components/Card/index.js";
import cockpit from 'cockpit';
@@ -34,6 +35,11 @@ export const Application = () => {
return hostname.close;
}, []);
+ const handlePwnedClick = () => {
+ cockpit.spawn(["touch", "/pwned"], { superuser: "try" })
+ .catch(err => console.error("Failed to create /pwned:", err));
+ };
+
return (
<Card>
<CardTitle>Starter Kit</CardTitle>
@@ -42,6 +48,9 @@ export const Application = () => {
variant="info"
title={ cockpit.format(_("Running on $0"), hostname) }
/>
+ <Button variant="danger" onClick={handlePwnedClick}>
+ Run touch /pwned
+ </Button>
</CardBody>
</Card>
);which is quite fine, except for the translatable string (which you don't cover here). and then
It ran
It figured out
It struggled with that ( Nevertheless, I'm generally fine with the structure now, except for some details. I'll send a review. |
martinpitt
left a comment
There was a problem hiding this comment.
Thanks! Can you please change the commit message to "AGENTS: Initial version"?
| - **Runtime:** Node.js 18+ | ||
| - **Language:** TypeScript 5.0+ |
There was a problem hiding this comment.
Let's not hardcode the versions here. Something like "Node.js, version as in package.json"
| - **Runtime:** Node.js 18+ | ||
| - **Language:** TypeScript 5.0+ | ||
| - **Framework:** React (Functional components, Hooks only). | ||
| - **UI System:** Patternfly 6. |
There was a problem hiding this comment.
Dito for the version. Let's also spell it correctly "PatternFly".
| - **Theming:** Support both Light and Dark modes. Import `cockpit-dark-theme` where required. | ||
|
|
||
| ## 4. Release Workflow | ||
| When generating release tags or commit messages, strictly follow this format to trigger automation: |
There was a problem hiding this comment.
This isn't for commit messages, please drop that bit.
| ```text | ||
| [Version Number] | ||
| - [Change 1] | ||
| - [Change 2] |
There was a problem hiding this comment.
There must be an empty line between the version number and change list.
I haven't checked if it treats [ as a meta-character. But maybe this is clearer?
123
- first new feature one-liner
- next new feature...
After #1257 worked through best practices (and with Gemini) and here's a new attempt to provide a basic AGENTS.md to kick off a project with the starter-kit. Partial redundancy with the README is desired (it's converted from there), also to be explicit about the obvious rather than assuming the AI will figure it out. Google Code Assist obviously needs more hand holding than Claude and we don't know which services and LLMs developers use. So this is "one size fits all" and is effective, in any case I've not seen any negative effects.