Skip to content

Commit 84274b4

Browse files
hyperpolymathclaude
andcommitted
chore: add UX infrastructure (quickstart, doctor, setup)
Added by ux-rollout.jl batch script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1bf8d20 commit 84274b4

7 files changed

Lines changed: 334 additions & 0 deletions

File tree

Justfile

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,114 @@ build-riscv:
125125
# Run panic-attacker pre-commit scan
126126
assail:
127127
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
128+
129+
# ═══════════════════════════════════════════════════════════════════════════════
130+
# ONBOARDING & DIAGNOSTICS
131+
# ═══════════════════════════════════════════════════════════════════════════════
132+
133+
# Check all required toolchain dependencies and report health
134+
doctor:
135+
#!/usr/bin/env bash
136+
echo "═══════════════════════════════════════════════════"
137+
echo " Conflow Doctor — Toolchain Health Check"
138+
echo "═══════════════════════════════════════════════════"
139+
echo ""
140+
PASS=0; FAIL=0; WARN=0
141+
check() {
142+
local name="$1" cmd="$2" min="$3"
143+
if command -v "$cmd" >/dev/null 2>&1; then
144+
VER=$("$cmd" --version 2>&1 | head -1)
145+
echo " [OK] $name — $VER"
146+
PASS=$((PASS + 1))
147+
else
148+
echo " [FAIL] $name — not found (need $min+)"
149+
FAIL=$((FAIL + 1))
150+
fi
151+
}
152+
check "just" just "1.25"
153+
check "git" git "2.40"
154+
check "Rust (cargo)" cargo "1.80"
155+
check "Zig" zig "0.13"
156+
# Optional tools
157+
if command -v panic-attack >/dev/null 2>&1; then
158+
echo " [OK] panic-attack — available"
159+
PASS=$((PASS + 1))
160+
else
161+
echo " [WARN] panic-attack — not found (pre-commit scanner)"
162+
WARN=$((WARN + 1))
163+
fi
164+
echo ""
165+
echo " Result: $PASS passed, $FAIL failed, $WARN warnings"
166+
if [ "$FAIL" -gt 0 ]; then
167+
echo " Run 'just heal' to attempt automatic repair."
168+
exit 1
169+
fi
170+
echo " All required tools present."
171+
172+
# Attempt to automatically install missing tools
173+
heal:
174+
#!/usr/bin/env bash
175+
echo "═══════════════════════════════════════════════════"
176+
echo " Conflow Heal — Automatic Tool Installation"
177+
echo "═══════════════════════════════════════════════════"
178+
echo ""
179+
if ! command -v cargo >/dev/null 2>&1; then
180+
echo "Installing Rust via rustup..."
181+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
182+
source "$HOME/.cargo/env"
183+
fi
184+
if ! command -v just >/dev/null 2>&1; then
185+
echo "Installing just..."
186+
cargo install just 2>/dev/null || echo "Install just from https://just.systems"
187+
fi
188+
echo ""
189+
echo "Heal complete. Run 'just doctor' to verify."
190+
191+
# Guided tour of the project structure and key concepts
192+
tour:
193+
#!/usr/bin/env bash
194+
echo "═══════════════════════════════════════════════════"
195+
echo " Conflow — Guided Tour"
196+
echo "═══════════════════════════════════════════════════"
197+
echo ""
198+
echo 'Intelligently orchestrate CUE, Nickel, and configuration validation workflows.'
199+
echo ""
200+
echo "Key directories:"
201+
echo " src/ Source code"
202+
echo " ffi/ Foreign function interface (Zig)"
203+
echo " src/abi/ Idris2 ABI definitions"
204+
echo " docs/ Documentation"
205+
echo " .github/workflows/ CI/CD workflows"
206+
echo " contractiles/ Must/Trust/Dust contracts"
207+
echo " .machine_readable/ Machine-readable metadata"
208+
echo " examples/ Usage examples"
209+
echo ""
210+
echo "Quick commands:"
211+
echo " just doctor Check toolchain health"
212+
echo " just heal Fix missing tools"
213+
echo " just help-me Common workflows"
214+
echo " just default List all recipes"
215+
echo ""
216+
echo "Read more: README.adoc, EXPLAINME.adoc"
217+
218+
# Show help for common workflows
219+
help-me:
220+
#!/usr/bin/env bash
221+
echo "═══════════════════════════════════════════════════"
222+
echo " Conflow — Common Workflows"
223+
echo "═══════════════════════════════════════════════════"
224+
echo ""
225+
echo "FIRST TIME SETUP:"
226+
echo " just doctor Check toolchain"
227+
echo " just heal Fix missing tools"
228+
echo ""
229+
echo "DEVELOPMENT:"
230+
echo " cargo build Build the project"
231+
echo " cargo test Run tests"
232+
echo ""
233+
echo "PRE-COMMIT:"
234+
echo " just assail Run panic-attacker scan"
235+
echo ""
236+
echo "LEARN:"
237+
echo " just tour Guided project tour"
238+
echo " just default List all recipes"

QUICKSTART-DEV.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
= Conflow — Developer Quickstart
2+
:toc: preamble
3+
4+
Clone, build, test, contribute.
5+
6+
== Prerequisites
7+
8+
* Git 2.40+
9+
* just (command runner)
10+
* See `just doctor` output for language-specific requirements
11+
12+
== Setup
13+
14+
[source,bash]
15+
----
16+
git clone https://github.com/hyperpolymath/conflow
17+
cd conflow
18+
just doctor # verify toolchain
19+
just heal # auto-install missing tools
20+
----
21+
22+
== Development Workflow
23+
24+
[source,bash]
25+
----
26+
just tour # understand the codebase
27+
just help-me # see available commands
28+
----
29+
30+
== Before Committing
31+
32+
[source,bash]
33+
----
34+
just assail # run panic-attacker security scan
35+
----
36+
37+
== Contributing
38+
39+
See link:CONTRIBUTING.md[CONTRIBUTING.md] for guidelines.

QUICKSTART-MAINTAINER.adoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
= Conflow — Maintainer Quickstart
2+
:toc: preamble
3+
4+
Packaging, deployment, and release management.
5+
6+
== Prerequisites
7+
8+
* Git 2.40+
9+
* just (command runner)
10+
* Familiarity with the project (run `just tour` first)
11+
12+
== CI/CD
13+
14+
This project uses GitHub Actions. Workflows are in `.github/workflows/`.
15+
16+
Key workflows:
17+
18+
* `hypatia-scan.yml` — Neurosymbolic security scanning
19+
* `codeql.yml` — Code analysis
20+
* `scorecard.yml` — OpenSSF Scorecard
21+
* `mirror.yml` — GitLab/Bitbucket mirroring
22+
23+
== Releasing
24+
25+
1. Update version in project config
26+
2. Update CHANGELOG.md
27+
3. Tag: `git tag -s v<VERSION>`
28+
4. Push: `git push origin main --tags`
29+
30+
== Container Build (if applicable)
31+
32+
[source,bash]
33+
----
34+
podman build -f Containerfile -t conflow:latest .
35+
----
36+
37+
== Mirrors
38+
39+
This repo is mirrored to GitLab and Bitbucket (hyperpolymath accounts)
40+
via the `mirror.yml` workflow.

QUICKSTART-USER.adoc

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
= Conflow — User Quickstart
2+
:toc: preamble
3+
4+
Get up and running in 60 seconds.
5+
6+
== Prerequisites
7+
8+
* Git 2.40+
9+
* just (command runner) — https://just.systems
10+
11+
== Install
12+
13+
[source,bash]
14+
----
15+
git clone https://github.com/hyperpolymath/conflow
16+
cd conflow
17+
just doctor # check toolchain
18+
just heal # auto-install missing tools
19+
----
20+
21+
== First Run
22+
23+
[source,bash]
24+
----
25+
just tour # guided project tour
26+
just help-me # see common workflows
27+
----
28+
29+
== Get Help
30+
31+
* `just help-me` — common workflows
32+
* `just doctor` — diagnose toolchain issues
33+
* https://github.com/hyperpolymath/conflow/issues — report bugs
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Intentfile (A2ML Canonical)
3+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
4+
5+
@abstract:
6+
Declared intent and purpose for Conflow.
7+
@end
8+
9+
## Purpose
10+
11+
Conflow — Intelligently orchestrate CUE, Nickel, and configuration validation workflows.
12+
13+
## Anti-Purpose
14+
15+
This project is NOT:
16+
- A fork or wrapper around another tool
17+
- A monorepo (unless explicitly structured as one)
18+
19+
## If In Doubt
20+
21+
If you are unsure whether a change is in scope, ask.
22+
Sensitive areas: ABI definitions, license headers, CI workflows.

contractiles/trust/Trustfile.a2ml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Trustfile (A2ML Canonical)
3+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
4+
5+
@abstract:
6+
Trust and provenance verification for Conflow.
7+
Maximal trust by default — LLM may read, build, test, lint, format.
8+
@end
9+
10+
@trust-level: maximal
11+
@trust-boundary: repo
12+
@trust-actions: [read, build, test, lint, format]
13+
@trust-deny: [delete-branch, force-push, modify-ci-secrets, publish]
14+
15+
## Integrity
16+
17+
### license-content
18+
- description: LICENSE contains expected SPDX identifier
19+
- run: grep -q 'SPDX\|License\|MIT\|Apache\|PMPL\|MPL' LICENSE
20+
- severity: critical
21+
22+
### no-secrets-committed
23+
- description: No .env or credential files in repo
24+
- run: test ! -f .env && test ! -f credentials.json && test ! -f .env.local
25+
- severity: critical

setup.sh

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: PMPL-1.0-or-later
3+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath)
4+
#
5+
# Conflow — Universal Setup Script
6+
# Detects platform and shell, installs just, then hands off to Justfile.
7+
8+
set -euo pipefail
9+
10+
echo "═══════════════════════════════════════════════════"
11+
echo " Conflow — Setup"
12+
echo "═══════════════════════════════════════════════════"
13+
echo ""
14+
15+
# Platform detection
16+
OS="$(uname -s)"
17+
ARCH="$(uname -m)"
18+
echo "Platform: $OS $ARCH"
19+
20+
# Shell detection
21+
CURRENT_SHELL="$(basename "$SHELL" 2>/dev/null || echo "unknown")"
22+
echo "Shell: $CURRENT_SHELL"
23+
echo ""
24+
25+
# Check for just
26+
if ! command -v just >/dev/null 2>&1; then
27+
echo "just (command runner) is required but not installed."
28+
echo ""
29+
case "$OS" in
30+
Linux)
31+
if command -v cargo >/dev/null 2>&1; then
32+
echo "Installing just via cargo..."
33+
cargo install just
34+
elif command -v brew >/dev/null 2>&1; then
35+
echo "Installing just via Homebrew..."
36+
brew install just
37+
else
38+
echo "Install just from: https://just.systems/man/en/installation.html"
39+
exit 1
40+
fi
41+
;;
42+
Darwin)
43+
if command -v brew >/dev/null 2>&1; then
44+
echo "Installing just via Homebrew..."
45+
brew install just
46+
else
47+
echo "Install Homebrew first: https://brew.sh"
48+
echo "Then: brew install just"
49+
exit 1
50+
fi
51+
;;
52+
*)
53+
echo "Install just from: https://just.systems/man/en/installation.html"
54+
exit 1
55+
;;
56+
esac
57+
echo ""
58+
fi
59+
60+
echo "Running diagnostics..."
61+
just doctor
62+
63+
echo ""
64+
echo "Setup complete. Run 'just help-me' for common workflows."

0 commit comments

Comments
 (0)