+devshell with opencode rules

This commit is contained in:
2026-02-18 08:28:46 +01:00
parent aeaa171bbf
commit d0f4f0ff2e
4 changed files with 133 additions and 2 deletions

15
.gitignore vendored
View File

@@ -24,6 +24,7 @@ wheels/
venv/
ENV/
env/
.direnv/
# IDE
.vscode/
@@ -40,3 +41,17 @@ htmlcov/
.sisyphus/boulder.json
.sisyphus/notepads/*/issues.md
.sisyphus/notepads/*/problems.md
# Opencode rules
.opencode-rules/
opencode.json
.todos/
# Sidecar worktree state files
.sidecar/
.sidecar-agent
.sidecar-task
.sidecar-pr
.sidecar-start.sh
.sidecar-base
.td-root

View File

@@ -1,5 +1,10 @@
# AGENTS.md - Agent Development Guide
## MANDATORY: Use td for Task Management
You must run td usage --new-session at conversation start (or after /clear) to see current work.
Use td usage -q for subsequent reads.
This document provides context and guidelines for agentic coding agents working on the zugferd-service repository.
## Project Overview

94
flake.lock generated
View File

@@ -1,5 +1,21 @@
{
"nodes": {
"agents": {
"flake": false,
"locked": {
"lastModified": 1771353084,
"narHash": "sha256-QsrA7+md+bw1ACQeuvDn2mE5X11gM0hqVGse58spedA=",
"ref": "refs/heads/master",
"rev": "5b204c95e419eb75b04c5f85e1bd56ed56a5abe4",
"revCount": 60,
"type": "git",
"url": "https://code.m3ta.dev/m3tam3re/AGENTS"
},
"original": {
"type": "git",
"url": "https://code.m3ta.dev/m3tam3re/AGENTS"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@@ -18,7 +34,59 @@
"type": "github"
}
},
"m3ta-nixpkgs": {
"inputs": {
"nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"opencode": "opencode"
},
"locked": {
"lastModified": 1771355771,
"narHash": "sha256-Uhq6aMCuzKqC2UIAbEkx+LQS77MGEVDEL7zpfoW6VB8=",
"ref": "refs/heads/master",
"rev": "dc206b13e256941298868d559fff9be31d7e0e34",
"revCount": 119,
"type": "git",
"url": "https://code.m3ta.dev/m3tam3re/nixpkgs"
},
"original": {
"type": "git",
"url": "https://code.m3ta.dev/m3tam3re/nixpkgs"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1770562336,
"narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d6c71932130818840fc8fe9509cf50be8c64634f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1770917518,
"narHash": "sha256-XSwv/tVrNo/L8SPH8Lx9xZH1PrZd/3Z3J/0SH7Xertg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3f4a3c08f2f318ee29fc8a2689f390071a94aaf0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1770115704,
"narHash": "sha256-KHFT9UWOF2yRPlAnSXQJh6uVcgNcWlFqqiAZ7OVlHNc=",
@@ -34,10 +102,34 @@
"type": "github"
}
},
"opencode": {
"inputs": {
"nixpkgs": [
"m3ta-nixpkgs",
"nixpkgs-master"
]
},
"locked": {
"lastModified": 1771271829,
"narHash": "sha256-43vPMyO7DsAgKrh0Wmt7jLDYCWUsaj30nBITreyYgX8=",
"owner": "anomalyco",
"repo": "opencode",
"rev": "d8c25bfeb44771cc3a3ba17bf8de6ad2add9de2c",
"type": "github"
},
"original": {
"owner": "anomalyco",
"ref": "v1.2.6",
"repo": "opencode",
"type": "github"
}
},
"root": {
"inputs": {
"agents": "agents",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"m3ta-nixpkgs": "m3ta-nixpkgs",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {

View File

@@ -4,13 +4,21 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs";
agents = {
url = "git+https://code.m3ta.dev/m3tam3re/AGENTS";
flake = false;
};
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
m3ta-nixpkgs,
agents,
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
pythonPackages = pkgs.python311Packages;
@@ -74,6 +82,12 @@
license = pkgs.lib.licenses.mit;
};
};
m3taLib = m3ta-nixpkgs.lib.x86_64-linux;
rules = m3taLib.opencode-rules.mkOpencodeRules {
inherit agents;
languages = ["python"];
};
in {
packages.default = zugferd-service;
packages.zugferd-service = zugferd-service;
@@ -96,6 +110,11 @@
]))
pkgs.python311Packages.pip
];
inherit (rules) instructions;
shellHook = ''
${rules.shellHook}
'';
};
});
}