Skip to content

Instantly share code, notes, and snippets.

View khandar-william's full-sized avatar

Khandar William khandar-william

View GitHub Profile

Cordis is not a plugin host with a privileged core. It is a small runtime whose only unit of work is a plugin. This repo vendors that core as @deepseek-ai/cordis from packages/core on that tree. YAML loading is a separate plugin (@cordisjs/plugin-loader). The kernel would still work if you never used a config file.

The implementation is five mechanisms that lock together: a callback, a fiber, a proxied context, a reactive provide/inject graph, and effects.

1. A plugin is a callback, not a class hierarchy

The registry accepts three syntactic shapes and collapses them to one function:

export type Plugin<T = any> =

Dive into Claude Code: Core Technical Content

Reference: https://arxiv.org/pdf/2604.14228

Design Principles (Table 1)

Principle Values Served Design Question Sections
Deny-first with human escalation Authority, Safety Should unrecognized actions be allowed, blocked, or escalated to the human? 5, 8, 9
Graduated trust spectrum Authority, Adaptability Fixed permission level, or a spectrum users traverse over time? 5
name structurizr-architecture-as-code
description Generate Structurizr DSL (.dsl) from source code context. Comprehensive reference for Structurizr DSL syntax — workspace, model, views, styles, deployment, configuration, CLI. Use when asked to diagram, visualize, or document software architecture from code using C4 model.

Structurizr Architecture-as-Code Skill

Structurizr is the reference implementation of the C4 model, created by the C4 model's author (Simon Brown). You describe systems in .dsl files using the Structurizr DSL, and the tooling generates multiple diagram types from a single model.

Repository: https://github.com/structurizr/structurizr

@khandar-william
khandar-william / 01-skills-overview.md
Last active June 1, 2026 09:03
Hermes Agent exploration

Here is how Hermes Agent’s skills harness works end to end: what gets loaded when, how execution happens, and how you turn skills on or off.

Mental model

Skills are markdown playbooks (SKILL.md + optional references/, scripts/, etc.), not executable plugins. The harness does three jobs:

  1. Discover skills on disk and build a cheap catalog.
  2. Expose that catalog to the model (system prompt + tools + slash commands).
  3. Load full content on demand when the user or the model explicitly asks.
@khandar-william
khandar-william / 0-prompt.txt
Last active June 10, 2025 09:42
Sample Generated Technical Documentation
Write a Markdown file for technical documentation of "any-zkvm" library.
The goal of this document is to teach future engineers to understand and maintain this library correctly.
This document should also include {@docs: C4 Model} diagrams in {@docs: Mermaid} syntax at three different levels:
1. System context diagram
2. Container diagram
3. Component diagram

To find out where disk space is being used:

  1. use apt install ncdu

or

  1. Get to the root of your machine by running cd /
  2. Run sudo du -h --max-depth=1 | sort -rh
  3. Note which directories are using a lot of disk space.
  4. cd into one of the big directories.
// Tokopedia
function removeAdsType1() {
var adsType1 = document.querySelectorAll('a[label-atm="taProduct"]');
adsType1.forEach(function (e) {
e.parentNode.remove(e);
});
}
window.setInterval(removeAdsType1, 10000);
function removeAdsType2() {
// RestTemplate interceptor
public class CustomRequestInterceptor implements ClientHttpRequestInterceptor {
@Override
public ClientHttpResponse intercept(
final HttpRequest request,
final byte[] body,
final ClientHttpRequestExecution execution
) throws IOException {
log.info("INTERCEPT {} {} {} body {}", request.getMethodValue(), request.getURI(), request.getHeaders(),

Expected state mixing local transaction and external API

\ DB succeed DB failed
API succeed DB changed, API changed DB unchanged, API unchanged
API failed DB unchanged, API unchanged DB unchanged, API unchanged
// Put in build.gradle
// Log timings per task.
class TimingsListener implements TaskExecutionListener, BuildListener {
private Clock clock
private timings = []
@Override
void beforeExecute(Task task) {
clock = new org.gradle.util.Clock()