Skip to content

Commit d07435d

Browse files
CopilotHexagon
andauthored
Add Copilot workspace setup and agent documentation (#287)
* Add copilot setup steps workflow file Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com> * Add AGENTS.md with project structure and contribution guidelines Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com> * Update AGENTS.md with complete test file listing Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Hexagon <419737+Hexagon@users.noreply.github.com>
1 parent e46b780 commit d07435d

2 files changed

Lines changed: 129 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
23+
contents: read
24+
25+
# You can define any steps you want, and they will run before the agent starts.
26+
# If you do not check out your code, Copilot will do this for you.
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v5
30+
31+
- name: Setup Deno
32+
uses: denoland/setup-deno@v2
33+
with:
34+
deno-version: v2.x
35+
cache: true
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: "lts/*"
41+
42+
- name: Setup Bun
43+
uses: oven-sh/setup-bun@v2
44+
with:
45+
bun-version: latest
46+
47+
- name: Cache dependencies
48+
run: deno install

AGENTS.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Croner - Agent Guide
2+
3+
## Project Overview
4+
5+
Croner is a lightweight, zero-dependency cron library for JavaScript and TypeScript that works across Node.js, Deno, Bun, and browsers.
6+
7+
## Project Structure
8+
9+
```
10+
croner/
11+
├── src/ # Source code
12+
│ ├── croner.ts # Main entry point
13+
│ ├── pattern.ts # Cron pattern parser
14+
│ ├── date.ts # Date handling utilities
15+
│ ├── options.ts # Configuration options
16+
│ └── helpers/ # Helper utilities
17+
├── test/ # Test files
18+
│ ├── croner.test.ts
19+
│ ├── pattern.test.ts
20+
│ ├── options.test.ts
21+
│ ├── range.test.ts
22+
│ ├── stepping.test.ts
23+
│ └── timezone.test.ts
24+
├── build/ # Build scripts
25+
├── docs/ # Documentation
26+
└── deno.json # Deno configuration and tasks
27+
```
28+
29+
## Standards Compliance
30+
31+
This project aims to follow the **OCPS (Open Cron Pattern Standard)** drafts available at [github.com/open-source-cron/ocps](https://github.com/open-source-cron/ocps).
32+
33+
## Development Environment
34+
35+
The project uses **Deno** as the primary development runtime, with cross-runtime support for Node.js and Bun.
36+
37+
### Setup
38+
```bash
39+
# Install Deno dependencies
40+
deno install
41+
```
42+
43+
## Contribution Guidelines
44+
45+
### Pre-commit Checks
46+
47+
Before committing changes, always run:
48+
```bash
49+
deno task pre-commit
50+
```
51+
52+
This executes:
53+
- **Formatting check**: `deno fmt --check` - ensures code follows style guidelines
54+
- **Linting**: `deno lint` - checks for code quality issues
55+
- **Type checking**: `deno check src/croner.ts` - validates TypeScript types
56+
57+
### Testing
58+
59+
Run tests during development:
60+
```bash
61+
deno task test
62+
```
63+
64+
### Full Build
65+
66+
Before submitting a PR, run the full build to ensure all checks pass:
67+
```bash
68+
deno task build
69+
```
70+
71+
This runs all tests, builds distribution files, and validates the entire codebase.
72+
73+
### Key Points
74+
75+
- Base work on the `dev` branch
76+
- Add test cases for all changes
77+
- Zero dependencies - do not add external dependencies
78+
- Follow existing code style and patterns
79+
- Update documentation if changing public APIs
80+
81+
For detailed contribution guidelines, see [docs/src/contributing.md](docs/src/contributing.md).

0 commit comments

Comments
 (0)