Skip to content
Open
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
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Editor configuration
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[*.go]
indent_style = tab
tab_width = 8
[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false
31 changes: 31 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -euo pipefail

echo "Running gofmt check..."
make fmt-check

echo "Running golangci-lint..."
if ! command -v golangci-lint >/dev/null 2>&1; then
echo "golangci-lint not found. Install from https://golangci-lint.run/ before committing." >&2
exit 1
fi
make lint

echo "Running go tests..."
make test

echo "Regenerating docs to ensure sync..."
BIN="${MARKDOWN_TRANSCLUSION_BIN:-markdown-transclusion}"
if ! command -v "$BIN" >/dev/null 2>&1; then
echo "Required '$BIN' not found. Install it or set MARKDOWN_TRANSCLUSION_BIN." >&2
exit 1
fi
MARKDOWN_TRANSCLUSION_BIN="$BIN" make docs
# Abort commit if generation changed files; force developers to stage them.
if ! git diff --quiet --exit-code; then
echo "Docs changed during pre-commit. Stage the updates and re-run commit." >&2
git --no-pager diff --stat
exit 1
fi

echo "Pre-commit checks passed."
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docs Pipeline

'on':
push:
branches: [main]
pull_request:
permissions:
contents: read

Comment on lines +1 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick

Stop wasting cycles; make CI reproducible and smarter.

  • Kill global npm; use npx to avoid version drift.
  • Add concurrency to cancel superseded runs.
  • Cache Go modules.

Apply:

 name: Docs Pipeline

 'on':
   push:
     branches: [main]
   pull_request:
+concurrency:
+  group: docs-${{ github.ref }}
+  cancel-in-progress: true
@@
       - name: Set up Go
         uses: actions/setup-go@v5
         with:
           go-version-file: go.mod
+          cache: true
+          cache-dependency-path: go.sum
@@
-      - name: Install markdown-transclusion CLI
-        run: npm install -g markdown-transclusion@^1
-      # Alternatively:
-      # - name: Generate docs
-      #   run: npx --yes markdown-transclusion --version && make docs
-      #   env:
-      #     MARKDOWN_TRANSCLUSION_BIN: npx --yes markdown-transclusion
-      - name: Generate docs
-        env:
-          MARKDOWN_TRANSCLUSION_BIN: markdown-transclusion
-        run: make docs
+      - name: Generate docs
+        run: npx --yes markdown-transclusion --version && make docs
+        env:
+          MARKDOWN_TRANSCLUSION_BIN: npx --yes markdown-transclusion

Also applies to: 16-23, 24-36

🤖 Prompt for AI Agents
.github/workflows/docs.yml around lines 1-9 (also applies to 16-23 and 24-36):
replace any use of a globally installed npm CLI with npx invocations to pin tool
versions at execution time (e.g., change "npm run ..." or global tool calls to
"npx <tool>@<version> ..." or invoke scripts via "npx npm@latest -- <args>" to
avoid version drift), add a top-level concurrency block to the workflow to
cancel superseded runs (concurrency: { group: "docs-ci-${{ github.ref }}",
cancel-in-progress: true }), and add Go module caching by adding a cache step
(use actions/cache) before running go commands with path: ${{ env.GOMODCACHE }}
or ~/.cache/go-build and key: go-mod-${{ matrix.go-version }}-${{
hashFiles('**/go.sum') }} (restore before go env download/install and save
after) so CI is reproducible and faster.

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install markdown-transclusion CLI
run: npm install -g markdown-transclusion@^1
# Alternatively:
# - name: Generate docs
# run: npx --yes markdown-transclusion --version && make docs
# env:
# MARKDOWN_TRANSCLUSION_BIN: npx --yes markdown-transclusion
- name: Generate docs
env:
MARKDOWN_TRANSCLUSION_BIN: markdown-transclusion
run: make docs
- name: Ensure docs are up to date
run: git diff --stat --exit-code
- name: Run docs tests
run: make docs-test
51 changes: 51 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Quality Checks

on:
push:
branches: [main, docs-release-pipeline]
pull_request:

permissions:
contents: read

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'

Comment on lines +21 to +22
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Workflow will break: wrong Go version, outdated golangci-lint action, missing Node setup.

You can’t lint with Go 1.22.7 while claiming 1.25, and you’re installing an npm tool without setting up Node. Also, v3 of the golangci-lint action is ancient.

       - name: Set up Go
         uses: actions/setup-go@v5
         with:
-          go-version: '1.25'
+          go-version: '1.22.x'
+          check-latest: true
+          cache: true
+
+      - name: Set up Node
+        uses: actions/setup-node@v4
+        with:
+          node-version: '20'

       - name: Install markdown-transclusion
         run: npm install -g markdown-transclusion

       - name: Run golangci-lint
-        uses: golangci/golangci-lint-action@v3
+        uses: golangci/golangci-lint-action@v6
         with:
           version: v1.59.1
           install-mode: binary
           args: ./...
-        env:
-          GOTOOLCHAIN: go1.22.7

Also applies to: 29-37, 23-25

🤖 Prompt for AI Agents
.github/workflows/quality.yml lines 21-22 (and related blocks 23-25, 29-37): the
workflow currently lists an inconsistent Go version and uses an outdated
golangci-lint action while also running npm tools without installing Node;
update the Go version references so they are consistent across the file (either
change the stated version to the one you intend to use or make setup-go use
1.22.7 everywhere), replace the old golangci-lint action with the maintained
major release (use golangci/golangci-lint-action@v4 or the current latest tag),
and add a Node setup step (actions/setup-node) before any npm install or
npm-based linting commands to ensure Node is available.

- name: Install markdown-transclusion
Comment on lines +18 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

This workflow will break. Fix Go version, set up Node, upgrade golangci action.

You claim Go 1.25 (doesn’t exist here), install npm tools without Node, and use a stale action. Clean it up.

       - name: Set up Go
         uses: actions/setup-go@v5
         with:
-          go-version: '1.25'
+          go-version: '1.22.x'
+          check-latest: true
+          cache: true
+
+      - name: Set up Node
+        uses: actions/setup-node@v4
+        with:
+          node-version: '20'
@@
-      - name: Run golangci-lint
-        uses: golangci/golangci-lint-action@v3
+      - name: Run golangci-lint
+        uses: golangci/golangci-lint-action@v6
         with:
           version: v1.59.1
           install-mode: binary
           args: ./...
-        env:
-          GOTOOLCHAIN: go1.22.7

Also applies to: 23-25, 29-37


🏁 Script executed:

#!/usr/bin/env bash
# Sanity-check that Go versions are consistent across repo
rg -nP "(setup-go@|go-version:|GOTOOLCHAIN|language:\s*Go)" -g ".github/**" -n -C1

Length of output: 148


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
echo "PWD: $(pwd)"
echo "---- top-level ----"
ls -la | sed -n '1,200p' || true
echo
echo "---- .github/workflows ----"
ls -la .github/workflows || true
echo
if [ -f .github/workflows/quality.yml ]; then
  echo "---- .github/workflows/quality.yml (full) ----"
  sed -n '1,240p' .github/workflows/quality.yml
  echo "---- lines 18-23 ----"
  sed -n '18,23p' .github/workflows/quality.yml
else
  echo "quality.yml not found; searching repo for relevant workflow keywords..."
fi
echo
echo "---- rg search for Go/Node/golangci references ----"
rg -n --hidden -S 'setup-go@|go-version:|GOTOOLCHAIN|language:\s*Go|setup-node@|node-version:|golangci-lint-action|markdown-transclusion' || true

Length of output: 7780


Fix now — workflow will fail: wrong Go version, missing Node setup, stale golangci action

  • .github/workflows/quality.yml sets go-version: '1.25' but the job itself uses GOTOOLCHAIN: go1.22.7 → align to the repo/toolchain (e.g., go1.22.x or whatever go.mod declares).
  • It runs npm install -g markdown-transclusion without setting up Node — add actions/setup-node@v4 with node-version: '20' before the npm step (docs.yml already does this).
  • golangci/golangci-lint-action@v3 is outdated here — bump to @v6 and remove the hard-coded GOTOOLCHAIN once setup-go is correct.

Location: .github/workflows/quality.yml — Set up Go / Install markdown-transclusion (lines ~18–24) and Run golangci-lint block (lines ~30–37).

🤖 Prompt for AI Agents
.github/workflows/quality.yml lines ~18–24 and ~30–37: the workflow sets
go-version: '1.25' while the job uses GOTOOLCHAIN go1.22.7, calls npm without
setting up Node, and uses an outdated golangci action; update go-version to
match the repo/toolchain (e.g., go1.22.x or whatever go.mod specifies), remove
the hard-coded GOTOOLCHAIN env in the golangci-lint step, insert an
actions/setup-node@v4 step with node-version: '20' immediately before the
markdown-transclusion npm install step, and bump
golangci/golangci-lint-action@v3 to @v6 so the lint step uses the proper
toolchain and recent action version.

run: npm install -g markdown-transclusion

- name: gofmt check
run: make fmt-check

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.59.1
install-mode: binary
args: ./...
env:
GOTOOLCHAIN: go1.22.7

- name: Go tests
run: make test

- name: Generate docs
run: make docs

- name: Verify docs
run: make docs-verify

- name: Ensure docs committed
run: |
git status --porcelain
git diff --stat
git diff --exit-code
23 changes: 23 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
run:
timeout: 5m
tests: true
linters:
enable:
- govet
- staticcheck
- gofmt
- goimports
- revive
- errcheck
- ineffassign
- gosec
issues:
exclude-use-default: false

linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/flyingrobots/hubless
revive:
ignore-generated-header: true
15 changes: 15 additions & 0 deletions @hubless/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Hubless Planning Data

This directory holds the human-authored JSON records plus generated markdown artifacts derived from them.

- `schema/` – JSON schemas (hand maintained).
- `roadmap/` – milestone & feature data.
- `*.json` – source of truth (hand maintained).
- `templates/` – Markdown templates that reference shared components (edit these when layout changes).
- `generated/` – Output Markdown rendered from templates (do not edit, regenerated via `make docs`).
- `issues/` – stories & tasks following the task lifecycle.
- `tasks/*.json` and `stories/*.json` – source of truth (hand maintained).
- `templates/` – Markdown templates to document task/story tables (edit as needed).
- `generated/` – Output Markdown rendered from templates (`tasks.md`, `archive.md`, etc.). Do not edit by hand.
Comment on lines +9 to +13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick

Add a bold “DO NOT EDIT” banner to generated/ directories.

Double down on the warning to prevent accidental edits in reviews.

-  - `generated/` – Output Markdown rendered from templates (do not edit, regenerated via `make docs`).
+  - `generated/` – Output Markdown rendered from templates.
+    - DO NOT EDIT: Regenerated via `make docs`; changes here will be overwritten.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @hubless/README.md around lines 9 to 13, the generated/ directory description
needs a stronger warning: update the README text for each generated/ entry to
include a bold "DO NOT EDIT" banner (e.g., prepend "**DO NOT EDIT — generated
files**" or similar) and clarify that these files are regenerated via make docs;
also add instruction to include an identical bold banner comment at the top of
any generated files themselves so reviewers see the warning in diffs.


Run `make docs` from the repository root to regenerate anything in `generated/` after changing source JSON or templates.
17 changes: 17 additions & 0 deletions @hubless/issues/generated/archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Hubless Archive

> Generated overview of completed work. Regenerate with `make docs` after updating story or task JSON.

## Completed Stories

<!-- Generated by docs-components; do not edit manually. -->
| ID | Title | Completed Status |
| --- | --- | --- |
| — | — | — |

## Completed Tasks

<!-- Generated by docs-components; do not edit manually. -->
| ID | Title | Completed On | Badges |
| --- | --- | --- | --- |
| hubless/m0/task/0005 | Evaluate markdown component library | 2025-09-19 | Tested, Documented, Shipped |
31 changes: 21 additions & 10 deletions @hubless/issues/tasks.md → @hubless/issues/generated/tasks.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Hubless Tasks

> Source of truth: individual JSON files in `@hubless/issues/tasks/`. Task IDs follow `{project}/{milestone}/{type}/{number}`.\
> Regenerate this Markdown whenever tasks change (manual for now).
> Source of truth: individual JSON files in `@hubless/issues/tasks/`. Task IDs follow `{project}/{milestone}/{type}/{number}`.\\
> Regenerate this Markdown with `make docs` after updating task JSON files.

| ID | Title | Status | Owner | Labels | Badges | Updated |
| ------------------------------------------------------- | --------------------------------------- | ------- | ------------ | ------------------------ | ------ | ---------- |
| [hubless/m0/task/0001](tasks/hubless-m0-task-0001.json) | Port progress updater from Python to Go | PLANNED | _unassigned_ | m0-foundations, prog | — | — |
| [hubless/m0/task/0004](tasks/hubless-m0-task-0004.json) | Structure @hubless planning artifacts | STARTED | _unassigned_ | m0-foundations, planning | — | 2025-09-18 |
| [hubless/m1/task/0002](tasks/hubless-m1-task-0002.json) | Introduce Fang-based CLI skeleton | PLANNED | _unassigned_ | m1-cli, cli | — | — |
| [hubless/m1/task/0003](tasks/hubless-m1-task-0003.json) | Implement Git event store adapter | PLANNED | _unassigned_ | m1-cli, event-store | — | — |
| [hubless/m1/task/0005](tasks/hubless-m1-task-0005.json) | Prototype Bubbletea TUI and Fang CLI wireframes | STARTED | _unassigned_ | m1-cli, tui, cli | — | 2025-09-19 |
<!-- Generated by docs-components; do not edit manually. -->
| ID | Title | Status | Owner | Labels | Badges | Updated |
| --- | --- | --- | --- | --- | --- | --- |
| [hubless/m0/task/0001](tasks/hubless-m0-task-0001.json) | Port progress updater from Python to Go | PLANNED | _unassigned_ | m0-foundations, prog | — | — |
| [hubless/m0/task/0004](tasks/hubless-m0-task-0004.json) | Structure @hubless planning artifacts | STARTED | _unassigned_ | m0-foundations, planning | — | 2025-09-18 |
| [hubless/m0/task/0005](tasks/hubless-m0-task-0005.json) | Evaluate markdown component library | DONE | _unassigned_ | m0-foundations, docs, automation | Tested, Documented, Shipped | 2025-09-19 |
| [hubless/m1/task/0002](tasks/hubless-m1-task-0002.json) | Introduce Fang-based CLI skeleton | PLANNED | _unassigned_ | m1-cli, cli | — | — |
| [hubless/m1/task/0003](tasks/hubless-m1-task-0003.json) | Implement Git event store adapter | PLANNED | _unassigned_ | m1-cli, event-store | — | — |
| [hubless/m1/task/0005](tasks/hubless-m1-task-0005.json) | Prototype Bubbletea TUI and Fang CLI wireframes with mocked data | STARTED | _unassigned_ | m1-cli, tui, cli | — | — |

## Status Breakdown

<!-- Generated by docs-components; do not edit manually. -->
| Status | Count |
| --- | --- |
| DONE | 1 |
| STARTED | 2 |
| PLANNED | 3 |

## Task Dependency Graph

Expand Down Expand Up @@ -50,4 +61,4 @@
{"at": "YYYY-MM-DDThh:mm:ssZ", "author": "name", "body": "Short update."}
]
}
```
```
22 changes: 22 additions & 0 deletions @hubless/issues/stories/hubless-story-0007.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"id": "hubless/story/0007",
"title": "As a documentarian I can compose docs from reusable components",
"status": "PLANNED",
"persona": "Documentarian",
"need": "maintain consistent documentation without manual duplication",
"outcome": "Docs are assembled from shared Markdown snippets using automation integrated with Hubless tooling",
"acceptance_criteria": [
"Component snippets library exists",
"At least one doc (e.g., PRD) generated from components",
"Build command integrates snippet assembly"
],
"features": [
"hubless/feature/docs-components"
],
"dependencies": [
"hubless/story/0001"
],
"tasks": [
"hubless/m0/task/0005"
]
}
1 change: 0 additions & 1 deletion @hubless/issues/tasks.archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ Move completed tasks here once they have badges **Tested**, **Documented**, **Sh

| ID | Title | Completed | Badges | Notes |
|----|-------|-----------|--------|-------|

88 changes: 88 additions & 0 deletions @hubless/issues/tasks/hubless-m0-task-0005.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"id": "hubless/m0/task/0005",
"title": "Evaluate markdown component library",
"status": "DONE",
"owner": null,
"description": "Assess the existing markdown-transclusion project and plan integration or Go-based alternative for reusable documentation components.",
"labels": [
"m0-foundations",
"docs",
"automation"
],
"links": [
{
"type": "repo",
"url": "https://github.com/flyingrobots/markdown-transclusion",
"label": "markdown-transclusion"
},
{
"type": "doc",
"url": "../../docs/PRD.md",
"label": "PRD"
},
{
"type": "doc",
"url": "../../docs/TechSpec.md",
"label": "Tech spec"
}
],
"required_inputs": [
{
"resource": "https://github.com/flyingrobots/markdown-transclusion",
"exclusivity": "read-only",
"notes": "Review existing snippet tooling."
},
{
"resource": "../../docs/PRD.md",
"exclusivity": "read-only",
"notes": "Identify repeated content candidates."
},
{
"resource": "../../@hubless/schema",
"exclusivity": "read-only",
"notes": "Ensure schema-driven docs compatible with snippet outputs."
}
],
"expected_outputs": [
{
"resource": "../../docs/reference/docs-components-plan.md",
"notes": "Plan outlining snippet integration approach."
},
{
"resource": "../../@hubless/roadmap/features/hubless-feature-docs-components.json",
"notes": "Feature status updated with findings."
}
],
"expertise": [
"Documentation tooling",
"Go",
"Automation pipelines"
],
"dependencies": [
"hubless/m0/task/0004"
],
"badges": [
"Tested",
"Documented",
"Shipped"
],
"created_at": "2025-09-18",
"updated_at": "2025-09-19",
"notes": [
{
"at": "2025-09-19T17:20:00Z",
"author": "codex",
"body": "Integrated markdown-transclusion pipeline, added reusable snippets under docs/components, and documented make docs workflow."
},
{
"at": "2025-09-19T18:05:00Z",
"author": "codex",
"body": "Reorganized @hubless directories, added progress/dependency/status components, wired them into PRD/TechSpec, and added generator unit tests."
},
{
"at": "2025-09-19T18:25:00Z",
"author": "codex",
"body": "Parameterised dependency graph output and published archived rollups with CI enforcement."
}
]
}
11 changes: 11 additions & 0 deletions @hubless/issues/templates/archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Hubless Archive

> Generated overview of completed work. Regenerate with `make docs` after updating story or task JSON.

## Completed Stories

![[docs/components/issues/archived-stories.md]]

## Completed Tasks

![[docs/components/issues/archived-tasks.md]]
Loading
Loading