Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .rhiza/agentic/Makefile.agentic
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
## Makefile.customisations - User-defined scripts and overrides
## Makefile.agentic - User-defined scripts and overrides for agentic workflows
# This file is included by the main Makefile

# Declare phony targets
.PHONY: install-copilot analyse-repo summarize-changes
.PHONY: install-copilot analyse-repo summarize-changes copilot

# Copilot binary location - check global first, fall back to local bin
COPILOT_BIN ?= $(shell command -v copilot 2>/dev/null || echo ${INSTALL_DIR}/copilot)

##@ Agentic Workflows

copilot: install-copilot ## open interactive prompt for copilot
@${INSTALL_DIR}/copilot --model "${DEFAULT_AI_MODEL}"
@${COPILOT_BIN} --model "${DEFAULT_AI_MODEL}"

analyse-repo: install-copilot ## run the analyser agent to update REPOSITORY_ANALYSIS.md
@${INSTALL_DIR}/copilot --agent analyser \
@${COPILOT_BIN} --agent analyser \
--model "${DEFAULT_AI_MODEL}" \
--prompt "Analyze the repository and update the journal." \
--allow-tool 'write' --deny-tool 'remove' \
--allow-all-paths

summarize-changes: install-copilot ## summarize changes since the most recent release/tag
@${INSTALL_DIR}/copilot -p "Show me the commits since the last release/tag and summarize them" --allow-tool 'shell(git)' --model "${DEFAULT_AI_MODEL}" --agent summarise
@${COPILOT_BIN} -p "Show me the commits since the last release/tag and summarize them" --allow-tool 'shell(git)' --model "${DEFAULT_AI_MODEL}" --agent summarise

install-copilot: ## checks for copilot and prompts to install
@if [ -x "${INSTALL_DIR}/copilot" ]; then \
install-copilot: ## ensure copilot CLI is installed
@mkdir -p "${INSTALL_DIR}"
@if command -v copilot >/dev/null 2>&1; then \
printf "${GREEN}[INFO] GitHub Copilot CLI is installed globally.${RESET}\n"; \
elif [ -x "${INSTALL_DIR}/copilot" ]; then \
printf "${GREEN}[INFO] GitHub Copilot CLI is already installed in ${INSTALL_DIR}.${RESET}\n"; \
else \
printf "${YELLOW}[WARN] GitHub Copilot CLI not found in ${INSTALL_DIR}.${RESET}\n"; \
printf "${BLUE}Do you want to install GitHub Copilot CLI? [y/N] ${RESET}"; \
printf "${YELLOW}[WARN] GitHub Copilot CLI not found.${RESET}\n"; \
printf "${BLUE}Do you want to install GitHub Copilot CLI to ${INSTALL_DIR}? [y/N] ${RESET}"; \
read -r response; \
if [ "$$response" = "y" ] || [ "$$response" = "Y" ]; then \
printf "${BLUE}[INFO] Installing GitHub Copilot CLI to ${INSTALL_DIR}...${RESET}\n"; \
mkdir -p "${INSTALL_DIR}"; \
if curl -fsSL https://gh.io/copilot-install | PREFIX="." bash; then \
printf "${GREEN}[INFO] GitHub Copilot CLI installed successfully.${RESET}\n"; \
else \
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Documentation
book compile the companion book

Presentation
install-marp ensure marp CLI is installed
presentation generate presentation slides from PRESENTATION.md using Marp
presentation-pdf generate PDF presentation from PRESENTATION.md using Marp
presentation-serve serve presentation interactively with Marp
Expand All @@ -139,7 +140,7 @@ Agentic Workflows
copilot open interactive prompt for copilot
analyse-repo run the analyser agent to update REPOSITORY_ANALYSIS.md
summarize-changes summarize changes since the most recent release/tag
install-copilot checks for copilot and prompts to install
install-copilot ensure copilot CLI is installed

Rhiza Workflows
sync sync with template repository as defined in .rhiza/template.yml
Expand Down
68 changes: 22 additions & 46 deletions presentation/Makefile.presentation
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,45 @@
# This file is included by the main Makefile

# Declare phony targets (they don't produce files)
.PHONY: presentation presentation-pdf presentation-serve
.PHONY: presentation presentation-pdf presentation-serve install-marp

# Marp binary location - check global first, fall back to local bin
MARP_BIN ?= $(shell command -v marp 2>/dev/null || echo ${INSTALL_DIR}/node_modules/.bin/marp)

##@ Presentation
presentation:: ## generate presentation slides from PRESENTATION.md using Marp
@printf "${BLUE}[INFO] Checking for Marp CLI...${RESET}\n"
@if ! command -v marp >/dev/null 2>&1; then \
install-marp: ## ensure marp CLI is installed
@mkdir -p ${INSTALL_DIR}
@if command -v marp >/dev/null 2>&1; then \
printf "${GREEN}[INFO] Marp CLI is installed globally.${RESET}\n"; \
elif [ -x "${INSTALL_DIR}/node_modules/.bin/marp" ]; then \
printf "${GREEN}[INFO] Marp CLI is already installed in ${INSTALL_DIR}.${RESET}\n"; \
else \
if command -v npm >/dev/null 2>&1; then \
printf "${YELLOW}[WARN] Marp CLI not found. Installing with npm...${RESET}\n"; \
npm install -g @marp-team/marp-cli || { \
printf "${RED}[ERROR] Failed to install Marp CLI. Please install manually:${RESET}\n"; \
printf "${BLUE} npm install -g @marp-team/marp-cli${RESET}\n"; \
printf "${BLUE}[INFO] Installing Marp CLI to ${INSTALL_DIR}...${RESET}\n"; \
npm install --prefix "${INSTALL_DIR}" @marp-team/marp-cli || { \
printf "${RED}[ERROR] Failed to install Marp CLI.${RESET}\n"; \
exit 1; \
}; \
printf "${GREEN}[INFO] Marp CLI installed successfully to ${INSTALL_DIR}.${RESET}\n"; \
else \
printf "${RED}[ERROR] npm not found. Please install Node.js and npm first.${RESET}\n"; \
printf "${BLUE} See: https://nodejs.org/${RESET}\n"; \
printf "${BLUE} Then run: npm install -g @marp-team/marp-cli${RESET}\n"; \
exit 1; \
fi; \
fi

presentation:: install-marp ## generate presentation slides from PRESENTATION.md using Marp
@printf "${BLUE}[INFO] Generating HTML presentation...${RESET}\n"
@marp PRESENTATION.md -o presentation.html
@${MARP_BIN} PRESENTATION.md -o presentation.html
@printf "${GREEN}[SUCCESS] Presentation generated: presentation.html${RESET}\n"
@printf "${BLUE}[TIP] Open presentation.html in a browser to view slides${RESET}\n"

presentation-pdf:: ## generate PDF presentation from PRESENTATION.md using Marp
@printf "${BLUE}[INFO] Checking for Marp CLI...${RESET}\n"
@if ! command -v marp >/dev/null 2>&1; then \
if command -v npm >/dev/null 2>&1; then \
printf "${YELLOW}[WARN] Marp CLI not found. Installing with npm...${RESET}\n"; \
npm install -g @marp-team/marp-cli || { \
printf "${RED}[ERROR] Failed to install Marp CLI. Please install manually:${RESET}\n"; \
printf "${BLUE} npm install -g @marp-team/marp-cli${RESET}\n"; \
exit 1; \
}; \
else \
printf "${RED}[ERROR] npm not found. Please install Node.js and npm first.${RESET}\n"; \
printf "${BLUE} See: https://nodejs.org/${RESET}\n"; \
printf "${BLUE} Then run: npm install -g @marp-team/marp-cli${RESET}\n"; \
exit 1; \
fi; \
fi
presentation-pdf:: install-marp ## generate PDF presentation from PRESENTATION.md using Marp
@printf "${BLUE}[INFO] Generating PDF presentation...${RESET}\n"
@marp PRESENTATION.md -o presentation.pdf --allow-local-files
@${MARP_BIN} PRESENTATION.md -o presentation.pdf --allow-local-files
@printf "${GREEN}[SUCCESS] Presentation generated: presentation.pdf${RESET}\n"

presentation-serve:: ## serve presentation interactively with Marp
@printf "${BLUE}[INFO] Checking for Marp CLI...${RESET}\n"
@if ! command -v marp >/dev/null 2>&1; then \
if command -v npm >/dev/null 2>&1; then \
printf "${YELLOW}[WARN] Marp CLI not found. Installing with npm...${RESET}\n"; \
npm install -g @marp-team/marp-cli || { \
printf "${RED}[ERROR] Failed to install Marp CLI. Please install manually:${RESET}\n"; \
printf "${BLUE} npm install -g @marp-team/marp-cli${RESET}\n"; \
exit 1; \
}; \
else \
printf "${RED}[ERROR] npm not found. Please install Node.js and npm first.${RESET}\n"; \
printf "${BLUE} See: https://nodejs.org/${RESET}\n"; \
printf "${BLUE} Then run: npm install -g @marp-team/marp-cli${RESET}\n"; \
exit 1; \
fi; \
fi
presentation-serve:: install-marp ## serve presentation interactively with Marp
@printf "${BLUE}[INFO] Starting Marp server...${RESET}\n"
@printf "${GREEN}[INFO] Press Ctrl+C to stop the server${RESET}\n"
@marp -s .
@${MARP_BIN} -s .
Loading