doc(description) Project description + prompts - #276
Conversation
📝 WalkthroughWalkthroughThe PR expands ChangesDocumentation Expansion
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
readme.md (1)
54-54: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winClarify the documented secret-storage implementation.
The README repeatedly links Android Keystore to
EncryptedSharedPreferences, but Jetpack Security CryptoEncryptedSharedPreferencesis deprecated. If the app still documents Jetpack Security as the storage path, remove the deprecated library from the docs and either migrate to direct Keystore-backedSharedPreferencesor make the current Keystore implementation clear and backup-exclusion configuration explicit. The same wording applies at lines 183-184 and 223-228.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@readme.md` at line 54, Update the README’s secret-storage documentation at the token table and the referenced sections to remove or revise the deprecated Jetpack Security Crypto EncryptedSharedPreferences wording. Document the actual Android Keystore-backed SharedPreferences implementation, including explicit backup-exclusion configuration where applicable, and keep the wording consistent across all mentioned sections.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@prompts.md`:
- Line 4: Sanitize the references in prompts.md, including the Notion link and
the additionally flagged sections, by removing private environment paths,
usernames, session identifiers, and raw workspace URLs. Replace them with
repository-relative paths and an approved public/source link or neutral
placeholder, preserving the documentation’s intended meaning.
- Around line 394-399: Update the Android code reviewer agent instructions in
prompts.md to remove Bash from its allowed tools, or explicitly require an
enforced OS-level read-only sandbox and command allowlist before retaining it.
Keep the agent audit-only with Read, Grep, and Glob, and preserve the existing
frontmatter requirements for name, proactive description, and default review
model.
In `@readme.md`:
- Around line 57-58: Update the FastPath documentation around the “Confidence
gate” entry and the corresponding flow section so it states that only the SBI
content is read-only; keep person/type selection and Save controls explicitly
interactive where applicable.
- Around line 57-58: Document the confidence enum mapping in the README’s SBI
format and Confidence gate sections: validate Claude’s lowercase high/low
values, convert them explicitly to Notion’s High/Low Select values, and reject
any other confidence value before writing to Notion.
- Around line 259-260: Resolve the Date meaning consistently across the schema
and table documentation near the Date field and its other occurrence: either
define it everywhere as the event timestamp or as the local capture timestamp,
or introduce separate event and capture timestamp fields. Update both
descriptions and related examples so delayed saves and retries preserve the
chosen semantics.
- Around line 287-290: Update the security/privacy documentation near the
centralized Notion fields, including Raw transcription, SBI blocks, and Person,
to define consent and user notice, access controls and audit logging, retention
limits, deletion procedures, and redaction requirements for direct-report
feedback. Ensure these requirements cover both stored feedback content and
identifying information.
- Around line 392-412: Complete the /v1/messages contract by documenting the
required anthropic-version header and application/json content type, and make
the SBI JSON guarantee actionable by defining the output_config.format schema in
the request or documenting strict client-side parsing with 200-response
validation and retry handling.
---
Nitpick comments:
In `@readme.md`:
- Line 54: Update the README’s secret-storage documentation at the token table
and the referenced sections to remove or revise the deprecated Jetpack Security
Crypto EncryptedSharedPreferences wording. Document the actual Android
Keystore-backed SharedPreferences implementation, including explicit
backup-exclusion configuration where applicable, and keep the wording consistent
across all mentioned sections.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| > Detalla en esta sección los prompts principales utilizados durante la creación del proyecto, que justifiquen el uso de asistentes de código en todas las fases del ciclo de vida del desarrollo. Esperamos un máximo de 3 por sección, principalmente los de creación inicial o los de corrección o adición de funcionalidades que consideres más relevantes. | ||
| > Puedes añadir adicionalmente la conversación completa como link o archivo adjunto si así lo consideras. | ||
| > | ||
| > Fuente Notion: [Para la entrega del projecto a LIDR](https://app.notion.com/p/3909dccf4e1880008971ebefe0b51484) |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Remove private environment and workspace references from committed documentation.
The absolute paths expose the author’s local username and Claude session identifiers, and the raw Notion URLs may disclose private workspace metadata or be inaccessible to other contributors. Replace them with sanitized, repository-relative paths and an approved public/source link or placeholder before publishing this file.
Also applies to: 83-86, 338-345
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@prompts.md` at line 4, Sanitize the references in prompts.md, including the
Notion link and the additionally flagged sections, by removing private
environment paths, usernames, session identifiers, and raw workspace URLs.
Replace them with repository-relative paths and an approved public/source link
or neutral placeholder, preserving the documentation’s intended meaning.
| 4. Con todo lo anterior, escribe el fichero .claude/agents/android-code-reviewer.md con: | ||
| - Frontmatter: name, description (debe funcionar como regla de disparo automático: | ||
| "Usa este agente PROACTIVAMENTE cada vez que se pida revisar un PR, diff o cambio de | ||
| código Kotlin/Java, o tras escribir/modificar código Android" — sé explícito, no vago), | ||
| tools: Read, Grep, Glob, Bash (solo lectura, sin Write/Edit — este agente audita, | ||
| no parchea), model: el que tengas configurado por defecto para revisión de código. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the generated agent configuration and any repository-level tool restrictions.
test -f .claude/agents/android-code-reviewer.md &&
sed -n '1,30p' .claude/agents/android-code-reviewer.md
rg -n 'tools:|Bash|Write|Edit|sandbox|allowlist|read.only' .claude .github 2>/dev/nullRepository: LIDR-academy/AI4Devs-finalproject
Length of output: 171
🏁 Script executed:
#!/bin/bash
set -u
printf 'Repository files containing android-code-reviewer/prompts:\n'
git ls-files | rg '(^|/)(prompts\.md|android-code-reviewer\.md)$|\.claude/agents/' || true
printf '\n.prompts.md relevant lines if present:\n'
if test -f prompts.md; then
sed -n '380,410p' prompts.md
printf '\nSearch prompts.md for tools/Bash/Android:\n'
rg -n 'Bash|tools:|android-code-reviewer|Read|Write|Edit|sandbox|allowlist' prompts.md || true
fi
printf '\nCurrent .claude tree/files (if present):\n'
test -d .claude && find .claude -maxdepth 3 -type f -print | sort | sed -n '1,120p' || trueRepository: LIDR-academy/AI4Devs-finalproject
Length of output: 2951
🌐 Web query:
Claude Code agents tools Read Grep Glob Bash Write Edit permissions
💡 Result:
Claude Code provides several built-in tools that enable agentic capabilities for file system interactions, search, and command execution [1][2]. Each tool has specific permission requirements and behaviors, which can be configured via permission rules [3][4]. Tool Permissions and Behaviors Bash: Executes shell commands. It requires permission (approval) to run, except for a built-in set of read-only commands that run without prompting [5][3]. Edit: Used for targeted file modifications. It requires permission for all operations [5][3]. An Edit(path) rule also implicitly grants read access to that path [5][6]. Read: Used to read file contents. By default, it does not prompt for files inside the working directory or designated additional directories, but it will prompt for access to files outside these areas [5][4]. Grep: Used to search for patterns in file contents. Similar to Read, it does not prompt for access within the working directory [5][3]. Glob: Used to find files using pattern matching. Like Read and Grep, it does not prompt within the working directory [5][4]. Configuration and Rules You can control these tools using rule formats like ToolName(specifier) [4]. Permissions and Rules: Permission rules (allow, deny, or ask) are defined in settings (e.g.,.claude/settings.json), via CLI flags, or through the Agent SDK [1][4]. Permission Modes: These modes (e.g., default, acceptEdits, dontAsk) set the baseline for how Claude handles tool prompts [7][8]. For example, acceptEdits automatically approves file edits and common filesystem commands (like mkdir or mv), while dontAsk mode denies anything not explicitly pre-approved [7][8]. Best Practices: When defining rules, use Read(path) for Read, Grep, and Glob, and Edit(path) for Edit and Write operations [3][4]. The system performs best-effort matching, applying Read rules to tools that read files (including Grep and Glob) and Edit rules to tools that modify them [3]. Important Note: Read and Edit deny rules apply to built-in tools and recognized file commands (e.g., cat, sed) in Bash, but they do not restrict arbitrary subprocesses (like Python or Node scripts) that open files independently [3]. For comprehensive OS-level restriction, the sandbox environment should be enabled [3][9].
Citations:
- 1: https://code.claude.com/docs/en/how-claude-code-works.md
- 2: https://code.claude.com/docs/en/how-claude-code-works
- 3: https://code.claude.com/docs/en/permissions
- 4: https://code.claude.com/docs/en/tools
- 5: https://code.claude.com/docs/en/tools-reference
- 6: https://code.claude.com/docs/en/tools-reference.md
- 7: https://code.claude.com/docs/en/permission-modes
- 8: https://code.claude.com/docs/en/agent-sdk/permissions
- 9: https://code.claude.com/docs/en/permissions.md
Remove Bash or restrict it to a read-only sandbox.
Claude’s Bash tool executes shell commands and is only approximated by Read/Edit rules; it can still run arbitrary commands or use subprocesses to modify files. For an auditing agent, remove Bash unless the generated agent also documents and enforces an OS-level read-only sandbox / command allowlist.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@prompts.md` around lines 394 - 399, Update the Android code reviewer agent
instructions in prompts.md to remove Bash from its allowed tools, or explicitly
require an enforced OS-level read-only sandbox and command allowlist before
retaining it. Keep the agent audit-only with Read, Grep, and Glob, and preserve
the existing frontmatter requirements for name, proactive description, and
default review model.
| | 4 | Formato SBI (Claude) | JSON estructurado: `situation`, `behavior`, `impact`, `confidence` (`high`/`low`), `confidence_reason` | | ||
| | 5 | Confidence gate | Alta → FastPath (solo lectura). Baja → Review obligatoria (editable) | |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Clarify that only the SBI is read-only in FastPath.
“FastPath (solo lectura)” conflicts with the flow describing person/type selection and Save. Document the SBI as read-only, or clarify which controls remain interactive.
Also applies to: 71-74
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@readme.md` around lines 57 - 58, Update the FastPath documentation around the
“Confidence gate” entry and the corresponding flow section so it states that
only the SBI content is read-only; keep person/type selection and Save controls
explicitly interactive where applicable.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Document the confidence enum mapping.
Claude uses lowercase high/low, while Notion stores High/Low. Add the explicit conversion and validation rule to prevent invalid Select values.
Also applies to: 266-290
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@readme.md` around lines 57 - 58, Document the confidence enum mapping in the
README’s SBI format and Confidence gate sections: validate Claude’s lowercase
high/low values, convert them explicitly to Notion’s High/Low Select values, and
reject any other confidence value before writing to Notion.
| date Date "fecha del evento" | ||
| string Type "Strength | Growth | Observation" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Resolve the conflicting Date semantics.
The schema defines Date as the event date, but the table says it is the local date when saving. This changes historical accuracy for delayed saves and retries; choose one meaning or add separate event/capture timestamps.
Also applies to: 285-285
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@readme.md` around lines 259 - 260, Resolve the Date meaning consistently
across the schema and table documentation near the Date field and its other
occurrence: either define it everywhere as the event timestamp or as the local
capture timestamp, or introduce separate event and capture timestamp fields.
Update both descriptions and related examples so delayed saves and retries
preserve the chosen semantics.
| | Status | Select | Captured → Delivered | Solo esos dos estados en v1 | | ||
| | Situation / Behavior / Impact | Rich text | Bloques SBI | No vacíos al guardar desde Review | | ||
| | Raw transcription | Rich text | Transcript original | Auditoría / debug | | ||
| | Confidence | Select | High / Low | Self-assessment de Claude | |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "## repo files around readme"
git ls-files | rg '(^|/)readme\.md$|README|SECURITY|privacy|retention|gdpr|privacy|security' || true
echo
echo "## readme line count"
wc -l readme.md
echo
echo "## relevant readmes/snippets"
sed -n '1,340p' readme.md | cat -n
echo
echo "## notion/database mentions"
rg -n -i 'notion|raw transcription|transcription|feedback|retention|deletion|privacy|security|control|redaction|consent|notice|access' readme.md || trueRepository: LIDR-academy/AI4Devs-finalproject
Length of output: 22869
Define privacy and retention for raw feedback.
Raw transcription, SBI blocks, and the Person field are stored in centralized Notion for audit/debug, but the security section only covers tokens, HTTPS/OkHttp behavior, and ProGuard. Add consent/notice, access control/auditing, retention, deletion, and redaction requirements for direct-report feedback.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@readme.md` around lines 287 - 290, Update the security/privacy documentation
near the centralized Notion fields, including Raw transcription, SBI blocks, and
Person, to define consent and user notice, access controls and audit logging,
retention limits, deletion procedures, and redaction requirements for
direct-report feedback. Ensure these requirements cover both stored feedback
content and identifying information.
| /v1/messages: | ||
| post: | ||
| summary: Claude — formatear transcript a SBI JSON | ||
| servers: [{ url: https://api.anthropic.com }] | ||
| parameters: | ||
| - in: header | ||
| name: x-api-key | ||
| required: true | ||
| schema: { type: string } | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
| example: | ||
| model: claude-sonnet-5 | ||
| max_tokens: 1024 | ||
| messages: | ||
| - role: user | ||
| content: "<transcript + instrucciones SBI>" | ||
| responses: | ||
| "200": | ||
| description: Respuesta con bloque text que contiene JSON SBI |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== locate readme =="
fd -a 'readme\.md$' . || true
echo "== relevant readme section =="
if [ -f readme.md ]; then
wc -l readme.md
sed -n '360,430p' readme.md
fi
echo "== search Anthropic/message related definitions =="
rg -n "x-api-key|anthropic-version|content-type|messages:|output_config|Claude|anthropic|transcript|SBI" -S .Repository: LIDR-academy/AI4Devs-finalproject
Length of output: 9627
🌐 Web query:
Anthropic Messages API required headers anthropic-version content-type output_config.format response schema
💡 Result:
To interact with the Anthropic Messages API, you must include specific headers and follow a structured request format for tasks such as enabling JSON outputs. Required Headers Every request to the Anthropic Messages API must include the following headers [1]: - x-api-key: Your API key from the Anthropic Console [1][2]. (Alternatively, you may use the Authorization header with a Bearer token if utilizing Workload Identity Federation [1][2].) - anthropic-version: The API version (e.g., 2023-06-01) [1][2]. - content-type: Must be set to application/json [1][2]. Note: If you use the official Anthropic client SDKs, these headers are managed automatically [1]. Request Format and Structured Outputs To receive a response in a specific JSON format, you use the output_config.format parameter within your request body [3][4]. This parameter is generally available and does not require beta headers [3][5]. The request structure for structured outputs is as follows [3]: - output_config: The top-level configuration object [3][4]. - output_config.format: Defines the output requirements [3][4]. - type: Must be set to "json_schema" [3][4]. - schema: A JSON schema defining the required structure of the model's output [3][4]. Example structure [3]: { "model": "claude-3-5-sonnet-20241022", "max_tokens": 1024, "messages": [{"role": "user", "content": "Extract data..."}], "output_config": { "format": { "type": "json_schema", "schema": { "type": "object", "properties": {... }, "required": [... ], "additionalProperties": false } } } } The resulting JSON will be returned in the assistant's response, specifically within response.content.text [3].
Citations:
- 1: https://platform.claude.com/docs/en/api/overview
- 2: https://platform.claude.com/docs/en/manage-claude/authentication
- 3: https://platform.claude.com/docs/en/build-with-claude/structured-outputs
- 4: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/structured-outputs
- 5: https://vercel.com/docs/ai-gateway/sdks-and-apis/anthropic-messages-api/structured-outputs
Complete the Anthropic API contract.
The referenced Messages endpoint is missing required request metadata (anthropic-version and application/json content type) and the contract promises SBI JSON without an actual output_config.format schema. Define that schema or document strict client-side parsing plus 200 validation/retry handling.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@readme.md` around lines 392 - 412, Complete the /v1/messages contract by
documenting the required anthropic-version header and application/json content
type, and make the SBI JSON guarantee actionable by defining the
output_config.format schema in the request or documenting strict client-side
parsing with 200-response validation and retry handling.
Source: MCP tools
Summary by CodeRabbit