Skip to content

Instantly share code, notes, and snippets.

View hamsolodev's full-sized avatar

mch hamsolodev

  • Melbourne, Australia
View GitHub Profile
@hamsolodev
hamsolodev / opencode-prompt-construction.md
Created June 18, 2026 23:48 — forked from rmk40/opencode-prompt-construction.md
OpenCode prompt construction: system prompt, tools, agents, and assembly pipeline

OpenCode Prompt Construction

This document explains how OpenCode assembles everything the LLM sees: system prompt, tool definitions, agent configuration, and instruction files. It focuses on what's dynamic and why.

All paths are relative to the repo root.


How the System Prompt is Built

Keybase proof

I hereby claim:

  • I am markhellewell on github.
  • I am mch (https://keybase.io/mch) on keybase.
  • I have a public key ASC-EYaw0LWJV5-MVaUigkeY5ije5gyilaK4eA8LCjTS5Ao

To claim this, I am signing this object:

@hamsolodev
hamsolodev / __MAGIKCRAFT__.markhellewell.magikcraft_spells.md
Last active August 5, 2017 01:24
Magikcraft Spells, by markhellewell.
# Originally: https://raw.githubusercontent.com/khenderick/micropython-drivers/master/ssd1306/ssd1306.py
# The MIT License (MIT)
#
# Copyright (c) 2014 Kenneth Henderick
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
<?xml version='1.0' encoding='ASCII'?>
<?grc format='1' created='3.7.5'?>
<flow_graph>
<timestamp>Thu May 28 11:48:27 2015</timestamp>
<block>
<key>options</key>
<param>
<key>id</key>
<value>top_block</value>
</param>
# -*- coding: utf-8 -*-
from autobahn.twisted.resource import WebSocketResource
from autobahn.twisted.websocket import WampWebSocketServerFactory
from crossbar.router.router import RouterFactory
from crossbar.router.session import RouterSessionFactory
from twisted.application import internet, service
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from twisted.python import usage
from twisted.web.resource import Resource
[master]
master = true
processes = 0
uid = www-data
gid = staff
chown-socket = www-data:staff
chmod-socket = 660
zerg-pool = /var/run/webapp:/tmp/webapp.sock
logfile-chown = www-data:staff
logfile-chmod = 640
myrepo: {
url: https://host.myrepo.com/101amd64-default
mirror_type: "http",
signature_type: "pubkey",
pubkey: "/usr/local/etc/ssl/certs/pkg.cert",
enabled: yes
}
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Update Route53 DNS A name record for home IP.
#
# Uses the *route53* library, rather than boto.
from __future__ import print_function
import os
import re
HTTP/1.1 400 Bad Request
Server: nginx/1.6.0
Date: Fri, 02 May 2014 03:24:39 GMT
Content-Type: text/html
Content-Length: 172
Connection: close