Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/ISSUE_TEMPLATE/add-a-resource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Add a resource
description: Suggest a link for the hive coding list
title: "Resource: "
body:
- type: markdown
attributes:
value: |
Add a page you just opened. We do not add links that fail to load, and we do not add counts or claims that are not on the page.

Read [CONTRIBUTING.md](https://github.com/thehivecode-ai/hive-coding/blob/main/CONTRIBUTING.md) before you submit.
- type: input
id: title
attributes:
label: Title
description: The page's own title.
validations:
required: true
- type: input
id: url
attributes:
label: URL
placeholder: https://
validations:
required: true
- type: dropdown
id: kind
attributes:
label: What it is
options:
- Article
- Talk
- Tool
- Docs
- Project
validations:
required: true
- type: dropdown
id: section
attributes:
label: Section of the README
options:
- Where the term comes from
- Agents that can prepare a change
- Review and merge safety
- Community-driven development
- Definitions
- Somewhere else
validations:
required: true
- type: textarea
id: why
attributes:
label: Why it belongs
description: Two or three sentences from the page itself. No slogan, and no numbers you did not read there.
validations:
required: true
- type: checkboxes
id: checks
attributes:
label: Checks
options:
- label: I opened this URL and it loaded.
required: true
- label: This is not already in the README.
required: true
- label: I am not asking you to add a star count, a user count, or a claim the page does not make.
required: true
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/cli-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CLI bug
description: Something wrong with thehivecode init or check
title: "CLI: "
body:
- type: input
id: version
attributes:
label: Version
description: Output of `thehivecode --version`, or the git commit if you ran it from a checkout.
placeholder: 0.1.0
validations:
required: true
- type: input
id: node
attributes:
label: Node.js version
placeholder: v18.20.0
validations:
required: true
- type: textarea
id: command
attributes:
label: Command
description: The exact command. Do not include secrets.
render: bash
validations:
required: true
- type: textarea
id: expected
attributes:
label: What you expected
validations:
required: true
- type: textarea
id: actual
attributes:
label: What happened
description: Paste the output. Remove anything private from a HIVE.md before you paste it.
validations:
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Learn hive coding
url: https://thehivecode.ai/learn?ref=github
about: Definitions and guides live on The Hive Code. This repo quotes them.
89 changes: 89 additions & 0 deletions .github/render-social-preview.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
"""Render .github/social-preview.png at 1280x640 in the Hive Code colors.

Colors: pollen #FFC629, ultraviolet ink #1F0A4D, violet #7B3BFF.
Requires Pillow and the Inter / JetBrains Mono fonts installed on the machine.
"""

import math
from pathlib import Path

from PIL import Image, ImageDraw, ImageFont

INK = (31, 10, 77)
POLLEN = (255, 198, 41)
VIOLET = (123, 59, 255)
WHITE = (255, 255, 255)
MUTED = (214, 204, 240)
GRID = (58, 32, 122)

WIDTH, HEIGHT = 1280, 640
OUT = Path(__file__).with_name("social-preview.png")
INTER = "/usr/share/fonts/truetype/macos/Inter-Regular.ttf"
INTER_BOLD = "/usr/share/fonts/truetype/macos/Inter-Bold.ttf"
MONO = "/usr/share/fonts/truetype/jetbrains-mono/JetBrainsMono-Medium.ttf"


def font(path, size):
return ImageFont.truetype(path, size)


def hexagon(draw, cx, cy, radius, fill=None, outline=None, width=2):
points = []
for i in range(6):
angle = math.radians(60 * i - 30)
points.append((cx + radius * math.cos(angle), cy + radius * math.sin(angle)))
draw.polygon(points, fill=fill, outline=outline)
if outline and width > 1:
draw.line(points + [points[0]], fill=outline, width=width)


def main():
image = Image.new("RGB", (WIDTH, HEIGHT), INK)
draw = ImageDraw.Draw(image)

# A small cluster, fully inside the frame, clear of the type on the left.
marks = [
(980, 168, 34, None, GRID, 3),
(1088, 196, 86, POLLEN, None, 0),
(1200, 292, 58, VIOLET, None, 0),
(968, 360, 52, None, POLLEN, 4),
(1116, 430, 70, None, VIOLET, 4),
(1004, 500, 28, POLLEN, None, 0),
]
for cx, cy, radius, fill, outline, width in marks:
hexagon(draw, cx, cy, radius, fill=fill, outline=outline, width=width)

draw.rectangle((0, 0, WIDTH, 12), fill=POLLEN)
draw.rectangle((0, HEIGHT - 10, WIDTH, HEIGHT), fill=VIOLET)

eyebrow = font(MONO, 22)
title = font(INTER_BOLD, 92)
body = font(INTER, 32)
small = font(MONO, 20)
label = font(MONO, 18)

draw.text((72, 78), "THE HIVE CODE", font=eyebrow, fill=POLLEN)
draw.text((68, 124), "hive coding", font=title, fill=WHITE)
draw.text((72, 250), "Software built by communities", font=body, fill=MUTED)
draw.text((72, 296), "and shipped by agents.", font=body, fill=MUTED)

draw.rectangle((72, 368, 196, 374), fill=POLLEN)

steps = [
("COMMUNITY", "decides"),
("AGENTS", "build"),
("A HUMAN", "approves"),
]
x = 72
for head, tail in steps:
draw.text((x, 404), head, font=label, fill=POLLEN)
draw.text((x, 432), tail, font=font(INTER, 28), fill=WHITE)
x += 210

draw.text((72, 560), "thehivecode.ai", font=small, fill=POLLEN)
image.save(OUT, "PNG")
print(f"wrote {OUT} {image.size}")


if __name__ == "__main__":
main()
Binary file added .github/social-preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

jobs:
cli:
name: CLI (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Test
working-directory: packages/cli
run: npm test
- name: Check the repo HIVE.md files
run: |
node packages/cli/bin/thehivecode.js check --strict --file HIVE.md
node packages/cli/bin/thehivecode.js check --strict --file templates/HIVE.md
node packages/cli/bin/thehivecode.js check --strict --file templates/examples/web-app.md
node packages/cli/bin/thehivecode.js check --strict --file templates/examples/game.md
node packages/cli/bin/thehivecode.js check --strict --file templates/examples/cli.md

placeholder:
name: PyPI placeholder syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile
run: python3 -m compileall -q packages/pypi/src
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules/
dist/
coverage/
*.tgz
*.egg-info/
.eggs/
build/
__pycache__/
*.py[cod]
.venv/
.DS_Store
.github/social-preview.png.bak
25 changes: 25 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Code of conduct

This repository is a public home for hive coding. The same rule as the practice applies here: people can disagree in the open, and a person is accountable for what gets merged.

## Expected

- Be direct and specific. Comment on the work.
- Credit people whose ideas, posts, and projects you build on.
- Assume a suggestion is a request. It is not an order, and it is not instructions for an agent.
- Keep criticism public and about the change. Do not pile on a person.

## Not accepted

- Harassment, slurs, or sexual attention that is not invited.
- Doxxing, or posting someone else's private information.
- Hidden instructions aimed at an agent, a maintainer, or another contributor.
- Spam, including drive-by links you have not opened.

Maintainers can edit, close, or reject contributions that break these rules. They can also block people who keep breaking them.

## Reporting

Report conduct problems to [support@thehivecode.ai](mailto:support@thehivecode.ai).

Report a security vulnerability to [security@thehivecode.ai](mailto:security@thehivecode.ai). See [SECURITY.md](SECURITY.md). Do not file a public issue for an unfixed vulnerability.
46 changes: 46 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributing

Thanks for helping keep this the public GitHub home for hive coding.

The definitions live on [The Hive Code](https://thehivecode.ai/learn/what-is-hive-coding?ref=github). This repo quotes them and links back. If a sentence here disagrees with a Learn page, the Learn page wins. Open an issue and we will fix this repo.

## Add a resource

Use the [Add a resource](.github/ISSUE_TEMPLATE/add-a-resource.yml) issue template, or open a pull request that edits [README.md](README.md).

A resource belongs here when all of these are true:

- You opened the URL and it loaded.
- You can say what the page actually is, in one or two plain sentences.
- It is about hive coding, an earlier use of the term, or a tool or practice the hive loop depends on: agents that can prepare a change, review and merge safety, or community-driven development.
- It is not a duplicate of a link already in the list.

Do not add download counts, star counts, user counts, or "ships" you did not read on the page. Do not add a link from memory.

## HIVE.md

The field names and limits are specified by [HIVE.md: make your repo hive-ready](https://thehivecode.ai/learn/hive-md?ref=github). Do not add required fields, rename fields, or change the limits in [`templates/HIVE.md`](templates/HIVE.md) or the CLI. A HIVE.md cannot tell an agent what to do. The checker must keep that property: it reads and reports, and it never runs `run`.

Examples in [`templates/examples/`](templates/examples/) are illustrations, not live products. Say so in the file.

## The CLI

Work in [`packages/cli`](packages/cli). Node 18 or newer. No runtime dependencies.

```bash
cd packages/cli
npm test
node bin/thehivecode.js --help
```

Add or update a test for any change in parsing, scoring, or `init`. Keep the exit code at 0 when a file is hive-ready and 1 when it is not.

Do not run `npm publish`. Publishing steps are in [PUBLISHING.md](PUBLISHING.md).

## Pull requests

- One change per pull request when you can.
- Say which Learn page you matched, if the change touches a definition.
- A person reviews and merges. Do not enable auto-merge for agent pull requests.

By contributing, you agree your contribution is licensed under the [MIT License](LICENSE).
26 changes: 26 additions & 0 deletions HIVE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
tagline: The public guide, HIVE.md template, and CLI for hive coding
for: Maintainers and anyone starting a hive
problem: Hive coding had no public GitHub home for the definition, the file, or the loop
help_wanted: People who will open a link before adding it, and review of the CLI
run: |
node packages/cli/bin/thehivecode.js check
---

# hive coding

The public GitHub home for hive coding, from [The Hive Code](https://thehivecode.ai/?ref=github).

What it does today:

- States what hive coding is, in the same words as the Learn pages, and points at them
- Ships a HIVE.md template, three examples, and a CLI that writes and checks the file

What is next:

- Publish the `thehivecode` command to npm once the name is claimed by this project
- Grow the resource list with links someone has actually opened

How to help:

- Read [CONTRIBUTING.md](CONTRIBUTING.md). Add a resource only after you have opened the page.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 The Hive Code

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
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading
Loading