Skip to content

Commit 13ee378

Browse files
Copilotwax911Copilot
authored
chore(copilot): scaffold repo instructions (#370)
* feat(copilot): add baseline chat modes, prompts, and repo-specific instructions Co-authored-by: wax911 <[email protected]> * chore: update CONTRIBUTING.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: wax911 <[email protected]> Co-authored-by: Maxwell Mapako <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent f6ce4db commit 13ee378

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
applyTo: **
3+
description: This file describes the architecture and structure of the AniTrend support-markdown library project.
4+
---
5+
6+
# Support Markdown Library Overview
7+
8+
The **support-markdown** library is an Android markdown parsing library that follows the [AniList markdown specification](https://files.kiniro.uk/anilist-flavored-markdown-v1.md) and is powered by [Markwon](https://noties.github.io/Markwon/).
9+
10+
## Project Structure
11+
12+
This is a multi-module Android library project with the following structure:
13+
14+
### Core Modules
15+
- **`:app`** - Sample application demonstrating the library usage with UI components
16+
- **`:markdown`** - Core library module containing the markdown parsing logic and utilities
17+
- **`:buildSrc`** - Build configuration and shared build logic for all modules
18+
19+
### Key Components
20+
21+
#### Markdown Module (`:markdown`)
22+
The main library module that provides:
23+
- Markdown parsing functionality using Markwon
24+
- AniList-flavored markdown support
25+
- Integration with Android UI components
26+
- Image loading support via Coil
27+
- Link handling with BetterLinkMovementMethod
28+
29+
#### App Module (`:app`)
30+
The sample application that demonstrates:
31+
- How to integrate the markdown library
32+
- Text rendering with markdown support
33+
- Image loading in markdown content
34+
- Link interaction handling
35+
36+
#### BuildSrc Module (`:buildSrc`)
37+
Contains centralized build configuration:
38+
- Gradle plugin configurations
39+
- Dependency management strategies
40+
- Android build options and configurations
41+
- Publishing setup for JitPack distribution
42+
43+
## Architecture Patterns
44+
45+
The library follows standard Android library patterns:
46+
- **Modular design** - Separation between library code and sample app
47+
- **Gradle-based build system** - Using Kotlin DSL for build configuration
48+
- **Publishing support** - Configured for JitPack distribution
49+
- **Testing support** - Unit tests and Android instrumentation tests
50+
51+
## Key Technologies
52+
53+
- **Markwon** - Core markdown rendering engine
54+
- **Coil** - Image loading for markdown images
55+
- **BetterLinkMovementMethod** - Enhanced link handling
56+
- **Android SDK** - Target platform with minimum SDK 21
57+
- **Kotlin** - Primary programming language
58+
- **Gradle** - Build system with Kotlin DSL
59+
60+
## Distribution
61+
62+
The library is distributed via JitPack, allowing easy integration:
63+
```gradle
64+
allprojects {
65+
repositories {
66+
maven { url 'https://www.jitpack.io' }
67+
}
68+
}
69+
70+
dependencies {
71+
implementation 'com.github.anitrend:support-markdown:{latest_version}'
72+
}
73+
```
74+
75+
## Documentation
76+
77+
Full API documentation is available at: https://anitrend.github.io/support-markdown/
78+
79+
## Commit Conventions
80+
81+
The project uses conventional commits with generic scopes:
82+
- `feat:` - New features
83+
- `fix:` - Bug fixes
84+
- `docs:` - Documentation changes
85+
- `style:` - Code style changes
86+
- `refactor:` - Code refactoring
87+
- `test:` - Test additions/changes
88+
- `chore:` - Build/tooling changes
89+
90+
Scopes should be kept generic and focus on the type of change rather than specific modules.

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,23 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
6363
[homepage]: http://contributor-covenant.org
6464
[version]: http://contributor-covenant.org/version/1/4/
6565

66+
## GitHub Copilot customization
67+
68+
This repository includes customizations for GitHub Copilot to improve development experience:
69+
70+
### Chat modes and prompts
71+
- **Chat modes** are available under `.github/chatmodes/` and provide specialized AI assistance for different development tasks
72+
- **Prompts** are located in `.github/prompts/` and offer reusable templates for common tasks
73+
- Use the **conventional commit prompt** (`/conventional-commit`) to generate properly formatted commit messages following our convention
74+
- When using conventional commits, keep scopes generic. For example, use scopes like `core`, `api`, or `docs` (e.g., `feat(core): ...`, `fix(api): ...`) rather than module-specific scopes such as `parser`, `markdown-renderer`, or `file-uploader` (e.g., `feat(parser): ...`). This helps keep commit history organized and easier to understand.
75+
76+
### Repository-specific instructions
77+
- Instructions under `.github/instructions/` help Copilot Chat understand the project context and architecture
78+
- These provide contextual information about the support-markdown library structure and patterns
79+
- The instructions influence Copilot responses to be more relevant to this specific codebase
80+
81+
### Documentation
82+
- Full API documentation is available at: https://anitrend.github.io/support-markdown/
83+
- Refer to the documentation when working with the library's public APIs
6684

6785
Thank you for your contribution!

0 commit comments

Comments
 (0)