loushang AGENTS.md

loushang AGENTS.md is an instructions file for Codex, OpenCode from zhnt/loushang. It costs 1,376 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Loushang, a Python project with AI, agent, coding, and session modules.

In plain words
What is it for?
Use them when planning changes, choosing the right worktree, running tests or builds, and organizing Python modules, examples, scripts, and documentation.
Why use it?
They explain where code belongs, how long-lived worktree lanes are used, and which commands and naming rules contributors should follow.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/zhnt/loushang/agents-md
Clone the repo
git clone --depth 1 https://github.com/zhnt/loushang

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loushang AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/zhnt/loushang/agents-md.svg)](https://agentmods.dev/instructions/zhnt/loushang/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/zhnt/loushang/agents-md"><img src="https://agentmods.dev/badge/instructions/zhnt/loushang/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,376 This file is loaded in full into every session.
When invoked 1,376 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01376 $0.01376
Opus 5 $0.00688 $0.00688
Sonnet 5 $0.00275 $0.00275
Haiku 4.5 $0.00138 $0.00138

Measured 3d ago against content hash 487e300a719e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loushang AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guidelines

Project Structure & Module Organization

This repository uses a src/ layout. Core package code lives in src/loushang/, with AI-facing modules under src/loushang/ai/, agent code under src/loushang/agent/, and coding/session infrastructure under src/loushang/coding/. Tests live in tests/. Runnable examples live in examples/ai/, with supporting scripts in scripts/ and exploratory work in spikes/. Architecture and design notes belong in docs/.

Worktree Lane Conventions

Use long-lived worktree lanes for major module work:

  • /home/dev/lsspace/loushang is the control/integration lane. It normally stays on main and is used for progress management, direction coordination, final verification, merge/push, and small integration-only edits.
  • .worktrees/tui is the long-lived Native TUI lane. For TUI-dominant work, create or switch task branches inside this lane.
  • .worktrees/code is the long-lived V1 code hardening lane. For coding/runtime/session/tool/policy/diagnostics-dominant work, create or switch task branches inside this lane.
  • .worktrees/harness is the long-lived cross-product harness lane. For loushang.harness, product-neutral shared substrate, coding-to-harness migration, tool/approval/presentation/resource/context boundary work, and harness architecture docs, create or switch task branches inside this lane. Use lane/harness as an integration branch and keep unfinished harness migration out of main; see docs/internals/architecture/harness/development-workflow.md.
  • .worktrees/method is the long-lived method/work-runtime lane when method-layer work is active. For loushang.method, method execution semantics, MethodPlan/WorkEvent projection, and work/method integration work, create or switch task branches inside this lane.
  • .worktrees/ai is the long-lived AI/provider lane when AI-layer work is active. For AI/provider/model/usage/auth work, create or switch task branches inside this lane.
  • .worktrees/agent is the long-lived agent-runtime lane when agent-layer work is active. For agent loop/session orchestration/queue/tool-call semantics work, create or switch task branches inside this lane.
  • .worktrees/ontology is the long-lived ontology lane. For loushang.ontology, operational ontology infrastructure, semantic schema/runtime, ontology actions/functions, standards interoperability, data fusion, and ontology architecture docs, create or switch task branches inside this lane. Use lane/ontology as its integration branch and keep it synchronized with the control lane's latest main.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 57 lines · 1,376 tokens per session scan A 487e300a719e

Subscribe to this mod's changes

loushang AGENTS.md is an instructions file published in the GitHub repository zhnt/loushang (1,291 stars, last pushed 4d ago), licensed Apache-2.0. It adds 1,376 tokens to every session, about $0.0069 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.