[Markdown] Tools for working with agents.
chore Add make check, install.sh, and a references note
make check runs every skill test suite and byte-compiles every Elisp file with warnings as errors. install.sh symlinks each asset into ~/.kiro and refuses to overwrite links that this repo does not own. Ignore *.elc. Explain the STE100 references directory in an Org file, because Kiro would load a Markdown file there as a steering rule.
.gitignore
@@ -5,3 +5,4 @@
5
5
*~
6
6
\#*\#
7
7
.\#*
8
Added:
*.elc
Makefile
@@ -0,0 +1,44 @@
1
Added:
# Repo-wide checks and install for agent-assets.
2
Added:
#
3
Added:
# make check Run every skill test suite and byte-compile every .el file.
4
Added:
# make test Run every skill test suite.
5
Added:
# make compile Byte-compile every .el file with warnings as errors.
6
Added:
# make install Symlink every skill and steering module into ~/.kiro.
7
Added:
# make clean Remove byte-compiled files.
8
Added:
9
Added:
EMACS ?= emacs
10
Added:
11
Added:
SKILL_DIRS := $(wildcard skills/*)
12
Added:
TEST_RUNNERS := $(wildcard skills/*/run-tests.sh)
13
Added:
EL_FILES := $(wildcard skills/*/*.el)
14
Added:
ELC_FILES := $(EL_FILES:.el=.elc)
15
Added:
16
Added:
.PHONY: check test compile install clean
17
Added:
18
Added:
check: test compile
19
Added:
20
Added:
test: $(TEST_RUNNERS)
21
Added:
@for runner in $(TEST_RUNNERS); do \
22
Added:
echo "==> $$runner"; \
23
Added:
"$$runner" || exit 1; \
24
Added:
done
25
Added:
26
Added:
# Compile each skill directory in one Emacs, with the skill directory on
27
Added:
# the load path so that cross-file requires resolve. A warning fails the
28
Added:
# build, so the sources stay warning-free.
29
Added:
compile:
30
Added:
@for dir in $(SKILL_DIRS); do \
31
Added:
files=$$(ls "$$dir"/*.el 2>/dev/null) || continue; \
32
Added:
[ -n "$$files" ] || continue; \
33
Added:
echo "==> byte-compile $$dir"; \
34
Added:
$(EMACS) --batch -Q -L "$$dir" \
35
Added:
--eval '(setq byte-compile-error-on-warn t)' \
36
Added:
-f batch-byte-compile $$files || exit 1; \
37
Added:
done
38
Added:
@$(MAKE) --no-print-directory clean
39
Added:
40
Added:
install:
41
Added:
@./install.sh
42
Added:
43
Added:
clean:
44
Added:
@rm -f $(ELC_FILES)
README.org
@@ -22,6 +22,8 @@
22
22
23
23
#+begin_example
24
24
agent-assets/
25
Added:
├── Makefile make check, make install
26
Added:
├── install.sh Symlink every asset into ~/.kiro
25
27
├── skills/
26
28
│ └── rail/ Skill — Rolling Action Item List
27
29
│ ├── SKILL.md
@@ -35,32 +37,32 @@
35
37
└── references/ ASD-STE100 PDF (supplied locally, not committed)
36
38
#+end_example
37
39
38
Removed:
* Install a skill globally
40
Added:
* Install every asset
39
41
40
Removed:
Kiro loads skills from =~/.kiro/skills/*/SKILL.md= in every project.
41
Removed:
Symlink a skill from this repo into that directory. A symlink, not a
42
Removed:
copy, so =git pull= in this repo updates every project at once.
42
Added:
Kiro loads skills from =~/.kiro/skills/*/SKILL.md= and steering from
43
Added:
=~/.kiro/steering/**/*.md= in every project. The installer symlinks each
44
Added:
asset from this repo into those directories. A symlink, not a copy, so
45
Added:
=git pull= in this repo updates every project at once.
43
46
44
47
#+begin_src sh
45
Removed:
ln -s ~/git/agent-assets/skills/rail ~/.kiro/skills/rail
48
Added:
make install
46
49
#+end_src
47
50
48
Removed:
Confirm the link:
51
Added:
The script is idempotent. Run it again after you add an asset. It never
52
Added:
overwrites a link or a directory that this repo does not own. It reports
53
Added:
such a name and exits with status 1, so you can resolve the conflict by
54
Added:
hand. Set =KIRO_HOME= to install somewhere other than =~/.kiro=.
49
55
50
Removed:
#+begin_src sh
51
Removed:
ls -l ~/.kiro/skills/rail
52
Removed:
#+end_src
53
Removed:
54
56
The global skills directory is package-managed by AIM, but AIM touches
55
57
only the skills listed in its =.aim-core-skills.json= manifest. A skill
56
58
from this repo is not in that manifest, so AIM leaves it alone.
57
59
58
Removed:
* Install a steering module globally
60
Added:
* Install one asset by hand
59
61
60
Removed:
Kiro loads steering from =~/.kiro/steering/**/*.md= in every project.
61
Removed:
Symlink a steering module the same way:
62
Added:
The installer is one =ln -s= per asset. To link one asset only:
62
63
63
64
#+begin_src sh
65
Added:
ln -s ~/git/agent-assets/skills/rail ~/.kiro/skills/rail
64
66
ln -s ~/git/agent-assets/steering/ste100 ~/.kiro/steering/ste100
65
67
#+end_src
66
68
@@ -97,9 +99,17 @@
97
99
workspace skill and a global skill of the same name both load, so remove
98
100
the global link for that project if you need only the pinned copy.
99
101
100
Removed:
* Test a skill
102
Added:
* Check the repo
101
103
102
Removed:
Each skill carries its own test runner. For RAIL:
104
Added:
One command runs every skill test suite and byte-compiles every Elisp
105
Added:
file with warnings treated as errors. Run it before each commit.
106
Added:
107
Added:
#+begin_src sh
108
Added:
make check
109
Added:
#+end_src
110
Added:
111
Added:
=make test= runs only the test suites. =make compile= runs only the byte
112
Added:
compiler. Each skill also carries its own runner. For RAIL:
103
113
104
114
#+begin_src sh
105
115
~/git/agent-assets/skills/rail/run-tests.sh
install.sh
@@ -0,0 +1,56 @@
1
Added:
#!/bin/sh
2
Added:
# Symlink every skill and steering module of this repo into ~/.kiro.
3
Added:
#
4
Added:
# The script is idempotent. A link that already points at this repo is
5
Added:
# left alone. A link that points elsewhere, or a real directory with the
6
Added:
# same name, is reported and skipped, so the script never overwrites work
7
Added:
# that this repo does not own.
8
Added:
#
9
Added:
# Usage:
10
Added:
# ./install.sh Install into ~/.kiro.
11
Added:
# KIRO_HOME=/x ./install.sh Install into /x instead.
12
Added:
#
13
Added:
# Exit status: 0 when every asset is linked, 1 when at least one was skipped.
14
Added:
15
Added:
set -eu
16
Added:
17
Added:
repo=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
18
Added:
kiro=${KIRO_HOME:-"$HOME/.kiro"}
19
Added:
status=0
20
Added:
21
Added:
link_asset() {
22
Added:
# $1: asset type directory (skills or steering)
23
Added:
# $2: asset directory inside the repo
24
Added:
type=$1
25
Added:
src=$2
26
Added:
name=$(basename -- "$src")
27
Added:
dest_dir="$kiro/$type"
28
Added:
dest="$dest_dir/$name"
29
Added:
30
Added:
mkdir -p -- "$dest_dir"
31
Added:
32
Added:
if [ -L "$dest" ]; then
33
Added:
target=$(readlink -- "$dest")
34
Added:
if [ "$target" = "$src" ]; then
35
Added:
echo "ok $dest"
36
Added:
else
37
Added:
echo "skip $dest -> $target (not this repo)" >&2
38
Added:
status=1
39
Added:
fi
40
Added:
elif [ -e "$dest" ]; then
41
Added:
echo "skip $dest exists and is not a symlink" >&2
42
Added:
status=1
43
Added:
else
44
Added:
ln -s -- "$src" "$dest"
45
Added:
echo "linked $dest"
46
Added:
fi
47
Added:
}
48
Added:
49
Added:
for type in skills steering; do
50
Added:
for src in "$repo/$type"/*/; do
51
Added:
[ -d "$src" ] || continue
52
Added:
link_asset "$type" "${src%/}"
53
Added:
done
54
Added:
done
55
Added:
56
Added:
exit "$status"
steering/ste100/references/README.org
@@ -0,0 +1,16 @@
1
Added:
#+TITLE: STE100 reference material
2
Added:
3
Added:
This directory holds the ASD-STE100 standard, which =ste100.md= cites for
4
Added:
deep lookups. The standard is a paid, copyrighted document, so the repo
5
Added:
does not commit it. The =.gitignore= in this directory keeps it out.
6
Added:
7
Added:
Place your own copy here, with this exact name:
8
Added:
9
Added:
#+begin_example
10
Added:
ASD-STE100_ISSUE9.pdf
11
Added:
#+end_example
12
Added:
13
Added:
The steering rules in =ste100.md= work without the PDF.
14
Added:
15
Added:
This file is Org, not Markdown, on purpose. Kiro loads every =*.md= file
16
Added:
under =~/.kiro/steering/= as a steering rule, and this note is not one.