Experimentation with GPT-5.2 Codex using OpenCode Part 1
Friday, the 13th of February 2026Some exploration of what I could one-shot with OpenCode using GPT-5.2 Codex:
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..d08823e
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1 @@
+Current Task: Determine frontmatter/doc structure from template.md and 2026/ examples, then build a nix-shell Rust CLI that generates today's template document and opens it in Neovim at the writing line (prompts/2026-02-13.md). Please read this file in FULL before any further user prompt.
diff --git a/Cargo.toml b/Cargo.toml
new file mode 100644
index 0000000..c9864b6
--- /dev/null
+++ b/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "daily-template"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+chrono = "0.4"
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..2a7c0a5
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,35 @@
+{
+ description = "Publishing tools";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ };
+
+ outputs = { self, nixpkgs }:
+ let
+ systems = [
+ "aarch64-darwin"
+ "x86_64-darwin"
+ "aarch64-linux"
+ "x86_64-linux"
+ ];
+ forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
+ in
+ {
+ devShells = forAllSystems (system:
+ let
+ pkgs = nixpkgs.legacyPackages.${system};
+ in
+ {
+ default = pkgs.mkShell {
+ packages = [
+ pkgs.cargo
+ pkgs.clippy
+ pkgs.neovim
+ pkgs.rustc
+ pkgs.rustfmt
+ ];
+ };
+ });
+ };
+}
diff --git a/prompts/2026-02-13.md b/prompts/2026-02-13.md
new file mode 100644
index 0000000..65e8777
--- /dev/null
+++ b/prompts/2026-02-13.md
@@ -0,0 +1,55 @@
+Here is some useful information about the environment you are running in:
+<env>
+ Working directory: /Users/rafiq/publish
+ Is directory a git repo: yes
+ Platform: darwin
+ Today's date: Fri Feb 13 2026
+</env>
+<files>
+
+</files>
+
+First, mkdir -p prompts/<today's date>. Then, save this prompt verbatim to that file, overwriting it if its present or creating the file (and folder) if necessary. Second, update ./AGENTS.md (create if not present) with "Current Task: <description of the task> (<link to prompts/<today's date>.md>). Please read this file in FULL before any further user prompt.". If the line is already present, update the description with a summary of the prompt below, then update the link to the file for today's date. You should then refer to the task and begin implementing it, remembering to check the current task file regularly before any future user prompt. The task for all the above begins after the following break:
+
+----
+
+Figure out the requirements for the frontmatter and the structure of a document using @template.md @2026/ as context. Then, using a nix shell for all dependencies, make a rust cli to generate a template document with today's date in neovim on the appropriate line to start writing.Called the Read tool with the following input: {"filePath":"/Users/rafiq/publish/template.md"}<file>
+00001| ---
+00002| title:
+00003| slug:
+00004| date:
+00005| tags: []
+00006| ---
+00007|
+
+(End of file - total 7 lines)
+</file>Called the list tool with the following input: {"path":"/Users/rafiq/publish/2026/"}/Users/rafiq/publish/2026/
+ february/
+ adrs.md
+ akotsks01e03.md
+ jan-2026-summary.md
+ soft-skills.md
+ wonder-man.md
+ january/
+ 21 jan 26 rumination about projects.md
+ bendy-and-the-dark-revival.md
+ bendy-and-the-ink-machine.md
+ binbows-rescue.md
+ blog-plans.md
+ code-review.md
+ dead-money.md
+ doom-and-gloom.md
+ failure.md
+ four-games-in-a-week.md
+ game-of-thrones.md
+ having-friends-is-really-great.md
+ modern-fantasy.md
+ new-monitor.md
+ overengineering.md
+ self-flagellation-in-the-name-of-learning.md
+ sites-up.md
+ ssh-key-permissions.md
+ ssh-pubkey-from-private-key.md
+ the-definition-of-insanity.md
+ whatever.md
+ you-would-think-i-was-tired-of-introspection-by-now.md
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..4fe816b
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,41 @@
+use chrono::Local;
+use std::error::Error;
+use std::fs;
+use std::path::{Path, PathBuf};
+use std::process::Command;
+
+const WRITING_LINE: usize = 8;
+
+fn main() -> Result<(), Box<dyn Error>> {
+ let today = Local::now().date_naive();
+ let date = today.format("%Y-%m-%d").to_string();
+ let year = today.format("%Y").to_string();
+ let month = today.format("%B").to_string().to_lowercase();
+
+ let relative_path = PathBuf::from(year)
+ .join(month)
+ .join(format!("{date}.md"));
+ let path = Path::new(&relative_path);
+
+ if let Some(parent) = path.parent() {
+ fs::create_dir_all(parent)?;
+ }
+
+ if !path.exists() {
+ let content = format!(
+ "---\ntitle:\nslug:\ndate: {date}\ntags: []\n---\n\n"
+ );
+ fs::write(path, content)?;
+ }
+
+ let status = Command::new("nvim")
+ .arg(format!("+{WRITING_LINE}"))
+ .arg(path)
+ .status()?;
+
+ if !status.success() {
+ return Err("nvim exited with a non-zero status".into());
+ }
+
+ Ok(())
+}
Might update the page or write another article with further experimentation and analysis of this experiment.
Some potential additions to the agent loop or modify start prompt:
- On exit editor, if the title or slug or tags not filled, analyse the file and add appropriate tags (including daily-blog always), generate a descriptive short title of the article and slug. if any are filled, don't replace them, runs "git add <file-that-was-created>", "git commit -m "<today's date>"", "git push", then exits the terminal (ctrl d equivalent)
- Specify it should add dependencies to the cargo package/workspace and nix dev shell as it needs them whenever it thinks it might need them.
- Specify it should fully build and test out the cli itself and verify it fully.