Skip to content

Commit 4523df9

Browse files
committed
chore: add agents instructions
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent a5e74e9 commit 4523df9

File tree

3 files changed

+118
-43
lines changed

3 files changed

+118
-43
lines changed

AGENTS.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# AGENTS.md — agent instructions and operational contract
2+
3+
This file is written for automated coding agents (for example: Copilot coding agents). It exists to provide a concise operational contract and guardrails for agents working in this repository. It is not the canonical source for design or style rules. Those live in the developer documentation linked below.
4+
5+
## Organization-wide guidelines
6+
7+
(required)
8+
9+
- Follow the prioritized shared instructions in [hoverkraft-tech/.github/AGENTS.md](https://github.com/hoverkraft-tech/.github/blob/main/AGENTS.md) before making any change.
10+
- Apply the global engineering guidelines from `ACCESSIBILITY.md`, `CONTRIBUTING.md`, and other root-level guides when modifying UI, documentation, or build tooling.
11+
12+
## Quick Start
13+
14+
This repository contains the Hoverkraft-branded Docusaurus theme and its documentation site. Review these entry points before coding:
15+
16+
- **[Overview](README.md#overview)** — Theme purpose, supported use cases, and positioning within the Hoverkraft design system.
17+
- **[Feature Highlights](README.md#feature-highlights)** — Canonical list of enforced branding capabilities.
18+
- **[Documentation](README.md#documentation)** — Location of end user docs and how they are published.
19+
- **[Development](README.md#development)** — Required toolchain, workspace workflow, lint/test commands, and release expectations.
20+
- **[Contributing](CONTRIBUTING.md)** — Accessibility-first contribution guidelines and review expectations.
21+
22+
## Agent-Specific Development Patterns
23+
24+
### Critical Workflow Knowledge
25+
26+
```bash
27+
npm install # Install workspace dependencies
28+
npm run build --workspaces # Build the theme and docs packages
29+
npm run lint --workspaces # Run linting across all workspaces
30+
npm run test --workspaces # Execute unit tests (ts-jest)
31+
npm run start --workspace=@hoverkraft/hoverkraft-theme-docs # Launch docs for local QA
32+
```
33+
34+
- Prefer `npm` for workspace orchestration. Only switch toolchains when the user explicitly requests it.
35+
- Run `npm run build --workspaces` before submitting changes that impact published assets.
36+
37+
### Code Quality Expectations
38+
39+
- Maintain strict TypeScript types by updating `packages/theme/src` and generated declarations together.
40+
- Keep UI/UX changes accessible: audit color contrast, focus management, and screen reader semantics in tandem (see `ACCESSIBILITY.md`).
41+
- Validate configuration updates with existing tests in `packages/theme/src/__tests__`. Add new Arrange-Act-Assert unit tests for public APIs.
42+
- Do not bypass linting or formatting rules; they are enforced via `eslint.config.mjs`, Prettier, and `ts-dev-tools` presets.
43+
44+
### Documentation Updates
45+
46+
- Mirror any theme changes in `packages/docs/content` and `packages/docs/src` when user-facing behavior changes.
47+
- Update `README.md` and relevant guide pages if interfaces, commands, or outputs change.
48+
- Keep version bumps and changelog notes aligned with the release process defined in `README.md#releasing` once present.

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ email, or any other method with the owners of this repository before making a ch
55

66
Please note we have a code of conduct, please follow it in all your interactions with the project.
77

8+
## Development Guidelines
9+
10+
- Make accessibility a first-class concern for every change to the theme. Audit color contrast, focus management, ARIA semantics, keyboard navigation, and screen reader behavior for new or updated components.
11+
- Validate each contribution in both light and dark modes. Ensure accessible color palettes, imagery, and interactive states meet WCAG AA standards regardless of the active color scheme.
12+
813
## Pull Request Process
914

1015
1. Ensure any install or build dependencies are removed before the end of the layer when doing a

README.md

Lines changed: 65 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,96 @@
1-
# @hoverkraft/docusaurus-theme
1+
<div align="center">
2+
<h1>@hoverkraft/docusaurus-theme</h1>
3+
<p>Strictly opinionated Docusaurus theme that enforces Hoverkraft branding and accessibility standards.</p>
4+
</div>
25

3-
A strictly opinionated Docusaurus theme that enforces Hoverkraft branding guidelines for all Hoverkraft documentation projects.
6+
---
7+
8+
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)
9+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
10+
11+
## Overview
12+
13+
`@hoverkraft/docusaurus-theme` delivers a production-ready Hoverkraft-branded experience for every Docusaurus documentation project. The theme removes customization levers so that every property stays synchronized with the official Hoverkraft design system, accessibility bar, and editorial tone.
14+
15+
## Feature Highlights
16+
17+
- **Enforced branding**: Colors, typography, spacing, and component styling sourced from the [Hoverkraft Branding Guidelines](https://github.com/hoverkraft-tech/branding).
18+
- **Accessibility-first**: Built to meet WCAG 2.1 Level AA, with detailed practices captured in `ACCESSIBILITY.md`.
19+
- **Responsive layout**: Mobile-first breakpoints and fluid components covering desktop, tablet, and handset experiences.
20+
- **Shared components**: Header, footer, hero, feature grid, buttons, and layout primitives with consistent semantics.
21+
- **Print-friendly defaults**: Print styles remove noise while preserving content hierarchy.
22+
23+
## Documentation
24+
25+
- Public docs site content lives in `packages/docs` and is sourced from `packages/docs/content`.
26+
- Generated static output is emitted to `packages/docs/build` during CI and local testing.
27+
- Component usage and configuration examples are organized under `packages/docs/content/components` and `packages/docs/content/configuration`.
28+
29+
## Packages
30+
31+
| Package | Description |
32+
| ---------------- | ------------------------------------------------------------------------------------------------- |
33+
| `packages/theme` | Source for the published `@hoverkraft/docusaurus-theme` package (TypeScript, compiled to `lib/`). |
34+
| `packages/docs` | Docusaurus site showcasing the theme, used for QA and documentation. |
435

536
## Installation
637

738
```bash
839
npm install @hoverkraft/docusaurus-theme
9-
# or
10-
yarn add @hoverkraft/docusaurus-theme
1140
```
1241

13-
## Usage
14-
15-
Add the theme to your Docusaurus configuration file (`docusaurus.config.js`):
42+
Add the theme to your Docusaurus configuration:
1643

1744
```javascript
45+
// docusaurus.config.js
1846
module.exports = {
19-
// ... other config
47+
// ...other config
2048
themes: ["@hoverkraft/docusaurus-theme"],
21-
// No additional configuration required - theme enforces Hoverkraft branding
2249
};
2350
```
2451

25-
## Strict Branding Enforcement
52+
The theme is opinionated by design and intentionally exposes no customization knobs.
2653

27-
This theme is **opinionated by design** and enforces the official Hoverkraft branding guidelines:
28-
29-
- **Official Hoverkraft Branding**: Colors, typography, and design elements from the [Hoverkraft Branding Guidelines](https://github.com/hoverkraft-tech/branding)
30-
- **Fixed Implementation**: No customization options to ensure brand consistency
31-
- **Consistent Layout**: Standardized header, footer, and content structure
54+
## Development
3255

33-
**No customization options are provided.** This ensures brand consistency across all Hoverkraft documentation projects.
56+
Use npm workspaces to manage both packages in the monorepo:
3457

35-
For detailed branding specifications, color palettes, typography guidelines, and design principles, see the official [Hoverkraft Branding Repository](https://github.com/hoverkraft-tech/branding).
58+
```bash
59+
npm install # Install workspace dependencies
60+
npm run lint --workspaces # Run ESLint across packages
61+
npm run build --workspaces # Build theme and docs outputs
62+
npm run start --workspace=@hoverkraft/hoverkraft-theme-docs # Launch the docs site
63+
```
3664

37-
## Features
65+
- Run builds before publishing or submitting pull requests to ensure `packages/theme/lib` is up to date.
66+
- Accessibility changes must be mirrored in documentation updates; see `ACCESSIBILITY.md` for the audit checklist.
3867

39-
This theme provides:
68+
## Testing
4069

41-
- **Enforced Hoverkraft Branding**: Official color palette, typography, and layout
42-
- **Responsive Design**: Mobile-first responsive layout
43-
- **Professional Components**: Standardized header, footer, and page structure
44-
- **Accessibility**: Built with accessibility best practices
45-
- **Print-friendly**: Optimized print styles
70+
```bash
71+
npm run test --workspaces # Execute ts-jest suites
72+
npm run test:ci --workspaces # Serial test run for CI environments
73+
npm run lint --workspaces # Linting serves as static analysis guardrail
74+
```
4675

47-
## Development
76+
- Theme unit tests are located in `packages/theme/src/__tests__`.
77+
- The docs site can be smoke-tested locally with `npm run start --workspace=@hoverkraft/hoverkraft-theme-docs`.
4878

49-
To contribute to this theme:
79+
## Releasing
5080

51-
1. Clone the repository
52-
2. Install dependencies: `pnpm install`
53-
3. Build the theme: `pnpm --filter @hoverkraft/docusaurus-theme run build`
54-
4. Test your changes locally (optional): `pnpm --filter hoverkraft-theme-docs run start`
81+
1. Update semantic versioning in `packages/theme/package.json`.
82+
2. Regenerate `packages/theme/lib` via `npm run build --workspaces`.
83+
3. Validate docs output with `npm run build --workspace=@hoverkraft/hoverkraft-theme-docs` when content changes.
84+
4. Publish the theme package via your chosen registry workflow (GitHub Actions or manual `npm publish`).
5585

56-
### Building
86+
## Contributing
5787

58-
```bash
59-
pnpm run build
60-
```
88+
Please review [`CONTRIBUTING.md`](CONTRIBUTING.md) for accessibility requirements, review expectations, and code of conduct.
6189

62-
### Watch mode for development
90+
## Support
6391

64-
```bash
65-
pnpm --filter @hoverkraft/docusaurus-theme run build:watch
66-
```
92+
Questions or issues? Open an issue in the [GitHub repository](https://github.com/hoverkraft-tech/docusaurus-theme) or start a discussion.
6793

6894
## License
6995

70-
MIT License - see [LICENSE](./LICENSE) for details.
71-
72-
## Support
73-
74-
For issues and questions, please open an issue in the [GitHub repository](https://github.com/hoverkraft-tech/docusaurus-theme).
96+
MIT License — see [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)