Skip to content

include llm files; add generated mark#67

Merged
NoEgAm merged 1 commit intomainfrom
llms
Jan 15, 2026
Merged

include llm files; add generated mark#67
NoEgAm merged 1 commit intomainfrom
llms

Conversation

@tiye
Copy link
Copy Markdown
Member

@tiye tiye commented Jan 7, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive LLM agent documentation and marks generated files appropriately. It introduces three new documentation files specifically designed for AI agents to understand and work with the Calcit/Respo ecosystem, updates dependency versions, and adds metadata to indicate that certain files are generated.

Key Changes

  • Added three new LLM agent guide files providing detailed instructions for AI-assisted development
  • Updated multiple dependency versions to newer releases
  • Added :about metadata to generated files warning against direct editing
  • Configured .gitattributes to mark the new documentation files as generated

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
llms/Respo.md New comprehensive guide for LLM agents developing Respo applications (920 lines) - includes some documentation issues
llms/Calcit.md New guide for Calcit language development with CLI reference (836 lines) - contains markdown escaping artifacts in code examples
Agents.md New Cumulo development workflow guide for LLM agents (610 lines) - has some duplicate sections
deps.cirru Dependency version updates for several packages (alerts.calcit, respo-message.calcit, respo.calcit, memof, recollect, ws-edn.calcit)
compact.cirru Added :about metadata field warning against direct editing and version bump to 0.9.12
calcit.cirru Added :version field to client entry and version bump to 0.9.12
.gitattributes Added linguist-generated markers for new documentation files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to +37
---

## Development Workflow - Adding Features

Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section "Development Workflow - Adding Features" appears twice consecutively (lines 32 and 36). One of these duplicate section headers should be removed.

Suggested change
---
## Development Workflow - Adding Features

Copilot uses AI. Check for mistakes.
if (some? target) (assoc old-files filter-ns target) (dissoc old-files filter-ns)
, latest-files
compact-data $ {} (:package pkg)
compact-data $ {} (:package pkg) (:about "\"file is generated - never edit directly; learn cr edit/tree workflows before changing")
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The :about field value contains an escaped string with nested quotes: "|\"file is generated - never edit directly; learn cr edit/tree workflows before changing". This appears to be a Cirru string literal that includes escaped quotes, which may be overly complex. Consider simplifying to a standard string without the internal escaping for better readability.

Suggested change
compact-data $ {} (:package pkg) (:about "\"file is generated - never edit directly; learn cr edit/tree workflows before changing")
compact-data $ {} (:package pkg) (:about "|file is generated - never edit directly; learn cr edit/tree workflows before changing")

Copilot uses AI. Check for mistakes.
|T $ %{} :Leaf (:at 1599733076861) (:by |S1lNv50FW) (:text |:configs)
|j $ %{} :Expr (:at 1599733281290) (:by |S1lNv50FW)
|T $ %{} :Leaf (:at 1767779797416) (:by |sync) (:text |:about)
|V $ %{} :Leaf (:at 1767779797416) (:by |sync) (:text "|\"file is generated - never edit directly; learn cr edit/tree workflows before changing")
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The :about field value contains an escaped string with nested quotes: "|\"file is generated - never edit directly; learn cr edit/tree workflows before changing". This appears to be a Cirru string literal that includes escaped quotes, which may be overly complex. Consider simplifying to a standard string without the internal escaping for better readability.

Copilot uses AI. Check for mistakes.
echo '"new-value"' | cr tree replace respo.app.updater/updater -p "2,1,0" -s -J
```

echo '["defn", "hello", [], ["println", "|Hello"]]' | cr edit def respo.app.core/hello -s -J
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line appears to be an incomplete or orphaned code example. Line 119 shows an echo command with edit def that doesn't follow the established pattern of the surrounding documentation and appears to be misplaced outside of any code block or example context.

Copilot uses AI. Check for mistakes.
Comment on lines +453 to +455
| `\|hello` | `"hello"` | `"hello"` |
| `"world"` | `"world"` | `"world"` |
| `\|a b c` | `"a b c"` | `"a b c"` |
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this table, the Cirru column uses backslash escapes for the pipe character. For example, \|hello and \|a b c. These backslashes are not part of Cirru syntax and appear to be markdown escaping artifacts. In actual Cirru code, these should just be |hello and |a b c without backslashes.

Suggested change
| `\|hello` | `"hello"` | `"hello"` |
| `"world"` | `"world"` | `"world"` |
| `\|a b c` | `"a b c"` | `"a b c"` |
| `|hello` | `"hello"` | `"hello"` |
| `"world"` | `"world"` | `"world"` |
| `|a b c` | `"a b c"` | `"a b c"` |

Copilot uses AI. Check for mistakes.
Comment on lines +384 to +385
### Authentication (template has basic version)

Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section "Authentication (template has basic version)" appears twice consecutively (lines 382 and 384). One of these duplicate section headers should be removed.

Suggested change
### Authentication (template has basic version)

Copilot uses AI. Check for mistakes.
Comment on lines +501 to +502

cr --check-only # Syntax only (fast)
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line "cr --check-only # Syntax only (fast)" appears twice consecutively (lines 500 and 502). This appears to be an accidental duplication and one should be removed.

Suggested change
cr --check-only # Syntax only (fast)

Copilot uses AI. Check for mistakes.
cr cirru show-guide
```

### 6. Library Management
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section title "6. Library Management" is used twice. The first occurrence is at line 253, and there's another section with the same number "6." at line 227 for "Documentation and Language". These should be renumbered sequentially to avoid confusion.

Suggested change
### 6. Library Management
### 7. Library Management

Copilot uses AI. Check for mistakes.
Comment on lines +673 to +681
| 场景 | 示例用法 | 解析结果 | 说明 |
| ------------------- | -------------------------------------- | ----------------------------- | --------------------------------- |
| **表达式 (Cirru)** | `-e 'defn add (a b) (+ a b)'` | `["defn", "add", ...]` (List) | 默认按 Cirru one-liner 解析 |
| **原子符号 (Leaf)** | `--leaf -e 'my-symbol'` | `"my-symbol"` (Leaf) | **推荐**,避免被包装成 list |
| **字符串 (Leaf)** | `--leaf -e '\|hello world'` | `"hello world"` (Leaf) | 符号前缀 `\|` 表示字符串 |
| **JSON 数组** | `-e '["+", "x", "1"]'` | `["+", "x", "1"]` (List) | **自动识别** (含 `[` 且有 `"`) |
| **JSON 字符串** | `-e '"my leaf"'` | `"my leaf"` (Leaf) | **自动识别** (含引用的字符串) |
| **内联 JSON** | `-j '["defn", ...]'` | `["defn", ...]` (List) | 显式按 JSON 解析,忽略 Cirru 规则 |
| **外部文件** | `-f code.cirru` (或 `-f code.json -J`) | 根据文件内容解析 | `-J` 用于标记文件内是 JSON |
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table includes backslash-escaped pipe characters (e.g., \|hello world) which are markdown escaping artifacts, not actual Cirru syntax. In actual usage, these should be |hello world without backslashes.

Copilot uses AI. Check for mistakes.
Comment on lines +389 to +398
defn user/log-in (db username password sid op-id op-time)
let
maybe-user $ find-user db username
if
and (some? maybe-user)
= (md5 password) (:password maybe-user)
; Success: Set user-id in session
assoc-in db ([] :sessions sid :user-id) (:id maybe-user)
; Failure: Add error message
add-error-message db sid "|Invalid credentials"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The authentication example for user/log-in uses md5 to hash and verify passwords (= (md5 password) (:password maybe-user)), which is a weak, fast hash function unsuitable for password storage and can be brute-forced or attacked with rainbow tables if the database is compromised. An attacker who obtains the stored hashes can efficiently recover user passwords, potentially compromising other accounts where the same password is reused. Replace MD5-based password handling with a modern password hashing algorithm (e.g., bcrypt, scrypt, Argon2) and ensure salts and appropriate work factors are used, and update both documentation and implementation to reflect this stronger scheme.

Copilot uses AI. Check for mistakes.
@NoEgAm NoEgAm merged commit ae3c577 into main Jan 15, 2026
2 checks passed
@NoEgAm NoEgAm deleted the llms branch January 15, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants