Skip to content

Commit 2a045a0

Browse files
author
Harald Kirschner
committed
Add documentation
1 parent b626b88 commit 2a045a0

10 files changed

Lines changed: 2222 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: actions/configure-pages@v5
28+
- uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: docs
31+
- id: deployment
32+
uses: actions/deploy-pages@v4

docs/.nojekyll

Whitespace-only changes.

docs/cli.html

Lines changed: 429 additions & 0 deletions
Large diffs are not rendered by default.

docs/extension.html

Lines changed: 343 additions & 0 deletions
Large diffs are not rendered by default.

docs/guide.html

Lines changed: 424 additions & 0 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
<!DOCTYPE html>
2+
<html lang="en" data-color-mode="dark" data-dark-theme="dark" data-light-theme="light">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>Primer — Prime repositories for AI-assisted development</title>
7+
<meta name="description" content="Generate tailored AI instructions, assess readiness, evaluate effectiveness, and configure development environments — for individual repos or entire organizations.">
8+
<link rel="stylesheet" href="https://unpkg.com/@primer/css/dist/primer.css">
9+
<link rel="stylesheet" href="styles.css">
10+
</head>
11+
<body>
12+
<!-- ===== Header ===== -->
13+
<header class="site-header">
14+
<div class="container-xl px-3 px-md-6 d-flex flex-items-center flex-justify-between" style="height: var(--header-height);">
15+
<div class="d-flex flex-items-center" style="gap: 16px;">
16+
<a href="index.html" class="site-logo">
17+
<svg width="20" height="20" viewBox="0 0 16 16" fill="currentColor"><path d="M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25Zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V2.75a.25.25 0 0 0-.25-.25Zm7.25 8a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 0 1.5h-3.5a.75.75 0 0 1-.75-.75Zm-7.25-6a.75.75 0 0 1 1.06 0l3 3a.75.75 0 0 1 0 1.06l-3 3a.75.75 0 0 1-1.06-1.06L4.44 8 1.72 5.28a.75.75 0 0 1 0-1.06Z"/></svg>
18+
<span>Primer</span>
19+
</a>
20+
<button class="nav-toggle" aria-label="Toggle navigation">
21+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M1 2.75A.75.75 0 0 1 1.75 2h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 2.75Zm0 5A.75.75 0 0 1 1.75 7h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 7.75ZM1.75 12h12.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Z"/></svg>
22+
</button>
23+
</div>
24+
<nav class="nav-links">
25+
<a href="guide.html" class="nav-link">Guide</a>
26+
<a href="cli.html" class="nav-link">CLI</a>
27+
<a href="extension.html" class="nav-link">VS Code</a>
28+
</nav>
29+
<div class="d-flex flex-items-center header-actions" style="gap: 8px;">
30+
<button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle theme">
31+
<svg class="theme-icon-dark" width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M9.598 1.591a.749.749 0 0 1 .785-.175 7.001 7.001 0 1 1-8.967 8.967.75.75 0 0 1 .961-.96 5.5 5.5 0 0 0 7.046-7.046.75.75 0 0 1 .175-.786Zm1.616 1.945a7 7 0 0 1-7.678 7.678 5.499 5.499 0 1 0 7.678-7.678Z"/></svg>
32+
<svg class="theme-icon-light" width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 1.5a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11ZM8 0a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0V.75A.75.75 0 0 1 8 0ZM3.076 2.783a.75.75 0 0 1 1.06 0l1.061 1.06a.75.75 0 0 1-1.06 1.061l-1.06-1.06a.75.75 0 0 1 0-1.06Zm8.787 0a.75.75 0 0 1 1.06 1.06l-1.06 1.061a.75.75 0 0 1-1.06-1.06l1.06-1.06ZM8 13a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 8 13ZM3.076 11.217a.75.75 0 0 1 1.06 1.06l-1.06 1.061a.75.75 0 0 1-1.061-1.06l1.06-1.061Zm8.787 1.06a.75.75 0 0 1 1.06-1.06l1.061 1.06a.75.75 0 0 1-1.06 1.061l-1.061-1.06ZM0 8a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5H.75A.75.75 0 0 1 0 8Zm13 0a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5A.75.75 0 0 1 13 8Z"/></svg>
33+
</button>
34+
<a href="https://github.com/pierceboggan/primer" class="btn btn-sm d-flex flex-items-center" style="gap: 6px;">
35+
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
36+
GitHub
37+
</a>
38+
</div>
39+
</div>
40+
</header>
41+
42+
<main class="container-xl px-3 px-md-6">
43+
<!-- ===== Hero ===== -->
44+
<section class="hero">
45+
<h1 class="hero-title">Primer</h1>
46+
<p class="hero-subtitle">Prime repositories for AI-assisted development</p>
47+
<p class="hero-desc">
48+
Generate tailored AI instructions, assess readiness across 9 pillars,
49+
evaluate instruction effectiveness, and configure dev environments —
50+
for individual repos or entire organizations.
51+
</p>
52+
53+
<div class="cta-group" style="margin-top: 32px;">
54+
<div class="install-cmd" data-cmd="npx github:pierceboggan/primer init" role="button" tabindex="0" title="Click to copy">
55+
<span class="prompt">$</span>
56+
<span class="cmd-label">npx github:pierceboggan/primer init</span>
57+
<span class="copy-hint"></span>
58+
</div>
59+
</div>
60+
<div class="cta-group" style="margin-top: 12px;">
61+
<a href="https://marketplace.visualstudio.com/items?itemName=digitarald.primer-vscode" class="btn btn-primary">
62+
VS Code Extension
63+
</a>
64+
<a href="guide.html" class="btn btn-outline">
65+
Get Started →
66+
</a>
67+
</div>
68+
</section>
69+
70+
<!-- ===== Features ===== -->
71+
<section>
72+
<div class="feature-grid">
73+
<div class="feature-card">
74+
<div class="feature-icon blue">🔍</div>
75+
<div class="feature-title">Assess</div>
76+
<p class="feature-desc">
77+
Score any repository across 9 maturity pillars — from style and testing to AI tooling.
78+
Get a readiness level from 1–5 with actionable recommendations.
79+
</p>
80+
</div>
81+
82+
<div class="feature-card">
83+
<div class="feature-icon purple"></div>
84+
<div class="feature-title">Generate</div>
85+
<p class="feature-desc">
86+
Use the Copilot SDK to analyze your repo and produce tailored
87+
<code>copilot-instructions.md</code> or <code>AGENTS.md</code> files. Monorepo-aware.
88+
</p>
89+
</div>
90+
91+
<div class="feature-card">
92+
<div class="feature-icon orange">🧪</div>
93+
<div class="feature-title">Evaluate</div>
94+
<p class="feature-desc">
95+
Measure instruction impact by comparing AI responses with and without them,
96+
scored by a judge model. Use as a CI gate to prevent regressions.
97+
</p>
98+
</div>
99+
100+
<div class="feature-card">
101+
<div class="feature-icon green">⚙️</div>
102+
<div class="feature-title">Configure</div>
103+
<p class="feature-desc">
104+
Generate <code>.vscode/mcp.json</code> and <code>.vscode/settings.json</code>
105+
so the dev environment is wired for AI from the start.
106+
</p>
107+
</div>
108+
109+
<div class="feature-card">
110+
<div class="feature-icon pink">🚀</div>
111+
<div class="feature-title">Scale</div>
112+
<p class="feature-desc">
113+
Batch-process repos across GitHub orgs or Azure DevOps projects.
114+
Clone, generate, and open PRs automatically.
115+
</p>
116+
</div>
117+
</div>
118+
</section>
119+
120+
<!-- ===== Maturity Model ===== -->
121+
<section style="margin: 64px 0;">
122+
<h2 class="section-heading">AI Readiness Maturity Model</h2>
123+
<p style="color: var(--fgColor-muted, #7d8590); margin-bottom: 24px;">
124+
Primer's readiness assessment scores repos against a 5-level maturity model
125+
spanning Repo Health (8 pillars) and AI Setup.
126+
</p>
127+
<table class="maturity-table">
128+
<thead>
129+
<tr>
130+
<th>Level</th>
131+
<th>Name</th>
132+
<th>What it means</th>
133+
</tr>
134+
</thead>
135+
<tbody>
136+
<tr>
137+
<td><span class="level-badge level-1">1</span></td>
138+
<td>Functional</td>
139+
<td>Builds, tests, and basic tooling in place</td>
140+
</tr>
141+
<tr>
142+
<td><span class="level-badge level-2">2</span></td>
143+
<td>Documented</td>
144+
<td>README, CONTRIBUTING, custom AI instructions exist</td>
145+
</tr>
146+
<tr>
147+
<td><span class="level-badge level-3">3</span></td>
148+
<td>Standardized</td>
149+
<td>CI/CD, security policies, CODEOWNERS, observability</td>
150+
</tr>
151+
<tr>
152+
<td><span class="level-badge level-4">4</span></td>
153+
<td>Optimized</td>
154+
<td>MCP servers, custom agents, AI skills configured</td>
155+
</tr>
156+
<tr>
157+
<td><span class="level-badge level-5">5</span></td>
158+
<td>Autonomous</td>
159+
<td>Full AI-native development with minimal oversight</td>
160+
</tr>
161+
</tbody>
162+
</table>
163+
</section>
164+
165+
<!-- ===== Quick Start ===== -->
166+
<section style="margin: 64px 0;">
167+
<h2 class="section-heading">Quick Start</h2>
168+
<p style="color: var(--fgColor-muted, #7d8590); margin-bottom: 16px;">
169+
Get up and running in under a minute. Primer's <code>init</code> command
170+
analyzes your repo, generates instructions, and wires up your dev environment.
171+
</p>
172+
<div class="code-block">
173+
<button class="copy-btn">Copy</button>
174+
<pre><code><span class="comment"># Run directly — no install required</span>
175+
<span class="prompt">$ </span>npx github:pierceboggan/primer init
176+
177+
<span class="comment"># Or install globally</span>
178+
<span class="prompt">$ </span>npm install -g github:pierceboggan/primer
179+
<span class="prompt">$ </span>primer init</code></pre>
180+
</div>
181+
<p style="margin-top: 16px;">
182+
<a href="guide.html" style="color: var(--fgColor-accent, #58a6ff); text-decoration: none;">
183+
Read the full guide →
184+
</a>
185+
</p>
186+
</section>
187+
188+
<!-- ===== Who It's For ===== -->
189+
<section style="margin: 64px 0;">
190+
<h2 class="section-heading">Who It's For</h2>
191+
<div class="feature-grid" style="grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));">
192+
<div class="feature-card">
193+
<div class="feature-title">Platform Engineering Teams</div>
194+
<p class="feature-desc">
195+
Assess readiness, set baselines, and track AI adoption at scale
196+
across hundreds of repositories with batch operations and policy-driven compliance.
197+
</p>
198+
</div>
199+
<div class="feature-card">
200+
<div class="feature-title">Individual Developers</div>
201+
<p class="feature-desc">
202+
Get your AI agent to understand your repo's stack, conventions,
203+
and architecture from day one — no manual instruction authoring.
204+
</p>
205+
</div>
206+
<div class="feature-card">
207+
<div class="feature-title">Engineering Leadership</div>
208+
<p class="feature-desc">
209+
Evaluate AI readiness across portfolios with quantifiable maturity levels,
210+
visual reports, and policy-driven thresholds.
211+
</p>
212+
</div>
213+
</div>
214+
</section>
215+
</main>
216+
217+
<!-- ===== Footer ===== -->
218+
<footer class="site-footer">
219+
<div class="container-xl px-3 px-md-6 d-flex flex-justify-between flex-wrap" style="gap: 16px;">
220+
<div class="footer-links">
221+
<a href="index.html">Home</a>
222+
<a href="guide.html">Guide</a>
223+
<a href="cli.html">CLI Reference</a>
224+
<a href="extension.html">VS Code Extension</a>
225+
</div>
226+
<div class="footer-links">
227+
<a href="https://github.com/pierceboggan/primer">GitHub</a>
228+
<a href="https://github.com/pierceboggan/primer/blob/main/LICENSE">MIT License</a>
229+
</div>
230+
</div>
231+
</footer>
232+
233+
<script src="script.js"></script>
234+
</body>
235+
</html>

docs/script.js

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Theme management — restore before paint
2+
(function () {
3+
var saved = localStorage.getItem("primer-docs-theme");
4+
if (saved) {
5+
document.documentElement.setAttribute("data-color-mode", saved);
6+
}
7+
})();
8+
9+
function toggleTheme() {
10+
var html = document.documentElement;
11+
var next = html.getAttribute("data-color-mode") === "dark" ? "light" : "dark";
12+
html.setAttribute("data-color-mode", next);
13+
localStorage.setItem("primer-docs-theme", next);
14+
}
15+
16+
document.addEventListener("DOMContentLoaded", function () {
17+
// Mobile nav toggle
18+
var toggle = document.querySelector(".nav-toggle");
19+
var links = document.querySelector(".nav-links");
20+
if (toggle && links) {
21+
toggle.addEventListener("click", function () {
22+
links.classList.toggle("open");
23+
});
24+
document.addEventListener("click", function (e) {
25+
if (!toggle.contains(e.target) && !links.contains(e.target)) {
26+
links.classList.remove("open");
27+
}
28+
});
29+
}
30+
31+
// Copy buttons on code blocks
32+
document.querySelectorAll(".code-block .copy-btn").forEach(function (btn) {
33+
btn.addEventListener("click", function () {
34+
var code = btn.closest(".code-block").querySelector("code");
35+
var text = code.textContent.replace(/^\$ /gm, "");
36+
navigator.clipboard.writeText(text.trim()).then(function () {
37+
var orig = btn.textContent;
38+
btn.textContent = "Copied!";
39+
setTimeout(function () {
40+
btn.textContent = orig;
41+
}, 2000);
42+
});
43+
});
44+
});
45+
46+
// Install command copy
47+
document.querySelectorAll(".install-cmd[data-cmd]").forEach(function (el) {
48+
function copyCmd() {
49+
var cmd = el.getAttribute("data-cmd");
50+
navigator.clipboard.writeText(cmd).then(function () {
51+
var label = el.querySelector(".cmd-label");
52+
if (label) {
53+
var orig = label.textContent;
54+
label.textContent = "Copied!";
55+
setTimeout(function () {
56+
label.textContent = orig;
57+
}, 2000);
58+
}
59+
});
60+
}
61+
el.addEventListener("click", copyCmd);
62+
el.addEventListener("keydown", function (e) {
63+
if (e.key === "Enter" || e.key === " ") {
64+
e.preventDefault();
65+
copyCmd();
66+
}
67+
});
68+
});
69+
70+
// TOC scroll spy
71+
var tocLinks = document.querySelectorAll(".toc-link");
72+
if (tocLinks.length > 0) {
73+
var sections = [];
74+
tocLinks.forEach(function (link) {
75+
var id = link.getAttribute("href");
76+
if (id && id.startsWith("#")) {
77+
var section = document.getElementById(id.slice(1));
78+
if (section) sections.push({ el: section, link: link });
79+
}
80+
});
81+
82+
function updateToc() {
83+
var scrollPos = window.scrollY + 120;
84+
var active = null;
85+
for (var i = sections.length - 1; i >= 0; i--) {
86+
if (sections[i].el.offsetTop <= scrollPos) {
87+
active = sections[i].link;
88+
break;
89+
}
90+
}
91+
tocLinks.forEach(function (l) {
92+
l.classList.remove("active");
93+
});
94+
if (active) active.classList.add("active");
95+
}
96+
97+
window.addEventListener("scroll", updateToc, { passive: true });
98+
updateToc();
99+
}
100+
});

0 commit comments

Comments
 (0)