ai: prepare for agentic workflows#290
Conversation
letFunny
left a comment
There was a problem hiding this comment.
It is a bit imprecise in some of the descriptions. These discrepancies might not look significant but they might compound into something major if left unchecked. I am not sure what is the best course of action, we can continue and the agents can refine the knowledge and correct themselves as they make changes to the code; or we might correct it ourselves.
Also, I think we should include the .github directory so the agent(s) know when to update the CI, how it is invoked, etc. There is knowledge about how to run the different test suites there for example.
| - `chisel/cmd_find.go` - Implements the `find` command for searching available slices by name or package. | ||
| - `chisel/cmd_info.go` - Implements the `info` command for displaying detailed metadata about specific slices. | ||
| - `chisel/cmd_debug.go` - Implements the `debug` subcommand group for internal diagnostics. | ||
| - `chisel/cmd_debug_check_release_archives.go` - Implements `debug check-release-archives`, which validates archive configurations in a chisel-releases tree. |
There was a problem hiding this comment.
This is a bit imprecise. I am not sure what is the expected level of detail at this point, it is my understanding this is a rough high level overview per-file and the "knowledge database" will grow to contain more specific instructions later on.
There was a problem hiding this comment.
This is a bit imprecise.
I agree but I understand the goal is not to be super precise here, but to help the agent knows if going deeper in a specific direction is relevant for whatever task is at hand.
it is my understanding this is a rough high level overview per-file and the "knowledge database" will grow to contain more specific instructions later on.
This is also my understanding, but the proper level of detail is yet to be defined (or at least I still need to form a solid understanding of it). The goal of this PR is to bootstrap the infra with basic knowledge and then play with agents to see how well they work with it.
| - `manifestutil/` - Generates the Chisel manifest: a ZSTD-compressed file in jsonwall format recording every installed package, slice, and file. The default filename is `manifest.wall`. | ||
| - `scripts/` - Executes Starlark mutation scripts defined in slice definitions. Scripts run after extraction and can transform or clean up files within the target filesystem. | ||
| - `control/` - Fast, memory-efficient parser for Debian control files (the metadata sections embedded in `.deb` archives). Uses a two-pass approach: index sections first, then retrieve fields directly on access. |
There was a problem hiding this comment.
Some of these are very good already. I am positively surprised.
There was a problem hiding this comment.
It was a mixed bag. The agent was rather good on small packages, doing well-known operations. However it got confused by names on the apache* packages and completely missed the point of these packages until I instructed it to look into the commit history.
| ``` | ||
| slicer/ → setup/ (resolve slice deps) → archive/ (fetch package indices) | ||
| → cache/ + deb/ (extract .deb to cache by SHA256) | ||
| → fsutil/ (hardlink/copy from cache to target rootfs) |
There was a problem hiding this comment.
We don't hardlink from cache to rootfs, we hardlink from rootfs to rootfs, this is misleading.
There was a problem hiding this comment.
Maybe that is naive but we may want to specifically instruct the agent to carefully avoid any misleading descriptions/statements.
|
|
||
| Chisel's internal packages form a directed dependency chain driven by `slicer/`: | ||
|
|
||
| ```mermaid |
There was a problem hiding this comment.
[Note to reviewer]: I am really not sure about the value of this as it can be discovered again via tools or other sources (semantic index, LSP). This can also very quickly become out of date and thus we should probably make sure the agent is instructed to periodically confirm and update this knowledge.
Add scaffolding for agent-agnostic agent workflows. This was mostly produced by an agent, prompted to replicate the existing kb structure from a reference project. Manual changes and further agent work after some steering happened.