@groupby/ai-dev 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupby/ai-dev",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Interactive installer for Rezolve Ai development content",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,41 @@
1
+ # Rangers Project Documentation Contract
2
+
3
+ Rangers skills expect project-specific truth to live in each project repo, not in shared skills.
4
+
5
+ ## Preferred Entrypoints
6
+
7
+ - `docs/ai/index.md` - primary AI context routing table
8
+ - `docs/ai/working-agreement.md` - non-negotiable team and workflow rules
9
+ - `docs/project/ai-context.md` - project-specific routing, priorities, and domain language
10
+ - `.github/copilot-instructions.md` - compatibility shim for GitHub Copilot
11
+
12
+ ## Common Supporting Docs
13
+
14
+ - `docs/project/architecture.md`
15
+ - `docs/project/decision-log.md`
16
+ - `docs/project/phase-plan.md`
17
+ - `docs/ai/workflow.md`
18
+ - `docs/ai/code-review-checklist.md`
19
+ - `docs/ai/component-patterns.md`
20
+ - `docs/ai/styling.md`
21
+ - `docs/ai/state-management.md`
22
+ - API or contract docs under `docs/project/` or `docs/ai/`
23
+
24
+ ## Operating Rules
25
+
26
+ - Load the router first, then follow its task-specific map.
27
+ - Load the smallest useful context set.
28
+ - Treat project docs as the intended target state unless the user says otherwise.
29
+ - Keep review artifacts, snapshots, and scratch planning notes in gitignored project scratch space such as `tmp/`.
30
+ - Update project docs when implementation changes durable architecture, workflow, API contracts, or conventions.
31
+
32
+ ## Skill-First Scaffolding Expectations
33
+
34
+ Generated project scaffolding should install Rangers skills alongside the project docs, then expose them to the LLM clients the team actually uses.
35
+
36
+ - Copy full skills to `docs/ai/skills/<skill-name>/`.
37
+ - Create lightweight skill stubs in `.github/skills/<skill-name>/SKILL.md` for Copilot when `.github/` is present.
38
+ - Create lightweight skill stubs in `.claude/skills/<skill-name>/SKILL.md` for Claude Code when `.claude/` is present.
39
+ - Preserve each skill's `name` and `description` frontmatter in client stubs so plain-text requests such as "run a code review" can trigger the right skill.
40
+ - Keep `docs/ai/index.md` as the project routing table, but have it route task types to skills first and local docs second.
41
+ - Do not require Codex-specific metadata such as `agents/openai.yaml` unless a project explicitly supports Codex users.
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: team-code-review
3
+ description: >-
4
+ Review current changes against the repository's AI routing docs, working agreement, architecture, code-review checklist, and changed files. Use for phase reviews, final branch reviews, PR readiness checks, or focused reviews where findings should be prioritized before summary.
5
+ ---
6
+
7
+ # Team Code Review
8
+
9
+ ## Purpose
10
+
11
+ Use this skill for read-first review work. The project docs define the review standard; the changed files define the review surface.
12
+
13
+ ## Review Setup
14
+
15
+ 1. Determine the diff under review:
16
+ - prefer `git diff origin/main...HEAD` for branch review
17
+ - fall back to `git diff HEAD` for unstaged or local-only changes
18
+ - use a user-specified base if provided
19
+ 2. Load the project router:
20
+ - `docs/ai/index.md`
21
+ - `.github/copilot-instructions.md`
22
+ - `docs/project/ai-context.md`
23
+ - `docs/ai/resources/project-doc-contract.md`, if no project router exists
24
+ 3. Load review-specific docs:
25
+ - working agreement
26
+ - workflow
27
+ - code review checklist
28
+ - architecture or task-specific docs named by the router
29
+ 4. Inspect changed files and nearby code before writing findings.
30
+
31
+ ## Review Standards
32
+
33
+ Prioritize defects and regressions over style. Check:
34
+
35
+ - correctness and user-visible behavior
36
+ - architecture and documented conventions
37
+ - security, permissions, and sensitive data handling
38
+ - error handling and failure states
39
+ - performance and lifecycle cleanup
40
+ - accessibility for UI work
41
+ - test coverage and validation gaps
42
+ - docs drift caused by the change
43
+
44
+ If the code contradicts project docs, treat that as a finding unless the change deliberately updates the documented target state.
45
+
46
+ ## Output
47
+
48
+ Lead with findings ordered by severity. Include tight file and line references when possible.
49
+
50
+ Use this shape:
51
+
52
+ ```markdown
53
+ ## Findings
54
+ - [P1/P2/P3] file:line - Issue and impact.
55
+
56
+ ## Open Questions
57
+ - [Question]
58
+
59
+ ## Summary
60
+ [Brief assessment]
61
+
62
+ ## Validation Gaps
63
+ - [Gap]
64
+ ```
65
+
66
+ If the project workflow requires a review artifact, write it to the documented scratch location, commonly `tmp/review-phase-XX.md` or `tmp/review-final.md`.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: team-development
3
+ description: >-
4
+ Guide normal implementation work by loading a project's AI router, working agreement, architecture docs, and task-specific docs before editing. Use for feature work, bug fixes, refactors, UI changes, API integration, and documentation updates in repos that expose project-owned AI context.
5
+ ---
6
+
7
+ # Team Development
8
+
9
+ ## Purpose
10
+
11
+ Use this skill as the default implementation workflow for Rangers projects. It keeps shared process in the skill and project truth in the project docs.
12
+
13
+ ## Context Loading
14
+
15
+ 1. Read the project router first:
16
+ - prefer `docs/ai/index.md`
17
+ - also check `.github/copilot-instructions.md`
18
+ - use `docs/project/ai-context.md` for project-specific priorities
19
+ - use `docs/ai/resources/project-doc-contract.md` as a fallback contract if no project router exists
20
+ 2. Always load the working agreement if present.
21
+ 3. Load only task-relevant docs from the router. Common routes:
22
+ - UI/components: component patterns, styling, frontend scope
23
+ - API/data/state: API contract, state management, architecture
24
+ - architecture decisions: architecture docs and decision log
25
+ - phase work: workflow, phase plan, review checklist
26
+ 4. If the task requires comparing or migrating many docs, use `team-docs-snapshot`.
27
+
28
+ ## Implementation Flow
29
+
30
+ 1. Check git status and current branch.
31
+ 2. Inspect the relevant files before editing.
32
+ 3. Make a short working plan when the change spans multiple files or behaviors.
33
+ 4. Edit narrowly and follow established local patterns.
34
+ 5. Update project docs when the implementation changes architecture, workflow, API contracts, or durable conventions.
35
+ 6. Run the smallest meaningful validation for the changed surface.
36
+ 7. Summarize changed files, validation, and any remaining risks.
37
+
38
+ ## Rules
39
+
40
+ - Let project docs define the target state. If code and docs disagree, flag the mismatch or update docs as part of the work.
41
+ - Do not load every doc by default.
42
+ - Do not turn project-specific facts into shared skill instructions.
43
+ - Keep scratch notes and reviews in the location the project workflow specifies, commonly `tmp/`.
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: team-docs-snapshot
3
+ description: >-
4
+ Collect AI/project documentation from a repository into a temporary review folder. Use when documentation needs to be pulled together for orientation, planning, review, migration, or skill-authoring analysis without loading every source file into the active context.
5
+ ---
6
+
7
+ # Team Docs Snapshot
8
+
9
+ ## Purpose
10
+
11
+ Use this skill to gather a project's AI-facing documentation into a disposable snapshot. Prefer it when the task is about understanding or migrating docs, comparing routing systems, reviewing documentation drift, or preparing a compact handoff for another session.
12
+
13
+ ## Workflow
14
+
15
+ 1. Identify the target repository root.
16
+ 2. Check for a project routing contract before collecting files:
17
+ - `docs/ai/index.md`
18
+ - `docs/project/ai-context.md`
19
+ - `.github/copilot-instructions.md`
20
+ - `AGENTS.md`
21
+ 3. Run the bundled collector from the project root or pass `--root` explicitly:
22
+
23
+ ```sh
24
+ python3 docs/ai/skills/team-docs-snapshot/scripts/collect_project_docs.py --root .
25
+ ```
26
+
27
+ If the skill is being used from the shared repo source instead of an installed project copy, run the script from this skill folder:
28
+
29
+ ```sh
30
+ python3 teams/rangers/skills/team-docs-snapshot/scripts/collect_project_docs.py --root /path/to/project
31
+ ```
32
+
33
+ 4. Read the generated `MANIFEST.md` first. Use it to decide which copied docs to load next.
34
+ 5. Treat the snapshot as scratch material. Do not commit it unless the user explicitly asks.
35
+
36
+ ## Collector Options
37
+
38
+ - `--out <dir>` writes to a specific snapshot directory.
39
+ - `--include <glob>` adds extra files. Repeat it for multiple patterns.
40
+ - `--exclude <glob>` removes files from the default or included matches.
41
+ - `--combined` also writes `COMBINED.md` for tools that need one linear document.
42
+
43
+ Default collection includes common project guidance docs:
44
+
45
+ - `docs/ai/**/*.md`
46
+ - `docs/project/**/*.md`
47
+ - `.github/copilot-instructions.md`
48
+ - `AGENTS.md`
49
+ - `README.md`
50
+
51
+ ## Output Expectations
52
+
53
+ When reporting back, include only:
54
+
55
+ - snapshot directory
56
+ - number of files collected
57
+ - notable missing entrypoints
58
+ - recommended docs to read next
@@ -0,0 +1,166 @@
1
+ #!/usr/bin/env python3
2
+ """Collect project AI/documentation files into a temporary snapshot directory."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import fnmatch
8
+ import shutil
9
+ from datetime import datetime
10
+ from pathlib import Path
11
+
12
+
13
+ DEFAULT_PATTERNS = [
14
+ "docs/ai/**/*.md",
15
+ "docs/project/**/*.md",
16
+ ".github/copilot-instructions.md",
17
+ "AGENTS.md",
18
+ "README.md",
19
+ ]
20
+
21
+ DEFAULT_EXCLUDES = [
22
+ ".git/**",
23
+ "node_modules/**",
24
+ "tmp/**",
25
+ "dist/**",
26
+ "build/**",
27
+ ]
28
+
29
+
30
+ def parse_args() -> argparse.Namespace:
31
+ parser = argparse.ArgumentParser(
32
+ description="Copy project AI-facing docs into a temporary review snapshot.",
33
+ )
34
+ parser.add_argument(
35
+ "--root",
36
+ default=".",
37
+ help="Project root to scan. Defaults to the current directory.",
38
+ )
39
+ parser.add_argument(
40
+ "--out",
41
+ help="Snapshot output directory. Defaults to <root>/tmp/ai-docs-snapshot-<timestamp>.",
42
+ )
43
+ parser.add_argument(
44
+ "--include",
45
+ action="append",
46
+ default=[],
47
+ help="Additional glob to include. Can be repeated.",
48
+ )
49
+ parser.add_argument(
50
+ "--exclude",
51
+ action="append",
52
+ default=[],
53
+ help="Glob to exclude from copied results. Can be repeated.",
54
+ )
55
+ parser.add_argument(
56
+ "--combined",
57
+ action="store_true",
58
+ help="Also write COMBINED.md with all copied docs in one file.",
59
+ )
60
+ return parser.parse_args()
61
+
62
+
63
+ def is_excluded(relative_path: str, patterns: list[str]) -> bool:
64
+ return any(fnmatch.fnmatch(relative_path, pattern) for pattern in patterns)
65
+
66
+
67
+ def collect_matches(root: Path, includes: list[str], excludes: list[str]) -> list[Path]:
68
+ matches: set[Path] = set()
69
+ for pattern in includes:
70
+ for match in root.glob(pattern):
71
+ if match.is_file():
72
+ matches.add(match.resolve())
73
+
74
+ root_resolved = root.resolve()
75
+ filtered: list[Path] = []
76
+ for match in matches:
77
+ try:
78
+ relative = match.relative_to(root_resolved).as_posix()
79
+ except ValueError:
80
+ continue
81
+ if not is_excluded(relative, excludes):
82
+ filtered.append(match)
83
+
84
+ return sorted(filtered, key=lambda path: path.relative_to(root_resolved).as_posix())
85
+
86
+
87
+ def write_manifest(root: Path, out_dir: Path, files: list[Path], missing: list[str]) -> None:
88
+ lines = [
89
+ "# Project Docs Snapshot",
90
+ "",
91
+ f"Source root: `{root}`",
92
+ f"Generated: `{datetime.now().isoformat(timespec='seconds')}`",
93
+ f"Files collected: {len(files)}",
94
+ "",
95
+ "## Files",
96
+ "",
97
+ ]
98
+ for file_path in files:
99
+ relative = file_path.relative_to(root).as_posix()
100
+ lines.append(f"- `{relative}`")
101
+
102
+ if missing:
103
+ lines.extend(["", "## Missing Common Entrypoints", ""])
104
+ for pattern in missing:
105
+ lines.append(f"- `{pattern}`")
106
+
107
+ out_dir.joinpath("MANIFEST.md").write_text("\n".join(lines) + "\n", encoding="utf-8")
108
+
109
+
110
+ def write_combined(root: Path, out_dir: Path, files: list[Path]) -> None:
111
+ sections: list[str] = ["# Combined Project Docs", ""]
112
+ for file_path in files:
113
+ relative = file_path.relative_to(root).as_posix()
114
+ sections.extend([f"## {relative}", ""])
115
+ try:
116
+ sections.append(file_path.read_text(encoding="utf-8"))
117
+ except UnicodeDecodeError:
118
+ sections.append("[Skipped: file is not UTF-8 text]")
119
+ sections.append("")
120
+ out_dir.joinpath("COMBINED.md").write_text("\n".join(sections), encoding="utf-8")
121
+
122
+
123
+ def main() -> int:
124
+ args = parse_args()
125
+ root = Path(args.root).expanduser().resolve()
126
+ if not root.is_dir():
127
+ raise SystemExit(f"Project root does not exist or is not a directory: {root}")
128
+
129
+ timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
130
+ out_dir = (
131
+ Path(args.out).expanduser().resolve()
132
+ if args.out
133
+ else root / "tmp" / f"ai-docs-snapshot-{timestamp}"
134
+ )
135
+ out_dir.mkdir(parents=True, exist_ok=False)
136
+
137
+ includes = DEFAULT_PATTERNS + args.include
138
+ excludes = DEFAULT_EXCLUDES + args.exclude
139
+ files = collect_matches(root, includes, excludes)
140
+
141
+ missing = []
142
+ for pattern in DEFAULT_PATTERNS:
143
+ if not any(root.glob(pattern)):
144
+ missing.append(pattern)
145
+
146
+ for file_path in files:
147
+ relative = file_path.relative_to(root)
148
+ destination = out_dir / relative
149
+ destination.parent.mkdir(parents=True, exist_ok=True)
150
+ shutil.copy2(file_path, destination)
151
+
152
+ write_manifest(root, out_dir, files, missing)
153
+ if args.combined:
154
+ write_combined(root, out_dir, files)
155
+
156
+ print(f"Snapshot: {out_dir}")
157
+ print(f"Files collected: {len(files)}")
158
+ if missing:
159
+ print("Missing common entrypoints:")
160
+ for pattern in missing:
161
+ print(f"- {pattern}")
162
+ return 0
163
+
164
+
165
+ if __name__ == "__main__":
166
+ raise SystemExit(main())
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: team-phase-planning
3
+ description: >-
4
+ Break project work into reviewable phases using the repo's routing docs, workflow, phase plan, architecture, and decision log. Use when planning a feature slice, sequencing Jira tickets, defining review gates, or turning broad work into implementable phases.
5
+ ---
6
+
7
+ # Team Phase Planning
8
+
9
+ ## Purpose
10
+
11
+ Use this skill to convert broad work into small phases that can be implemented, validated, and reviewed independently.
12
+
13
+ ## Context Loading
14
+
15
+ 1. Read the project router:
16
+ - `docs/ai/index.md`
17
+ - `docs/project/ai-context.md`
18
+ - `.github/copilot-instructions.md`, if present
19
+ - `docs/ai/resources/project-doc-contract.md`, if no project router exists
20
+ 2. Read the working agreement and workflow docs.
21
+ 3. Load task-specific planning docs:
22
+ - phase plan
23
+ - decision log
24
+ - architecture docs
25
+ - API or frontend scope docs when the work touches those surfaces
26
+ 4. For large or unfamiliar doc sets, use `team-docs-snapshot` and read its manifest first.
27
+
28
+ ## Planning Flow
29
+
30
+ 1. State the goal and non-goals.
31
+ 2. Identify dependencies, unknowns, and project constraints.
32
+ 3. Split the work into phases that each have:
33
+ - user-visible or reviewable scope
34
+ - files or areas likely to change
35
+ - validation plan
36
+ - review gate
37
+ - docs that may need updates
38
+ 4. Put risky discovery early.
39
+ 5. Keep phases small enough that a reviewer can understand the diff without reconstructing the entire project.
40
+
41
+ ## Output Format
42
+
43
+ Use this shape unless the user asks otherwise:
44
+
45
+ ```markdown
46
+ # Plan: [Work Name]
47
+
48
+ ## Goal
49
+ [One paragraph]
50
+
51
+ ## Assumptions
52
+ - [Assumption]
53
+
54
+ ## Phases
55
+ ### Phase 1: [Name]
56
+ Scope:
57
+ Validation:
58
+ Review gate:
59
+ Docs impact:
60
+
61
+ ## Open Questions
62
+ - [Question]
63
+ ```
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: team-project-orientation
3
+ description: >-
4
+ Orient to an unfamiliar repository through its AI routing docs, project docs, README, architecture notes, and working agreement. Use when entering a repo, moving a task into a new chat, preparing implementation, or auditing whether the project exposes enough context for AI-assisted work.
5
+ ---
6
+
7
+ # Team Project Orientation
8
+
9
+ ## Purpose
10
+
11
+ Use this skill to build a small, accurate mental model of a project without reading the whole repo. The goal is to find the project's own context router, then load the smallest useful set of docs.
12
+
13
+ ## Orientation Flow
14
+
15
+ 1. Inspect the repo shape:
16
+ - `README.md`
17
+ - `AGENTS.md`
18
+ - package or workspace manifests
19
+ - top-level app, package, and docs folders
20
+ 2. Locate the AI/project routing entrypoints, in this order:
21
+ - `docs/ai/index.md`
22
+ - `.github/copilot-instructions.md`
23
+ - `docs/project/ai-context.md`
24
+ - `docs/ai/working-agreement.md`
25
+ - `docs/ai/resources/project-doc-contract.md`, if this team resource is installed
26
+ 3. If a routing table exists, follow it. Always prefer its task-specific guidance over generic assumptions.
27
+ 4. If no router exists, infer a temporary route from common docs:
28
+ - architecture: `docs/**/architecture*.md`
29
+ - product/context: `docs/**/product*.md`, `docs/**/overview*.md`
30
+ - decisions: `docs/**/decision*.md`, `docs/**/adr*.md`
31
+ - workflow: `docs/**/workflow*.md`, `docs/**/phase*.md`
32
+ - contracts: `docs/**/*contract*.md`, `docs/**/*api*.md`
33
+ 5. For broad documentation analysis, use `team-docs-snapshot` before loading many files.
34
+
35
+ ## Orientation Notes
36
+
37
+ Keep the output concise and project-owned:
38
+
39
+ - purpose and product/domain
40
+ - main apps/packages and how they fit together
41
+ - tech stack and validation commands, when documented
42
+ - AI routing map and any missing entrypoints
43
+ - implementation rules that look non-negotiable
44
+ - risks or ambiguities to resolve before coding
45
+
46
+ Do not copy project knowledge into a reusable skill. Project facts belong in that repo's docs.